Oracle: Reset forgotten/unknown SYSTEM password

Posted by Adrian Thu, 07 May 2009 16:12:00 GMT

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.

Great Book

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.


About

We are a small British company that produces business-oriented software and solutions. These articles are a product of our daily work - information that we think might be useful to share. We hope you find them useful.

Our Software

These are some of our products. Several are open source, some are web-based and others are proprietary:

Categories

Archives

Syndicate

ml> ._trackPageview(); } catch(err) {} ml> l> pageTracker._trackPageview(); } catch(err) {} ml> ._trackPageview(); } catch(err) {} ml> l>