Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • by dhorne (7824) on 2007.04.11 17:30 (#54374)
    What about using all_source or all_objects?
    • I had forgotten about those but most DBAs are reluctant to give grant select on any of the SYS owned stuff if they can help it.
      • The all_* virtual tables should give you access to everything you own (as with user_*), plus what you have been granted by other users.

        To be honest, I wasn't aware of SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA'). Good to add to my bag o' tricks ;-)
        • I knew about SYS_CONTEXT because that's part of the magic behind Virtual Private Databases. I designed and coded one at work.
    • This doesn't work for the scenario for which I needed this. I have two identical packages in two schemas. Same name, same lines of code. I need the code in the package to determine the name of the package owner and query a table looking for rows where a field is set to the name of the owner.

      If I query one of the _SOURCE views (or better yet, one of the _OBJECT views), I'll find both packages and both owners, and still have no way of knowing which one I'm running in. :)

      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers