Oracle修改用户名和密码
Oracle数据库复制或克隆后,经常需要修改用户名和密码,下面总结下修改的方法和步骤:
1、查询系统表USER$
SELECT NAME,USER# FROM user$ WHERE UPPER(TRIM(NAME)) = 'USER NAME';
2、修改用户名
UPDATE user$ SET NAME = 'NEW NAME' WHERE USER# =(SELECT USER# FROM user$ WHERE UPPER(TRIM(NAME)) = 'USER NAME');
COMMIT;
3、清除缓存
ALTER SYSTEM CHECKPOINT;
ALTER SYSTEM FLUSH SHARED_POOL;
COMMIT;
4、修改用户密码并解除账户锁定
ALTER USER USERNAME IDENTIFIED BY 'NEW PASSWORD';
ALTER USER USERNAME ACCOUNT UNLOCK; --解除账户锁定
COMMIT;
修改完毕~~~使用新用户和秘密登录即可……
相关推荐
胡献根 2020-07-05
troysps 2020-06-13
shayuchaor 2020-06-10
dengweijunkedafu 2020-06-09
Andrew代码战士 2020-06-08
TONIYH 2020-05-25
PlumRain 2020-05-10
Cloudeep 2020-04-15
inhumming 2020-04-10
末点 2020-03-06
hpujsj 2020-03-03
airfling 2020-03-01
ITfooter 2020-02-23
Justdoit00 2020-02-16