If you need to set AUTOTRACE feature ON, you need PLAN tables created for sure. So, how do you create plan tables.
Which script ?
The script for creating Plan table is in $ORACLE_HOME\rdbms\admin\utlxplan.sql.
Where to create ?
Create the PLAN_TABLE by using utlxplan.sql in the schema where you need to enable trace and run the query.
What else is required ?
Also, create the ROLE named PLUSTRACE using a script in sqlplus\admin directory.
Grant this role to the user for whom you have created PLAN_TABLE.
Thats it ! login, run
SQL> set autotrace trace
You should be seeing the query plans.
No comments:
Post a Comment