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修改

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章