【YashanDB知识库】通过导入导出修改用户名称

本文内容来自YashanDB官网,原文内容请见 https://www.yashandb.com/newsinfo/7281313.html?templateId=171...

YashanDB中不支持直接修改用户名称,但可以通过导入导出间接修改用户名称。

以下已将用户test修改为test01为例:

1、通过exp备份test用户

exp test/[email protected]:1688 file=/home/yashan/test.dump owner=test

2、删除test用户

DROP USER test CASCADE;

3、新建test01用户并授权

create user test01 identified by yasdb_123;

grant connect to test01;

grant resource to test01;

grant create view to test01;

4、将test备份文件导入到test01用户

注:导入时数据库用户必须拥有DBA角色权限

imp sys/[email protected]:1688 file=/home/yashan/test.dump fromuser=test touser=test01

你可能感兴趣的:(数据库)