Modify the database username at Oracle11g

Source: Internet
Author: User
It is found that oracle11g provides the new feature of user rename. In a 10g environment, if you want to rename a user, it is generally to create a new user and authorize the original

It is found that oracle 11g provides new features for user rename. In a 10g environment, if you want to rename a user, it is generally to create a new user and authorize it first, and then

I recently looked at a blog and found that Oracle 11g provided the new feature of user rename. In a 10g environment, if you want to rename a user, you should first create a new user and authorize it, import all objects under the original user and delete the old user! Next we will introduce this new feature in the 11g rac environment!

1. Create a test user xxx and write the test data. The spfile file generates the pfile file to close the rac database.

  • 2. Modify the pfile file and add the implicit parameter *. _ enable_rename_user = 'true' to start the database in restrict mode.

  • 3. Change xxx user name to yyy

  • 4. Use spfile to start rac

  • SQL> shutdown immediate;
  • Database closed.
  • Database dismounted.
  • ORACLE instance shut down.
  • [Oracle @ node1 dbs] $ srvctl start database-d rac
  • [Oracle @ node1 dbs] $ srvctl status database-d rac
  • Instance node1 is running on node node1
  • Instance node2 is running on node node2
  • V. connection test. Therefore, the user's rename operation can inherit the original permissions.

  • 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.