impdp 迁移报错 ORA-01919: role 'PLUSTRACE' does not exist

impdp 迁移报错 ORA-01919: role 'PLUSTRACE' does not exist

异常提示
ORA-39083: Object type ROLE_GRANT failed to create with error:
ORA-01919: role 'PLUSTRACE' does not exist
Failing sql is:
GRANT "PLUSTRACE" TO "TEST1"
ORA-39083: Object type ROLE_GRANT failed to create with error:
ORA-01919: role 'PLUSTRACE' does not exist
Failing sql is:
GRANT "PLUSTRACE" TO "TEST2"

手工执行脚本,在服务器上找到 plustrce.sql,一行命令搞定
PRIMARY-SYS@testdb>@/u01/app/oracle/product/11.2.0/db_1/sqlplus/admin/plustrce.sql
PRIMARY-SYS@testdb>
PRIMARY-SYS@testdb>drop role plustrace;
drop role plustrace
*
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist


PRIMARY-SYS@testdb>create role plustrace;

Role created.

PRIMARY-SYS@testdb>
PRIMARY-SYS@testdb>grant select on v_$sesstat to plustrace;

Grant succeeded.

PRIMARY-SYS@testdb>grant select on v_$statname to plustrace;

Grant succeeded.

PRIMARY-SYS@testdb>grant select on v_$mystat to plustrace;

Grant succeeded.

PRIMARY-SYS@testdb>grant plustrace to dba with admin option;

Grant succeeded.

PRIMARY-SYS@testdb>
PRIMARY-SYS@testdb>set echo off
PRIMARY-SYS@testdb>

posted @ 2021-08-27 16:59  ritchy  阅读(457)  评论(0编辑  收藏  举报