1、以sys运行$ORACLE_HOME/sqlplus/admin/plustrce.sql
2、在user用户下运行$ORACLE_HOME/rdbms/admin/utlxplan.sql,用于建plan_table表,并Grant PLUSTRACE to user
参数:
SET AUTOTRACE OFF : No AUTOTRACE report is generated. This is the default.
SET AUTOTRACE ON EXPLAIN : The AUTOTRACE report shows only the optimizer execution path.
SET AUTOTRACE ON STATISTICS : The AUTOTRACE report shows only the SQL statement execution statistics.
SET AUTOTRACE ON : The AUTOTRACE report includes both the optimizer execution path and the SQL statement execution statistics.
SET AUTOTRACE TRACEONLY : Like SET AUTOTRACE ON, but suppresses the printing of the user's query output, if any.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-84320/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/35489/viewspace-84320/
博客介绍了在Oracle中的操作,先以sys运行plustrce.sql,再在user用户下运行utlxplan.sql建表并授权。还列举了SET AUTOTRACE的不同参数设置,如OFF、ON EXPLAIN、ON STATISTICS等,各有不同作用。
761

被折叠的 条评论
为什么被折叠?



