This discussion is archived
14 Replies Latest reply: Oct 29, 2013 6:49 PM by ANGSHUMAN86 RSS

lost sys password ...any way to recover

528776 Newbie
Currently Being Moderated
hi All

I lost the sys password ... is there any way to recover it ....

Thanks
  • 1. Re: lost sys password ...any way to recover
    MohamedTawfik Newbie
    Currently Being Moderated
    use your previous cold backup
    i think you can
  • 2. Re: lost sys password ...any way to recover
    528776 Newbie
    Currently Being Moderated
    from the previous cold backup how do i get the sys password...

    could you plz explain ...

    Thanks
  • 3. Re: lost sys password ...any way to recover
    577207 Newbie
    Currently Being Moderated
    You can use orapwd.

    Adith
  • 4. Re: lost sys password ...any way to recover
    528776 Newbie
    Currently Being Moderated
    how do we recover from orapwd...

    Thanks
    Prakash
  • 5. Re: lost sys password ...any way to recover
    MohamedTawfik Newbie
    Currently Being Moderated
    cold means that backup you take it when the ORACLE Instance is shut down, controlfiles, redologfiles, datafiles, archivelog
    also you can use orapwd to recover your passwrd
    also you can contact oracle using oracle metalink to give you the advices for that issue
  • 6. Re: lost sys password ...any way to recover
    577207 Newbie
    Currently Being Moderated
    Using ORAPWD
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/dba.htm#sthref166

    Additionally you can visit here:
    Re: sys password
    sys password


    Adith
  • 7. Re: lost sys password ...any way to recover
    51034 Newbie
    Currently Being Moderated
    Pay no attention to the ridiculous piece of advice you've just been given by someone else! Restoring a prior backup would be a monumentally moronic thing to do -apart from anything else, all you'd be doing is restoring the password you say you've forgotten!

    You don't say what OS you're on, and that makes a bit of a difference, but ultimately not much so I'll just carry on... but as a tip for the future, always mention your OS because then people replying don't have to guess.

    1. Members of the dba group (or the ORA_DBA group on Windows) are allowed to log on as a SYS without supplying a password at all. Connect / as sysdba means "get me on as sys, but I'm not telling you my password" -at which point Oracle checks who you're logged on to at the OS level, and then checks the group memberships of the dba (Linux/Unix) or ORA_DBA groups (Windows). If you're a member you're in... and then you can issue a command such as 'alter user sys identified by newpwd'.

    You can only really do this technique, however, when you're connecting on the box which runs Oracle itself. If you don't have access to the server, it's not going to work. You also need to configure those OS groups with the appropriate tools. If you don't know how to do that, you're in trouble.

    2. If you're using a password file to authenticate as SYS, then you can simply delete the existing password file and replace it with a new one... and you get to specify the new password for SYS at the time you create the new file. The utility provided by Oracle for this purpose is "orapwd" and the command on Windows, for example, would look like:

    orapwd file=c:\oracle\10g\databases\pwdSID.ora password=newpwd entries=20

    The file has to live in the ORACLE_HOME\database or ORACLE_HOME/dbs directory; it has to be called whatever is appropriate for your operating system (now you see why it helps to know your OS!) and the figure for "entries" represents how many people you might want to grant the SYSDBA privilege to in the future, so make it higher than you think you need right now.

    On Linux, the required name for the password file is of the form orapwSID, where SID is the name of your instance/database. On Windows, it's as I showed you above: pwdSID.ora.

    Once you have a new password file in place, you can log in as 'sys\newpword@somedb as sysdba' and again issue an 'alter user sys identified by yetanothernewpword' command: that will update the password file as well as changing things inside the database itself and you'll log on with that password thereafter.
  • 8. Re: lost sys password ...any way to recover
    Maran Viswarayar Pro
    Currently Being Moderated
    Please make sure before giving any suggestions
    Assume if it is Porduction what will happen>unimnaginable

    I think he will be using REMOTE_LOGIN_PASSWORD=EXCLUSIVE if so Mr.Howard has give and wonderful way to do it

    Delete the Password file and recreate a new one..Its as simple as that
  • 9. Re: lost sys password ...any way to recover
    588568 Newbie
    Currently Being Moderated
    Hi Howard: Not being lazy here, it's just that I have heard/read conflicting password file stuff.

    Here's my question: Is it OK to use orapwd with the database open, or not? My gut instinct is "not", but I really am unsure. Can you shed some light on this? Thank You.
  • 10. Re: lost sys password ...any way to recover
    51034 Newbie
    Currently Being Moderated
    Sure it is. The password file is not a part of the database: only controlfiles, online redo logs and datafiles are. Therefore, it couldn't care less whether the database is open or not. In fact, it has no way of checking whether it is or not.

    Similarly, the database doesn't keep checking or reading the password file (it's the constant access to a file which determines whether a file is part of the database or not). So you can delete it, recreate it, rename it, do anything you like to it at any time and the database is not going to know nor care.

    The only time the password file is accessed is if someone logs on 'as sysdba' (which means it can get a bit hairy at startup and shutdown times). Otherwise, run orapwd any time you like, database up, down or indifferent.
  • 11. Re: lost sys password ...any way to recover
    588568 Newbie
    Currently Being Moderated
    Thank you.
  • 12. Re: lost sys password ...any way to recover
    855552 Newbie
    Currently Being Moderated
    you advice is beneficial for me, thanks howardjr .
    .
  • 13. Re: lost sys password ...any way to recover
    ANGSHUMAN86 Newbie
    Currently Being Moderated

    Step 1 : Start -> Run -> cmd

     

     

    Step 2 : Write the command "sqlplus /nolog" (without quote)

     

     

    Step 3 : Write the command "connect /as sysdba" (without quote)

     

     

    Step 4 : Write the command "passw system" (without quote)

     

     

    Step 5 : Enter new Password and Retype new Password

     

     

    Step 6 : You are done.

  • 14. Re: lost sys password ...any way to recover
    sb92075 Guru
    Currently Being Moderated
    ANGSHUMAN86,

     

     

    This is a SIX YEAR OLD thread!