Toad World® Forums

Minimum rights for "Session Browser"

Hello,

as a developer I’d like to use the “Session Browser” to intercept statements send from my program to the database. Furthermore I’d like to see the “Long Ops” to get a hint where to improve my sql.

Unfortunately my DBA did not grant me needed rights to query the database. He asked me to name him the views / tables that I need read access to. Can you give me a list od required rights to enable the “Session Browser” to show me the wanted?

Best regards
Entropy

To see everything in the session browser, this is your list of views that you need to be able to select from:

V$SESSION, V$PROCESS,
V$SESS_IO, V$SESSION_WAIT, V$SESSION_EVENT, V$ACCESS, V$SESSTAT,
V$STATNAME, V$OPEN_CURSOR, V$SQL, V$LOCK, V$SESSION_LONGOPS,
V$TRANSACTION, V$ROLLNAME, V$SQLTEXT_WITH_NEWLINES, DBA_ROLLBACK_SEGS;
if Oracle version >= 10 then these are also required:
V$EVENTMETRIC, V$EVENT_NAME, V$SESSION_EVENT
if Oracle version >= 11 then these are also required:
V$SESSION_CONNECT_INFO;

“Long Ops” is just a listing of the V$SESSION_LONGOPS view. These aren’t necessarily things that need tuning, they just take a long time (or were added to the long ops list by the user).

If you want to tune your SQL, put it into one of Toad’s SQL Tuning windows. Sometimes these things take a bit of analysis, so we can’t just stick the answer in with the long ops of the session browser.

First of all, thanks for your fast answer.

Since we have not bought the “SQL tuning module” and neither we have the rights granted to use the “Oracle Tuning Advisor” I usual stare at the Long Ops and Wait Locks to get a feeling for what it might be causing the trouble. The second (and probably the better way) is to examine the execution plan, but that can be annoying if the statement is huge and the plan complex. If you know of any more possibility to let Toad “auto suggest” tuning tips I’d be glad to hear of it.

But I’m now way off the purpose of my initial question (which was answered to my full satisfaction :wink: ) … so, thanks again for your answer

Keep in min this as well:

SQL>grant select on sys. V$SESSION to XXX;
grant select on sys. V$SESSION to XXX
*
ERROR at line 1:
ORA-02030: can only select from fixed tables/views

Elapsed: 00:00:00.07
SQL>

To overcome this, please read article…like:

https://coskan.wordpress.com/2007/03/07/how-to-grant-to-v-views/

Brg
Damir