Re: ORA-00942: table or view does not exist for v$session.

From: <epokopac_at_gmail.com>
Date: Fri, 12 Feb 2016 07:39:56 -0800 (PST)
Message-ID: <0270ba6a-000f-448a-82c2-d5b5613fd180_at_googlegroups.com>


Try dropping "SYS." from before the v$session synonym in your procedure.

Results via plain old SQL*Plus:

SYSTEM_at_SGDV>SELECT COUNT(*) cnt,status FROM SYS.v$session GROUP BY status ; SELECT COUNT(*) cnt,status FROM SYS.v$session GROUP BY status

                                    *

ERROR at line 1:
ORA-00942: table or view does not exist

SYSTEM_at_SGDV>SELECT COUNT(*) cnt,status FROM v$session GROUP BY status ;

       CNT STATUS
---------- --------

        29 ACTIVE
        19 INACTIVE


The devil is in the details. Public Synonyms are owned by the PUBLIC owner. Received on Fri Feb 12 2016 - 16:39:56 CET

Original text of this message