oracle 更改schema名

1、用sysdba账号登入数据库,然后查询到要更改的用户信息:
  SELECT user#,name FROM user$;
2、更改用户名并提交:
update user$ set name='demokygs' where user#=111;
COMMIT;
3、强制刷新:
ALTER SYSTEM CHECKPOINT;
ALTER SYSTEM FLUSH SHARED_POOL;
4、更新用户的密码:
ALTER USER PORTAL IDENTIFIED BY "test23";

alter system set "_enable_rename_user"=true scope=spfile;
startup restrict force;
alter user kygs rename to demokygs identified by "test23";

19.10以后禁止以上更改,只能通过expdp、impdp修改

 

posted @ 2024-04-12 18:43  刚好遇见Mysql  阅读(75)  评论(0编辑  收藏  举报