Oracle Error: Dynamic execution table is inaccessible, automatic statistics is disabled for this session, and problems after automatic statistics are turned off

Source: Internet
Author: User

When using PL/SQL, the first time you open the table, you will be prompted to "dynamic execution table is inaccessible, automatic statistics of this session is forbidden" error, a message is as follows: V$session,v$sesstat,v$statname is not authorized, do not have access to these tables, So there is no statistic in this law.

Granted, of course. Authorized SQL is as follows:

Sqlplus/nolog Enter the login page, and then execute Conn/as sysdba log on to the SYS user

Log in with SYS, authorize to the appropriate user, use the following statement
Grant SELECT on V_$statname to Scott;
Grant SELECT on V_$sesstat to Scott;
Grant SELECT on V_$session to Scott;
Grant SELECT on V_$mystat to Scott;

Cancel Permissions

Revoke select on V_$statname from Scott;
Revoke select on V_$sesstat from Scott;
Revoke select on V_$session from Scott;
Revoke select on V_$mystat from Scott;

Oracle Error: Dynamic execution table is inaccessible, automatic statistics is disabled for this session, and problems after automatic statistics are turned off

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.