Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change SYS's password without knowing the old one

Status
Not open for further replies.

theresatan

Programmer
Mar 18, 2002
101
US
Hi,

I just installed a oracle 10g, I have the system userid and password but I don't have sys's password(maybe I forgot, and the default pw change_on_install did not work).

how to change the sys password without knowing the old password.

Thanks!

Theresa
 
Theresa,

(First, I'm glad you signed your e-mail, "Theresa". It explained your member handle, for which I had momentarily thought me might need the services of an exorcist, "There-Satan" [wink])

Now, to business at hand: Oracle has apparently modified its access policy regarding SYS. To connect as user SYS, Oracle now expects you to use the phrase "connect / as sysdba". That connection will be successful only if your o/s login is a member of the privileged DBA group for your server.

I can help you determine if you are a member of the privileged DBA group if you disclose what operating system you use for your Oracle server machine.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 17:40 (28Oct04) UTC (aka "GMT" and "Zulu"),
@ 10:40 (28Oct04) Mountain Time
 
Thank you for the quick replying.

I am using windows 2000 professional.

The reason I ask the sys pw is:

I loged in to the enterprise manager with system and pw connected as 'normal'( if I select sysdba, then it said 'Your username and/or password are invalid'), it told me that database status is 'Down'. Then I click the startup button, it asked Host and Target database credentials. Host credentials default to SYSTEM user and Target database credentials default to sys user.

Thanks!

Theresa
 
The one error you got had to do with Preferred Credentials in OEM. Oracle wants you to input into OEM the default credentials for two users: one is the default user for connecting to the Oracle database, and second is the Windows user account who is authorized to logon to Windows as a batch job on Oracle's behalf. The first user is your Target Credential, and the second user is what OEM was referring to as the Host Credential.

All that aside, and getting back to the issue of changing the password, can you connect via SQL*Plus? Open a command prompt window (DOS), then issue the command "SET ORACLE_SID=yourSID", and then launch SQL*Plus using the command "SQLPLUS /NOLOG". At the SQL*Plus command prompt, issue the command "CONNECT / AS SYSDBA". If your system is setup a certain way, you will be connected without prompting for password. Once connected, you can use the command "ALTER USER SYS IDENTIFIED BY newpassword;" to change the password.

For anyone following this thread that uses a pre-9i version of Oracle, when you change the SYS password in SQL*Plus you should recreate the database password file. Shutdown the database and exit SQL*Plus, delete your old password file, then use the ORAPWD utility at the DOS command line to create a new database password file. The command would be like "ORAPWD file=%ORACLE_HOME%\database\pwdMYSID.ora entries=10, password=newpassword".

-Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top