Plsql Dev in dynamic performance Tables not accessible analysis resolution (RPM)

Source: Internet
Author: User

Many friends who use Plsql Dev have encountered this kind of hint as follows:

The reason why Plsql Dev collects user statistics while the user is running, but because the user you are currently logged on does not have permission to access the V$session,v$sesstat and V$statname view, So it is not possible to collect statistics for the current user and conflict with the automatic statistics configured in the Plsql dev tool, so this prompt appears and the test verifies that:

[[email protected] ~]$ sqlplus/as sysdbasql*plus:release  11.2.0.3.0 Production on Thu Nov 04:31:57 2011Copyright (c) 1982,, Oracle. All rights reserved. Connected to:oracle Database 11g Enterprise Edition Release 11.2.0.3.0-productionwith The partitioning, OLAP, Data Minin G and Real Application testing Options[email protected]>create user CHF identified by Xifenfei; User created. [Email protected]>grant create Session,resource to CHF; Grant succeeded. [Email protected]>conn chf/xifenfeiconnected. [Email protected]>select * from Session_privs; PRIVILEGE----------------------------------------CREATE sessionunlimited tablespacecreate tablecreate Clustercreate sequencecreate procedurecreate triggercreate typecreate operatorcreate INDEXTYPE10 rows selected. [Email protected]>select table_name from user_tab_privs;no rows selected 

Create a CHF user, authorize Create Session,resource, no V$session,v$sesstat and v$statname view access, use Plsql Dev login and query the User_tables table ( You will not be prompted when you log in, only the user will be prompted when the query or related class is executed)
select * from User_tables;

second, solve the problem
Depending on the warning, there are two ways to resolve this warning
1, close Plsql Dev statistics function in the Tools->preferences->options automatic statistics before the hook removed, save
2, to access the user authorized access to the relevant view authorized access to V_$session,v_$sesstat,v_$statname, note that the v$ view can not be directly authorized



To cancel a permission:

Revoke Select  on  from hr; Revoke Select  on  from hr; Revoke Select  on  from hr; Revoke Select  on  from HR;

http://blog.csdn.net/Cryhelyxx/article/details/41924615

three, problem analysis with the workaround above, why is authorization to access the V$session,v$sesstat and V$statname view to statistics the user's information? See the following two figures
Figure 1: Viewing user statistics through the tools–>session option in Plsql dev


The comparison between the two graphs may find that their values are a little bit in and out, that is because I first through tools to query the user statistics, and then through the SQL query, so the data in Figure 1 is a little bit smaller than Figure 2, through the V$session,v$sesstat and v$ Statname view analysis, found that in fact, Plsql Dev is the following SQL to achieve statistical functions, but also to further explain why Plsql Dev collects statistics need to v$session,v$sesstat and v$ Statname View granted access rights

SELECT c.name, b.statistic#, b.value from  v$session A, V$sesstat B, v$statname C WHERE a.sid = b.sid and   a.audsid = USERENV (' SESSIONID ') and   b.statistic# = c.statistic#   ORDER by c.statistic#;

Http://www.xifenfei.com/1822.html

Plsql Dev in dynamic performance Tables not accessible analysis resolution (RPM)

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.