oracle change user name

Using the online method: as follows

1. Enter with the sysdba role account, and then query which users are:

SELECT * FROM user$

2. Find the user that needs to be modified (the user# field is the unique identifier)

SELECT * FROM user$ WHERE user#=71

 

3. Modify the username that needs to be changed

UPDATE USER$ SET NAME='new username' WHERE user#=71;
COMMIT;

 

4. Force refresh

ALTER SYSTEM CHECKPOINT;
ALTER SYSTEM FLUSH SHARED_POOL;

 

5. Change the password corresponding to the new user name (otherwise you cannot log in)

ALTER USER new username IDENTIFIED BY 'password';

 

'New user name' must be capitalized, with single quotation marks; (if not, the set user name is "new user name", including double quotation marks)

'Password' can be without double quotes.

Otherwise an unknown error will occur. (For example: table will have its own user name)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325483926&siteId=291194637