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

How to modify user in oracle

WBOY
Release: 2022-01-25 17:18:13
Original
9864 people have browsed it

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
Copy after login

78 TEXT 21EDA78F89D6FACD

Change the user name

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

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.
Copy after login

And change the user login password.

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template