SQL> set autotrace on expSP2-0613: Unable to verify PLAN_TABLE format or existence SP2-0611: Error enabling EXPLAIN report
SQL> @'$ORACLE_HOME/rdbms/admin/utlxplan'
Table created.
SQL> create public synonym plan_table for plan_table;
Synonym created.
SQL> grant all on plan_table to public ;
Grant succeeded.
SQL> @'$ORACLE_HOME/sqlplus/admin/plustrce'SQL> drop role plustrace; drop role plustrace * ERROR at line 1: ORA-01919: role 'PLUSTRACE' does not exist
SQL> create role plustrace;
Role created.SQL> grant select on v_$sesstat to plustrace;
Grant succeeded.
SQL> grant select on v_$statname to plustrace;
Grant succeeded.
SQL> grant select on v_$session to plustrace;
Grant succeeded.
SQL> grant plustrace to dba with admin option;
Grant succeeded.SQL> set echo off SQL> grant plustrace to public ;
Grant succeeded.
SQL>
SQL> set autotrace on exp
只要通过ORACLE的JOB(运行时间可自定义)去运行过程就可以了。
为什么还是这样: SQL> @'E:\oracle\ora92\rdbms\admin\utlxplan.sql';Table createdSQL> create public synonym plan_table for plan_table;Synonym createdSQL> grant all on plan_table to public ;Grant succeededSQL> @'$ORACLE_HOME/sqlplus/admin/plustrce' Error reading fileSQL> @'E:\oracle\ora92\rdbms\admin\plustrce'; Error reading fileSQL> @'E:\oracle\ora92\rdbms\admin\plustrce.sql'; Error reading fileSQL> @'E:\oracle\ora92\sqlplus\admin\plustrce' drop role plustrace;drop role plustraceORA-01919: 角色'PLUSTRACE'不存在 create role plustrace;Role created grant select on v_$sesstat to plustrace;grant select on v_$sesstat to plustraceORA-00942: 表或视图不存在 grant select on v_$statname to plustrace;grant select on v_$statname to plustraceORA-00942: 表或视图不存在 grant select on v_$session to plustrace;grant select on v_$session to plustraceORA-00942: 表或视图不存在 grant plustrace to dba with admin option;Grant succeeded set echo offSQL> set autotrace on exp Cannot SET AUTOTRACESQL>
提示 ORA-01919: 角色'PLUSTRACE'不存在 create role plustrace; 你grant select on v_$sesstat to plustrace; 肯定不能成功啊首先用sys登录: 运行: @%oracle_home%\sqlplus\admin\plustrce然后把角色赋给需要使用的用户,比如scott: grant plustrace to scott;
运行: @%oracle_home%\sqlplus\admin\plustrce 成功 grant plustrace to cjq1018; 但是在cjq1018用户下还是这样: SQL> set autotrace on exp Cannot SET AUTOTRACE
这样不行吗?
SP2-0611: Error enabling EXPLAIN report
SQL> @'$ORACLE_HOME/rdbms/admin/utlxplan'
Table created.
SQL> create public synonym plan_table for plan_table;
Synonym created.
SQL> grant all on plan_table to public ;
Grant succeeded.
SQL> @'$ORACLE_HOME/sqlplus/admin/plustrce'SQL> drop role plustrace;
drop role plustrace
*
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist
SQL> create role plustrace;
Role created.SQL> grant select on v_$sesstat to plustrace;
Grant succeeded.
SQL> grant select on v_$statname to plustrace;
Grant succeeded.
SQL> grant select on v_$session to plustrace;
Grant succeeded.
SQL> grant plustrace to dba with admin option;
Grant succeeded.SQL> set echo off
SQL> grant plustrace to public ;
Grant succeeded.
SQL>
SQL> set autotrace on exp
SQL> @'E:\oracle\ora92\rdbms\admin\utlxplan.sql';Table createdSQL> create public synonym plan_table for plan_table;Synonym createdSQL> grant all on plan_table to public ;Grant succeededSQL> @'$ORACLE_HOME/sqlplus/admin/plustrce'
Error reading fileSQL> @'E:\oracle\ora92\rdbms\admin\plustrce';
Error reading fileSQL> @'E:\oracle\ora92\rdbms\admin\plustrce.sql';
Error reading fileSQL> @'E:\oracle\ora92\sqlplus\admin\plustrce'
drop role plustrace;drop role plustraceORA-01919: 角色'PLUSTRACE'不存在
create role plustrace;Role created
grant select on v_$sesstat to plustrace;grant select on v_$sesstat to plustraceORA-00942: 表或视图不存在
grant select on v_$statname to plustrace;grant select on v_$statname to plustraceORA-00942: 表或视图不存在
grant select on v_$session to plustrace;grant select on v_$session to plustraceORA-00942: 表或视图不存在
grant plustrace to dba with admin option;Grant succeeded
set echo offSQL> set autotrace on exp
Cannot SET AUTOTRACESQL>
ORA-01919: 角色'PLUSTRACE'不存在
create role plustrace;
你grant select on v_$sesstat to plustrace; 肯定不能成功啊首先用sys登录:
运行:
@%oracle_home%\sqlplus\admin\plustrce然后把角色赋给需要使用的用户,比如scott:
grant plustrace to scott;
@%oracle_home%\sqlplus\admin\plustrce
成功
grant plustrace to cjq1018;
但是在cjq1018用户下还是这样:
SQL> set autotrace on exp
Cannot SET AUTOTRACE