PL/SQL (MOSC)

MOSC Banner

Can not query v$pdbs and DBA_PDBS from PLSQL blocs

in PL/SQL (MOSC) 8 commentsAnswered

Hi everyone,

Problem encountred in R12.2.10 with 19c database

i'm facing a strange issue :

If i query v$pdbs and DBA_PDBS from my "APPS" schema session i get results, but when i create a PLSQL BLOC (Function, Procedure, or Package) with same query, the ORA-00942: Table or vue doesn't exist message appears.

Code sample :

CREATE OR REPLACE FUNCTION GET_ENV_NAME RETURN VARCHAR2 AS

PDB_NAME VARCHAR2(50);

BEGIN

select NAME

INTO PDB_NAME

from v$pdbs;

RETURN pdb_name;

END;

The same problem with DBA_PDBS ! Any suggestions please ?

Regards,

Moussa

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center