Oracle

Oracle Guide

Reset forgotten/unknown SYSTEM password

 


If you have forgotten the SYSTEM password for an Oracle Database Server, you can reset it by logging in to Windows as Administrator and connecting to Oracle as sysdba. This tip explains how. For this to work you must be logged in to the Windows Server that is running Oracle as Administrator. Here are the steps to reset the password:
 
Start SQL*Plus 
(Start -> Programs -> Oracle – Instance Name -> Application Development -> SQL Plus).

At the login prompt, in the user-name field, type ”/as sysdba” (including the forward slash, but without the quotes). Click OK. You are now connected as system with full DBA rights. To reset the password of the SYSTEM password (or any other user password), run the following query:

alter user system identified by NewPasswordHere;

Change the password to whatever you want it to be. Note also that it doesn't need to be in single quotes, as you might expect. Hit ENTER to run the query and you should receive positive affirmation of the change: “User altered.” 

If you don't have SQL*Plus (for example, if you are using Oracle XE), open a console

Start -> Run -> type 'cmd.exe' followed by <Enter> and then run sqlplus from the command line: sqlplus / as sysdba

Once connected, use alter user as described above. Apart from the more obvious uses, this tip is particularly useful if you’ve imported a database dump from another server and don’t know the system password.