3 Replies Latest reply: Feb 22, 2006 5:53 PM by jkkstar inc., RSS

    sys password

    492878
      I have a script which must be run as sys but i do not have the sys password, i only have the system password.
      Can i , either reset the sys password using system user or connect as sys without it ?
      I am using oracle 9i
        • 1. Re: sys password
          93654
          If you can login as system you can change the password of sys.

          -Sri
          • 2. Re: sys password
            Paul M.
            Can i , either reset the sys password using system user or connect as sys without it ?
            If you are working locally you can do both. As system you can do

            SQL> alter user sys identified by <new password>;

            otherwise, set ORACLE_SID, then

            $ sqlplus "/ as sysdba"
            • 3. Re: sys password
              jkkstar inc.,
              Hi user489875,

              The better way to change the sys password is creating a orapwd file & bounce the db. But, this can't be done again & again on PRD systems. Hence you can follow this way.

              First check whether sys user has any password, if has the notedown by connecting to db as [ sqlplus " / as sysdba" ] & running the given query. Some time for security reason some companies policy may lock the sys & system login with null password. CHECK IT OUT.

              select username, account_status, password from dba_users where username='SYS';

              then alter the sys login with new password

              alter use sys identified by <new pass>;

              once you script executing is complete revert the old password again

              alter user sys identified by values 'old password';

              cheers,

              kamalesh jk