Set SQL PLUS AutoTrace

Source: Internet
Author: User


Set SQL plus AutoTrace Initial Setup1. Step 1: This is what I like to do to get AUTOTRACE working: • cd [ORACLE_HOME]/rdbms/admin www.2cto.com • log into SQL * Plus as SYSTEM • run @ utlxplan • run CREATE PUBLIC SYNONYM PLAN_TABLE FOR PLAN_TABLE; • run GRANT ALL ON PLAN_TABLE TO PUBLIC; 2. step 2 The next step is creating and granting the PLUSTRACE role: • cd [ORACLE_HOME]/sqlplus/admin • log into SQL * Plus as SYS Or as sysdba • run @ plustrce www.2cto.com • run grant plustrace to public; Again, you can replace PUBLIC in the GRANT command with some user if you want. can I run scripts in sqlplus? It indicates $ ORACLE_HOME. You can SET plblic to a user. in step 2, you must use SYS's description of several common options of Autotrace: set autotrace off ---------------- no AUTOTRACE report is generated, this is the default mode set autotrace on explain ------ AUTOTRACE only displays the optimizer execution path report set autotrace on statistics -- only displays the execution statistics set autotrace on ----------------- contains the execution plan and statistical information set autotrace traceonly ------ same as set autotrace on, however, the query output is not displayed.

Related Article

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.