Query 'dba_' tables through PL/SQL
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Query 'dba_' tables through PL/SQL

  1. #1
    Join Date
    Jan 2001
    Posts
    66
    Why am I not able to access dba_ tables from PL/SQL procedures or package bodies? The user has dba privileges. Am I only capable of doing this through an anonymous block?

    In a different database I am able to create a db link back its own db in order to access its dba_ tables. this is also not possible in the initial db - receives the following errors:

    ORA-04052-error occured whe looking up remote object BDOPS.DBA_DATA@BDOP_LINK.WORLD
    ORA-00604-error occurred at recursive SQL level 1
    ORA-02085-database link BDOP_LINK.WORLD connects to BDOP.WORLD

    db name = BDOP
    schema owner = BDOPS
    db link = BDOP_LINK.WORLD

    Any help would be appreciated.

  2. #2
    Join Date
    Jul 2000
    Posts
    296
    In stored procedures roles are disabled. You need SELECT privileges for the DBA_ tables granted directly to the owner of the procedure or to PUBLIC, not through a role.

    Probably the GLOBAL_NAMES parameter in your init.ora is TRUE. If this parameter is TRUE, the name of the database link has to be the same as the name of the remote database.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width