Dynamic Performance tables not accessible...

Source: Internet
Author: User

Error:

Current solution:

Description:
When you execute a statement in a SQL window or in a test window, PL/SQL developer will
Automatically generate a statistic report of this execution. One condition is that you need to have select
Privileges on the dynamic performance tables v $ session, V $ statname and V $ sesstat (provided through

The standard plustrace role ).

You can view the statistic report by changing to the Statistics tab at the top of the SQL window or test
Window.

References: http://space.itpub.net/519536/viewspace-614671

[Troubleshooting] PL/SQL developer reports the error dynamic performance tables not accessible
Today, several colleagues from the development team reported to me that the following error (PL/SQL developer version: 7.1.5 1403 ):
Dynamic Performance tables not accessible,
Automatic statistics disabled for this session
You can disable statistics in the preference menu, or obtain select
Priviliges on the V $ session, V $ sesstat and V $ statname tables
This error message will appear in different PL/SQL developer versions. From the detailed error message above, we can determine that the cause of the error is not the tool itself.
Here, we will record in detail the three solutions to this small problem.
1. solution 1 (not recommended)
In the error dialog box, select the "don't show this message again" option. This error will not be prompted next time.
This method can be called the "Ostrich method. This problem is not fundamentally solved.
2. method 2 (acceptable)
The error message is very detailed because the dynamic performance table does not have the right to be accessed. Therefore, we can solve this problem by assigning the required access permissions to specific users.
Here are three specific solutions that I can think. You can continue to add.
1) if a specific user has the permission to query these three dynamic performance views, perform the following operations:
Note: The authorization view is V _ $ session, not V $ session, because V $ session has the same name and is not a specific view. Otherwise, you will receive the following error.
Sys @ ora10g> 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 following "simple and crude" method to handle it.
SQL> grant select any dictionary to user_sec;
3) the above two methods are for specific users. If you want all users (not limited to the above user_sec users) to be able to query these three dynamic performance views, you can grant the query permission to the public method as follows. This ensures that all developers will no longer receive 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. Method 3 (recommended)
Disable PL/SQL developer.
The method is as follows:
Navigate to tools --> preferences --> options
Find the "Automatic Statistics" option, remove the small check box above it, and click "Apply" and "OK" to save and exit.
4. Summary
The reason why I wrote this article is just to give a general method to solve the problem. This is: "fully explore the specific error information, start with various superficial phenomena, and gradually go deeper to get a satisfactory result."
Finally, let's talk about the relationship between dBA and database management and development tools (such as PL/SQL developer and toad.
If you are a pure DBA developer, it is strongly recommended that you carefully study every detail of these excellent advanced tools, because this can greatly improve your work efficiency.
If you maintain your DBA only, you can see good news and bad news.
The good news is:
You are powerful enough to rely on these tools. Because the customized functions provided by these tools are far from satisfying your thirst for database details. In addition, even in the "General" extreme Fault Handling Site, do you think it is possible to use these tools to connect to the DB? The rest may only have a sweat and a sigh of helplessness. You may only realize at that time: the real life-saving straw is the mysterious SQL * Plus command line tool;
Bad news:
Cherish DBA life, please stay away from these tools!
The end-

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.