Oracle 9i open autotrace on to view the execution plan

Source: Internet
Author: User

1. Create a table and run the utlxplan script SQL> @? /Rdbms/admin/utlxplantable created. 2. create a synonym so that multiple users can share one plan_table and authorize it to public SQL> Create public synonym plan_table for plan_table; synonym created. SQL> grant all on plan_table to public; grant succeeded. 3. create a plustrace role SQL> @? Run/sqlplus/admin/plustrce. SQL to execute this script.

SQL> drop role plustrace;
drop role plustrace
*
error at line 1:
ORA-01919: role 'plustrace 'does not existsql> Create role plustrace; role created. SQL>
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 _ $ mystat to plustrace; grant succeeded. SQL> grant plustrace to DBA with admin option; grant succeeded. SQL>
SQL> set echo off 4. Grant the role permission to public SQL> grant plustrace to public; after completing the preceding steps, you can use the autotrace function set autotrace off. By default, set autotrace on is disabled to view the execution plan and query information. Set autotrace traceonly only displays the execution plan, but no query output is displayed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.