Question

I've researched the web but I could not found exactly the same situation than mine so I'm posting this message.

I'm connecting via Remote Desktop Connection to a remote server (Win2k3 Server). This server has installed (select * from v$version):

  • Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod
  • PL/SQL Release 10.2.0.5.0 - Production
  • CORE 10.2.0.5.0 Production
  • TNS for 32-bit Windows: Version 10.2.0.5.0 - Production
  • NLSRTL Version 10.2.0.5.0 - Production

Running both of these sentences returns error:

c:\> sqlplus
SQL> conn / as sysdba
Insufficient privileges
SQL> connect system/****
Account locked

The remote computer is where the db is installed, so I'm not connecting to a remote db. The windows user account belongs to Administrator and Ora_DBA Windows groups.

Db has only one user available (the one used by the application we develope), but it hasn't enough privileges to alter SYSTEM account and unlock it.

I have no idea what else can I do, because I have no way to connect to de db as an administrator. I hope I have provided enough data for my question, if I missed anything please ask.

EDIT: I've checked again Windows user membership: Administrators, ora_dba, Users and "Remote Workplace Users" (hope I've translated last one right). PWD%ORACLE_SID%.ora file does not exist (suppose this is right).

EDIT2: I'm connecting to local db. I've found 3 installed SQLPLUS: one from Oracle Forms 6i (yeah, I know it's really old version), another one from Oracle 10 client, and the last one from Oracle 10 DB. I did not know about looking for ORACLE_HOME in HKLM/SOFTWARE/ORACLE, as I've read in a comment. In registry, all entries I've found point to Oracle Forms folder. I tried running sqlplus with full path, the sqlplus belonging to DB installation, and finally I've connected conn / as sysdba and I have run unlock account sentence, so problem is solved as my goal was to unlock system account.

Was it helpful?

Solution

The windows user account belongs to Administrator and Ora_DBA Windows groups.

Double check this, because you get the above error, when you are not a member of the ora_dba group.

Check %ORACLE_HOME%/network/admin/sqlnet.ora for the following line:

SQLNET.AUTHENTICATION_SERVICES=(NTS)

If it is set to NONE, that disables logging in with / as sysdba, but would result in a ORA-01017: invalid username/password; logon denied error.

Finally, SYS password is stored outside the database, in a file, on Windows it is %ORACLE_HOME%/database/PWD%ORACLE_SID%.ora. You can recreate it (give new SYS password) as:

orapwd file=%ORACLE_HOME%/database/PWD%ORACLE_SID%.ora force=y

After that, you can should be able to log in with the given password as:

connect sys/password as sysdba

OTHER TIPS

  • OS : Linux
  • Oracle : Version 11.2.0.1.0 - Production
  • Error :

    SQL> connect sys as sysdba;
    Enter password:
    ERROR:
    ORA-01031: insufficient privileges
    

And I used the instructions of balazs-papp but being a Linux environment the command syntax is altered, but the process is the same:

cd  $ORACLE_HOME/dbs
ls -la
ls -lrt *orapw*
orapwd file=orapwEE force=y

It works !!!

Change parameter REMOTE_LOGIN_PASSWORDFILE=exclusive using pfile or spfile. create again spfile which contains above entry shutdown oracle using windows services execute orapwd file=%ORACLE_HOME%/database/PWD%ORACLE_SID%.ora force=y using CMD.. restart your sql session and login /as sysdba and restart db.

I think your REMOTE_LOGIN_PASSWORDFILE=none or doesn't set properly. Due to this reason you are hitting this issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top