Below script can be used to take a backup of encrypted password for oracle databases users
sqlplus "/as sysdba "
@/opt/generate_pass_file.txt
-------------------------------------------------------------------------------------------------------------
vi /opt/generate_pass_file.txt ( copy below conetent into generate_pass_file.txt)
-- Use below script to spool encrypated password for entire users of the database and can be reverted later to reset to original password
set pagesize 0
set heading off
set feedback off
spool '/opt/generate_encrp_passwords.sql';
select 'alter user '||username||' identified by values '||chr(39)||password||chr(39)||';' from dba_users
order by username;
spool off
exit
----------------------------------------------------------------------------------------------------------------
sqlplus "/as sysdba "
-----to reset to original password execute the spool file-------
@/opt/generate_encrp_passwords.sql
No comments:
Post a Comment