Instance code for Oracle 11g User Password modification and lock/unlock function, oracle11g
1. Run cmd.exe;
2. Enter sqlplus/as sysdba to connect to the database as a system administrator (sysdba) for database management.
3. After successful connection, run
Alter user identityName identified by password; -- Change password alter user identityName account unlock; -- unlock alter user identityName account lock; -- lock identityName: user to be modified; password: new password;
Complete
PS: Unlocking and locking for oracle 11G users (hr Mode)
SQL> conn sys/sys as sysdbaConnected. SQL> show userUSER is "SYS" SQL> alter user hr account unlock; (unlock) User altered. SQL> alter user hr identified by * password *; (this step is required to change the password; otherwise, the hr mode still cannot be used) User altered. here the hr mode can be used. Try: SQL> conn hr/* password * Connected. SQL> show userUSER is "HR" -------------------------------- the opposite SQL> alter user hr account lock; (locked) User altered. SQL> alter user hr password expire; (the password is invalid) User altered. SQL> conn hr/* password * ERROR: ORA-28000: the account is lockedWarning: You are no longer connected to ORACLE.
Summary
The above is the example code of the Oracle 11g User Password modification and lock/unlock function introduced by the editor. I hope it will help you. If you have any questions, please leave a message for me, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!