This discussion is archived
3 Replies Latest reply: Feb 22, 2006 3:53 PM by jkkstarinc., RSS

sys password

492878 Newbie
Currently Being Moderated
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 Newbie
    Currently Being Moderated
    If you can login as system you can change the password of sys.

    -Sri
  • 2. Re: sys password
    Paul M. Oracle ACE
    Currently Being Moderated
    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
    jkkstarinc., Newbie
    Currently Being Moderated
    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