DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: View package body

  1. #1
    Join Date
    Oct 2002
    Location
    CA
    Posts
    67

    View package body

    What are the tables or views that allow you to see the text content of a package?
    --------------------------------------
    It's not what the world does to you that matters. It's how you respond...

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    Are you asking about the package, or the package body? One you can see, one you can't.

  3. #3
    Join Date
    Oct 2002
    Location
    CA
    Posts
    67

    View package

    Yes I want to see the code of a package.
    --------------------------------------
    It's not what the world does to you that matters. It's how you respond...

  4. #4
    Join Date
    May 2002
    Posts
    2,645
    Kind of a road map for you to follow:

    desc user_objects

    select object_name from user_objects (or all_objects or dba_objects)
    where object_type = 'PACKAGE';

    Using that name, do
    select text from user_source where name = 'NAME YOU JUST FOUND';

    You may have to do "set long 2000" (or whatever) to get all of the text to display.

  5. #5
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by stecal
    Are you asking about the package, or the package body? One you can see, one you can't.
    What do you mean? You can see the code of both the packages and their corresponding bodies. There is no difference between the two in this respect whatsoever.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  6. #6
    Join Date
    May 2002
    Posts
    2,645
    Package bodies are wrapped and you can only see the functional specs. All the code after the header comes out garbled.

  7. #7
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Originally posted by stecal
    Package bodies are wrapped and you can only see the functional specs. All the code after the header comes out garbled.
    Are you assuming that he is looking at sys packages? Yes, most of those are wrapped. But the rest can be seen through the views, as you know. I prefer to look at packages using either Enterprise Manager, 9i or DBA Studio 8i. It is a lot easier.

  8. #8
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by stecal
    Package bodies are wrapped and you can only see the functional specs. All the code after the header comes out garbled.
    As gandolf989 allready mentioned, you've made your conclusion based on wrong assumption .

    Package body is garbeled only if the owner has wrapped it.

    Besides, even if you are talking only about dictionary packages, you can't say: "you can see (in readable format) specs but you can't see bodies", because it is not true either. There are some DBMS packages that have also their specs wrapped, so you can't read them either.

    So again, there is absolutely no difference between package specification and package body when it comes to what can be read from *_SOURCE.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  9. #9
    Join Date
    May 2002
    Posts
    2,645
    Yes, that is correct. I was thinking in terms of what I am used to (our app has all package bodies wrapped). My bad.

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