Pl\sql "Dynamic execution table is inaccessible, automatic statistics for this session are forbidden" when open

Source: Internet
Author: User

This error message in different PL/SQL Developer version will appear, from the above detailed error message information can be judged that the cause of the error is not the tool itself.

Here, take a detailed look at the three ways to deal with this small problem.

1. First processing method (not recommended)

This is the error in the error dialog box "Don t show this message again" option is selected, the next time will not be prompted this mistake.

This method should be called the "ostrich Way" processing method. There is no fundamental solution to this problem.

2. Second method of treatment (can be adopted)

The error message is described in great detail because the dynamic performance table does not have the right to be accessed because of the problem, so we solve the problem by assigning the required access rights to the specific user.

Here are three specific ways I can think of. We can continue to add.

1) If only a specific user has permission to query these three dynamic performance views, you can do the following

Note here: The view that we authorize is v_$session not v$session, because v$session is not a specific view with the same name. Otherwise you will receive the following error.

[Email protected]> Grant Select on V$session to User_sec;

Grant SELECT on V$session to User_sec

*

ERROR at line 1:

Ora-02030:can only select from fixed tables/views

The correct authorization method is as follows:

Sql> Grant Select on V_$session to User_sec;

Sql> Grant Select on V_$sesstat to User_sec;

Sql> Grant Select on V_$statname to User_sec;

2) You can use the "simple Brute" method below to deal with it.

Sql> Grant SELECT any DICTIONARY to user_sec;

3) The above two methods are specific to the user's processing method, if you want all users (not limited to the above USER_SEC users) can query these three dynamic performance views, can be implemented by authorizing the query permissions to the public method, the operation is as follows. This will ensure that all developers will not have the above error message.

Sql> Grant Select on V_$session to public;

Sql> Grant Select on V_$sesstat to public;

Sql> Grant Select on V_$statname to public;



3. Third method (recommended)

Completely disable the function of PL/SQL developer.

Here's how:

Navigate to Tools-Preferences (preferences)-options

Find the "Automatic Statistics (auto stats)" option, remove the small checkmark in front of it, then click "Apply" and "OK" to save the exit.

Pl\sql Open when the dynamic execution table is inaccessible, automatic statistics for this session are disabled

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.