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>

原文地址:https://www.cnblogs.com/ritchy/p/15194454.html