Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect SQLplus in oracle

Tags:

oracle

sqlplus

I want to connect user sys in sqlplus of oracle but after I connect, I type like this:

sqlplus sys as sysdba
password:123456
Error:
  ORA-01030:insufficient privilege

  warning:You are no longer to connect oracle.

Does anyone help me to solve my problem?

like image 859
Sopolin Avatar asked Jun 13 '09 05:06

Sopolin


People also ask

What is connect command in Oracle?

Connects a given username to the Oracle Database. When you run a CONNECT command, the site profile, glogin. sql, and the user profile, login. sql, are executed. CONNECT does not reprompt for username or password if the initial connection does not succeed.

What is connect identifier in Sqlplus?

A connect identifier can be the connect descriptor or a name that resolves to a connect descriptor. The connect descriptor contains: Network route to the service, including the location of the listener through a protocol address. A database service name or Oracle system identifier (SID)

What is Sqlplus command?

SQL*Plus is a command-line tool that provides access to the Oracle RDBMS. SQL*Plus enables you to: Enter SQL*Plus commands to configure the SQL*Plus environment. Startup and shutdown an Oracle database. Connect to an Oracle database.


1 Answers

Your example looks a little garbled; to connect to sqlplus via the command line, with a user sys and password 123456:

sqlplus sys/123456 as sysdba

or

sqlplus "sys/123456 as sysdba"

prior to Oracle 10. If you are already inside sqlplus (as I assume from the fact that your example starts with a SQL>), you use the connect command:

SQL> connect sys/123456 as sysdba

In all cases, if you haven't set the environment variable ORACLE_SID, you need to specify that after the password, like this:

sqlplus sys/123456@<mydbname> as sysdba

where <mydbname> is either of the form <hostname>/<sid>, if you're using Oracle 10 or later, or a valid entry from your tnsnames.ora file (located in $ORACLE_HOME/network/admin) for all versions.

like image 114
Steve Broberg Avatar answered Sep 20 '22 00:09

Steve Broberg