【Oracle】更改oracle中的用户名称

修改oracle中的用户名,要需要修改oracle基表中的相关内容,

1.查看user#,

select user#,name from user$ s where s.name='用户修改前的';   --这里以HR为例

     USER# NAME
---------- ------------------------------
        21 HR

2.根据user#来修改用户名

update  user$ set name='修改后的用户名' where user#=21;  commit;

3.清一下share pool才可以生效

  alter system checkpoint;

  alter system flush shared_pool;

4.再次查看用户名

select user#,name from user$ s where s.name='HRRR';   --HRRR是HR修改后的用户名

     USER# NAME
---------- ------------------------------
        21 HRRR

5.如果需要修改密码的话,再进行密码的修改

alter user HRRR identified by "123456";   commit;

这样就彻底完成修改操作了



猜你喜欢

转载自blog.csdn.net/imliuqun123/article/details/80475823