First, the cause of the prompt
Plsql Dev collects user statistics while the user is running, but because the user you are currently logged on does not have access to the V$session,v$sesstat and V$statname view, the current user's statistics cannot be collected, and the Plsql The automatic statistics is configured in the Dev tool to conflict, so this hint appears and the test verifies that:
[[email protected] ~]$ sqlplus/ asSYSDBA SQL*Plus:release11.2.0.3.0Production onThu NovTen Geneva: to: $ .Copyright (c)1982, ., Oracle. Allrights reserved. Connected to: OracleDatabase11g Enterprise Edition Release11.2.0.3.0 -Production withThe partitioning, OLAP, Data Mining and RealApplication Testing Options SYS@XFF>Create UserCHF identified byXifenfei;Usercreated. SYS@XFF>Grant CreateSession,resource toCHF;Grantsucceeded. SYS@XFF>CONN CHF/XIFENFEICONNECTED.CHF@XFF>Select * fromSession_privs; PRIVILEGE----------------------------------------CREATEsessionunlimited tablespaceCREATE TABLECREATECLUSTERCREATESEQUENCECREATE PROCEDURECREATE TRIGGERCREATETYPECREATEOPERATORCREATEIndextypeTenrows selected. CHF@XFF>SELECTtable_name fromuser_tab_privs; no rows selected
Create a CHF user, authorize Create Session,resource, no V$session,v$sesstat and v$statname view access, log in with Plsql Dev and query the User_tables table (no prompt at logon , only the user will be prompted when the query is executed or the related class is performed)
Second, solve the problem
Depending on the warning, there are two ways to resolve this warning
1. Turn off Plsql dev stats function
Remove the hook from the automatic statistics before the tools->preferences->options, save
2, authorized access to access the relevant views of the user
Authorized access to V_$session,v_$sesstat,v_$statname, note that the v$ view cannot be authorized directly
Chf@XFF>Conn/ asSysdbaconnected.sys@XFF>Grant Select onV_$session toCHF;Grantsucceeded. SYS@XFF>Grant Select onV_$sesstat toCHF;Grantsucceeded. SYS@XFF>Grant Select onV_$statname toCHF;Grantsucceeded. SYS@XFF>CONN CHF/xifenfeiconnected. CHF@XFF>SELECTtable_name fromUser_tab_privs; TABLE_NAME------------------------------V_$sessionv_$sesstatv_$statname
Reprint Address: http://www.xifenfei.com/1822.html
PL/SQL connection query data error when dynamic performance Tables not accessible