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.
Best Answer
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 aORA-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