connect internal/oracle
@D:\Oracle\Ora81\rdbms\admin\utlxplan
create public synonym plan_table for plan_table;
grant all on plan_table to public ;
@D:\Oracle\Ora81\sqlplus\admin\plustrce
drop role plustrace;
create role plustrace;
grant select on v_$sesstat to plustrace;
grant select on v_$statname to plustrace;
grant select on v_$session to plustrace;
grant plustrace to dba with admin option;
grant plustrace to public ;
关于Autotrace几个常用选项的说明:
SET AUTOTRACE OFF ---------------- 不生成AUTOTRACE 报告,这是缺省模式
SET AUTOTRACE ON EXPLAIN ------ AUTOTRACE只显示优化器执行路径报告
SET AUTOTRACE ON STATISTICS -- 只显示执行统计信息
SET AUTOTRACE ON ----------------- 包含执行计划和统计信息
SET AUTOTRACE TRACEONLY ------ 同set autotrace on,但是不显示查询输出
阅读(1283) | 评论(0) | 转发(0) |