ORACLE change username

Source: Internet
Author: User

Oracle has been constantly changing user password, but very few changes username.

Once only can create a user 1. The user 2 data is then imported into user 1. Then deleted by the user 1, this is cumbersome and time-consuming, today to sort out how to change the Oracle's username:

1, enter with SYSDBA role account, and then query which users:

SELECT * from user$

2. Find the user who needs to be changed (the user# field is a unique identifier)

SELECT * from user$ WHERE user#=


3, changes need to change the username

UPDATE user$ SET name= ' new username' WHERE user#=;
COMMIT;


4. Forced refresh

ALTER SYSTEM CHECKPOINT;
ALTER SYSTEM FLUSH Shared_pool;

5, then the new username corresponding to the password changes (otherwise unable to login)

ALTER USER new username identified by 'password';

6, to this point. Done. Ok!



ORACLE change username

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.