1

When I run first query in PL/SQL Developer I got the error:

Dynamic Performance Tables not accessible,
Automatic Statistics disabled for this session
You can disable statistics in the preference menu, or obtain select
privileges on the v$session, v$sesstat and v$statname tables

How can I fix the error?

Colin 't Hart
9,51015 gold badges37 silver badges44 bronze badges
asked May 5, 2014 at 11:11
1
  • 3
    The third line you posted above tells you how to fix it. no? Commented May 5, 2014 at 11:35

1 Answer 1

3

It seems your question contains the answer.

By default PL/SQL Developer gathers statistical data per session for every query.
In the SQL Window and in the debugger's Test Window you can use the Statistics page to view the resources used by the last executed SQL statement or program unit. This information can be a big help when optimizing your SQL or PL/SQL code.
enter image description here
If the user you have logged in, dose not heve the privilege to query on v$ views (as described in the error description) you will not be able to see the statistics result in Test Window and the message will be shown.
To solve the problem you may choose any of the approaches bellow:

  • Grant the user the privilege to select on desired v$ views.
    GRANT SELECT ON sys.V_$SESSION TO scott;
    GRANT SELECT ON sys.V_$SESSTAT TO scott;
    GRANT SELECT ON sys.V_$STATNAME TO scott;

  • Or disable automatic statistics in PL/SQL Developer in preferences menu.

enter image description here

Colin 't Hart
9,51015 gold badges37 silver badges44 bronze badges
answered May 5, 2014 at 11:49

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.