14

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?

1
  • If you're sure your privileges are setup correctly, one more thing you might try: "create a file named sqlnet.ora in your ORA_HOME\network\network\admin directory and add to it the following line: SQLNET.AUTHENTICATION_SERVICES = (NTS) Then save." See more here: it.toolbox.com/blogs/david/… Commented Jun 13, 2009 at 5:51

2 Answers 2

21

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.

Sign up to request clarification or add additional context in comments.

Comments

7

Is your operating system user account that you are logged in as a member of the ORA_DBA group (windows) or the DBA group (*nix)?

If the answer is yes, then the next thing to check is for the existence of the ORACLE_HOME\database\orapwORCL.ora file, which contains the passwords for all of the users defined as sysdba users. If it does not exist, you need to shutdown the database and execute the orapwd utility:

  • cd ORACLE_HOME\database
  • orapwd file=orapwORCL.ora password=123456 entries=10

This defines the sys password as 123456. You should then be able to start up the database and connect sys/123456 as sysdba

The password file must exist for password=based authentication on sysdba logins. The reason for this is the fact that sysdba connections must be allowed when the database is not up and the database cannot authenticate you.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.