Q
Problem solve Get help with specific problems with your technologies, process and projects.

Can't remember password for one of multiple databases

There was a question on the forum regarding how one would log in to a database if one could not remember the SYS password. My question is, if you have multiple databases and you could not remember the SYS password for one of the databases, how could you set the new password?

There was a question on the forum regarding how one would log in to a database if one could not remember the SYS password. Your answer was as follows: "Log on to your Windows server as a member of the Administrators group or a member of the ORA_DBA group. At that point, you can sign on to the database as SYS without a password by doing the following:
sqlplus /nolog
connect / as sysdba
Once connected, you can change the SYS password to something you know:
ALTER USER sys IDENTIFIED BY new_password;
My question is, if you have multiple databases and you could not remember the SYS password for one of the databases, how could you set the new password? I tried a combination of your answer above, but was not successful. Your help would be greatly appreciated.
If you have multiple instances running on the same Windows box, you still use the same procedure above, but you have to add in an additional step.
  1. Sign on to the database server as a member of the Administrator's group or a member of the ORA_DBA group.
  2. In a DOS window, issue the following:
        set ORACLE_HOME=c:\oracle\....
        set ORACLE_SID=orcl
    
  3. Start SQL*Plus.
        sqlplus /nolog
    
  4. Connect as SYSDBA.
        connect / as sysdba
    
  5. Change the SYS password.
        alter user sys identified by new_password;
    
  6. Exit SQL*Plus and repeat Steps 2-5 for each instance as necessary.
It is Step 2 above that tells SQL*Plus which database to connect to. You'll have to supply appropriate values for the ORACLE_HOME and ORACLE_SID environment variables.

Dig Deeper on Oracle database backup and recovery

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close