Instance code for Oracle 11g User Password modification and lock/unlock function, oracle11g

Source: Internet
Author: User

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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.