Oracle: ORA-00942: "table or view does not exist" in SQL Developer in SQL Developer when i get session information he return me this error message: (ORA-00942: &quot;table or view does not exist&quot;). Can i resolve this with add grant to privilege of my user? Wich command use for wich table or view system?
Best Regards to all.
Fabio.
SQL Developer runs the below query (which you can check by clicking the Run Report in SQL Worksheet button) for its session browser:
with vs as (select rownum rnum,
                            inst_id,
                            sid,
                            serial#,
                            status,
                            username,
                            last_call_et,
                            command,
                            machine,
                            osuser,
                            module,
                            action,
                            resource_consumer_group,
                            client_info,
                            client_identifier,
                            type,
                            terminal,
                            sql_id,
                            sql_child_number
                       from gv$session) 
           select vs.inst_id, vs.sid ,serial# serial, vs.sql_id, vs.sql_child_number,
                  vs.username &quot;Username&quot;,
                  case when vs.status = 'ACTIVE' 
                            then last_call_et 
                       else null end &quot;Seconds in Wait&quot;,
                  (select command_name from v$sqlcommand where command_type = vs.command ) &quot;Command&quot;,
                  vs.machine &quot;Machine&quot;,
                  vs.osuser &quot;OS User&quot;, 
                  lower(vs.status) &quot;Status&quot;,
                  vs.module &quot;Module&quot;,
                  vs.action &quot;Action&quot;,
                  vs.resource_consumer_group,
                  vs.client_info,
                  vs.client_identifier
             from vs 
            where vs.USERNAME is not null
              and nvl(vs.osuser,'x') &lt;&gt; 'SYSTEM'
              and vs.type &lt;&gt; 'BACKGROUND'
              order by 1,2,3

Based on that, grants needed:
grant select on sys.gv_$session to your_user;
grant select on sys.v_$sqlcommand to your_user;

You may need additional privileges for other options.