Home  >  Article  >  Database  >  How to modify user in oracle

How to modify user in oracle

WBOY
WBOYOriginal
2022-01-25 17:18:139800browse

Method: 1. Use the statement "update user$ set name='new username' where name='old username'" to modify the user name; 2. Use "alter user username identified by 'new password The ';' statement changes the user password.

How to modify user in oracle

The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.

How to modify the user in oracle

For example, if you want to change the user TEXT to TEXT_BAK:

SQL> select user#,name,password from user$ where name ='TEXT';
USER# NAME PASSWORD

78 TEXT 21EDA78F89D6FACD

Change the user name

SQL> update user$ set name='TEXT_BAK' where user#=78;
1 row updated.
SQL> commit;
Commit complete.

After changing the user name, you need to clear the cache data dictionary information.

SQL> alter system checkpoint; ----强制写入数据文件
System altered.
SQL> alter system flush shared_pool; ----清楚缓存数据字典信息,强制oracle读实际数据(即更改后的数据)
System altered.

And change the user login password.

SQL> alter user TEXT_BAK identified by 'aaaaaa';
User altered.

Recommended tutorial: "Oracle Video Tutorial"

The above is the detailed content of How to modify user in oracle. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn