一、需求
将test用户名修改为test1
二、步骤
方法一:针对所有版本
select user#,name from user$ where name='TEST';
update user$ set name ='TEST1' where user#=159;
commit;
alter system checkpoint;
alter system flush shared_pool;
alter user test1 identified by test1;
方法二:针对 oracle 11.2.0.2之后版本
alter system set "_enable_rename_user"=true scope=spfile;
shutdown immediate;
startup restrict force;
alter user test rename to test1 identified by test1;
alter system disable restricted session;
conn test1/test1;
conn / as sysdba
alter system reset "_enable_rename_user";
shutdown immediate;
startup;