Tuesday, July 04, 2006

Oracle answers on the SYSDBA password question

1) Does Oracle cache the SYSDBA password?
2) Is there a way to force it to re-read the password file to pick up a changed password without havi
ng to shutdown the

Note.1029539.6 - UNIX How to Set up the Oracle Password File
Note 185703.1 - How to Avoid Common Flaws and Errors Using Passwordfile
Note 114384.1 - WIN: Checklist for Resolving CONNECT AS SYSDBA (INTERNAL) Issues

1) Yes. this is cached. The passwordfile is read only at the beginning, when the instance is started.
2) There is no way to force Oracle read the passwordfile, but one can use :

alter user sys identified by ;

After this the "cache" should be changed to the new password.

Guess that answers that question then. I've double checked the course materials from the Oracle DBA courses I've been on and they all say the way to change the SYSDBA password is to use orapwd, none of them mention using 'alter user...'.


Anonymous said...

Good post Stephen.

My question was whether or not I needed to shutdown a database in order to rebuild a password file.

I read the same notes on Metalink and concluded that yes, I do need to shut it down.

Your blog answers why. Thanks.

Simon Kelsey said...

select * from v$fixed_view_definition where view_name='GV$PWFILE_USERS';

This reveals the answer lies in x$kzsrt.

I haven't attempted to read the relevant area of memory, but it does explain why you can recreate the password file and it has no effect until the database restart...

Thanks for making me think about it!

Stephen Booth said...


Thank you for taking the time to think about it.


I'm glad you found this helpful. I guess the outcome is that you don't need to shutdown the database to rebuild the password file but you do need to restart it once the file has been changed.