How to view package body in sqlDeveloper

Hi everyone, I am able to use popup describe to view a PL SQL package definiton in SQL developer.
My problem is how to view the package body easily. In TOAD, say I have a package called XX_TOAD with a procedure get_name, I can type in XX_TOAD.get_name in the editor and describe it to show the package body.
Is there an easy way to view the package body in SQL developer without having the browse the database objects?
Thanks

Type the package name in the Sand select the package /procedure and press SHIFT + F4. A new window will open displaying the package script
--rsrini                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Why i cant view package body ?

    hi all,
    i cant view package body in my pl/sql.
    pls help.
    tks.

    It'isn't yours then!!
    So try this
    SELECT TEXT
    FROM ALL_SOURCE
    WHERE ( OWNER,NAME ) IN (
         SELECT OWNER,NAME
         FROM (
                   SELECT USER AS OWNER,OBJECT_NAME AS NAME
                   FROM USER_OBJECTS
                   WHERE OBJECT_NAME = :NAME
                        AND OBJECT_TYPE <> 'SYNONYM'
                   UNION ALL
                   SELECT TABLE_OWNER,TABLE_NAME
                   FROM USER_SYNONYMS
                   WHERE SYNONYM_NAME = :NAME
                   UNION ALL
                   SELECT TABLE_OWNER,TABLE_NAME
                   FROM ALL_SYNONYMS
                   WHERE SYNONYM_NAME = :NAME
                   AND OWNER = 'PUBLIC'
         WHERE ROWNUM=1
    ) AND TYPE = 'PACKAGE BODY'
    ORDER BY LINEBye Alessandro

  • Issue with viewing Package Body  in SQL Developer 2.1 RC1

    Were anybody able to see the package body of other user in 2.1 RC1.
    I had an issue since 2.1 EA 1 so... just curious.
    - Oracle 9i
    - Windows XP SP3
    Please do let me know if there is any hint or setting that can be change to view the package body.
    Thanks!

    Thanks for your msg.
    Below is the info:
    1.
    SQL: SELECT * FROM v$version;
    Result:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
    PL/SQL Release 9.2.0.8.0 - Production
    "CORE     9.2.0.8.0     Production"
    TNS for Solaris: Version 9.2.0.8.0 - Production
    NLSRTL Version 9.2.0.8.0 - Production
    2.
    Result:
    The account has 'EXECUTE' privilege on the package.
    3.
    SQL: SELECT username "User"
    ,granted_role "Granted_Role"
    ,initcap(admin_option) "Admin_Option"
    ,initcap(default_role) "Default_Role"
    FROM user_role_privs
    ORDER BY username
    ,granted_role;
    Result:
    User``````````Granted_Role```````````Admin_Option``Default_Role
    ~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~
    USER_NAME```SELECT_CATALOG_ROLE``No````````````Yes
    4.
    SQL:
    SELECT privilege "Privilege"
    ,initcap(admin_option) "Admin_Option"
    FROM user_sys_privs
    ORDER BY privilege;
    Result:
    Privilege````````````Admin_Option
    ~~~~~~ ~~~~~~~~~
    ALTER SESSION`````No
    CREATE SESSION````No
    CREATE SYNONYM```No

  • Issue with viewing Package Body in SQL Developer 2.1 EA1

    I was able to view the package body from different schemas after I log in with user account in SQL Developer 1.5.5.
    But with SQL Developer 2.1 EA1, I could view only spec and I can see the package body only if I log in with DBO account.
    Is there any setting that needs to be configured to be able to view the package body?
    Thanks!

    Thanks for replying my message.
    It's Oracle 9i.
    What I meant 'spec' is you can see only the headers you defined in spec. You can expend the package and be able to see the all functions and procedures but you won't be able to see the '%packagename% Body' where all the detail code were written.
    As I mentioned in my previous post, with SQL Developer 1.5.5 version, you can see spec and package body if you expend the package.

  • View package body in another schema

    I have developers who want to view the code in the package body in another's schema.
    I know select text from all_source/ user_source works only for packages in your own schema.
    Granting system privelege 'create any procedure' allows the developer to view as well as update priveleges.
    As the owner of the objects what grants do I need to give to developers so that they can only view the code.

    You can grant select_catalog_role permissions to your developers. This will give your developers select access to all of the V$ views and DBA_% views. Then they can view the dba_source table to view other schema's package code..
    Regards,
    David

  • Privilege to view package body

    Hi all,
    I have two users... user 'A' and user 'B' (real user names changed to protect the innocent). User A creates a package spec and package body.
    I want user B to be able to see the code in the package body that user A owns. Ideally I would like user B to be able to view the body code in TOAD via the schema browser or via a DESC. Is this possible?
    Thanks,
    Scott
    PS user B can see the package spec just fine...

    Having the execute privilege on a package should not give anyone the ability to see the source for the package body in all_source and if definitely does not give the user the ability to change the package. The privilege only allows them to execute the package.
    By default only the owner and DBA privileged users can read both the package specification and the body from all_source. Having execute privilege will allow a user to read the specification.
    One way to provide access is to create your own version of the all_source views and grant this to whoever needs the access. You can either write a very specific tailored view for the one user or create a user security table that you use to control who can see what via this special view. Plus you have to grant select access to the special view before anyone can use it.
    HTH -- Mark D Powell --

  • Grant command to view package body

    I sent a request for the DBA's to grant me rights to the package body but I only see the spec with the grant execute command.
    Here is the command I just sent:
    grant create any procedure to DEVELOPER1;
    But the DBA changed my grant command to:
    grant create procedure to DEVELOPER1;
    But I still cannot see the package body. This is on a test environment.
    Would the "create any procedure" command help me see the package body of different schema owners package bodies?
    Or is there another grant command to see different schema package bodies?

    primefsu wrote:
    My dba say that you cannot use debug in this grant because session belongs right after debug.I have no clue what your dba is talking about. Anyway:
    SQL> create or replace
      2    package pkg1
      3      is
      4        procedure p1;
      5  end;
      6  /
    Package created.
    SQL> create or replace
      2    package body pkg1
      3      is
      4        procedure p1
      5          is
      6          begin
      7              null;
      8        end;
      9  end;
    10  /
    Package body created.
    SQL> grant execute on pkg1 to u1
      2  /
    Grant succeeded.
    SQL> connect u1@orcl
    Enter password: **
    Connected.
    SQL> exec scott.pkg1.p1;
    PL/SQL procedure successfully completed.
    SQL> select  text
      2    from  all_source
      3    where owner = 'SCOTT'
      4      and name = 'PKG1'
      5      and type = 'PACKAGE BODY'
      6    order by line
      7  /
    no rows selected
    SQL> connect scott@orcl
    Enter password: *****
    Connected.
    SQL> grant debug on pkg1 to u1
      2  /
    Grant succeeded.
    SQL> connect u1@orcl
    Enter password: **
    Connected.
    SQL> select  text
      2    from  all_source
      3    where owner = 'SCOTT'
      4      and name = 'PKG1'
      5      and type = 'PACKAGE BODY'
      6    order by line
      7  /
    TEXT
    package body pkg1
        is
          procedure p1
            is
            begin
                null;
          end;
    end;
    8 rows selected.
    SQL> As you can see, package body became visible to user U1 as soon as user U1 was granted DEBUG on package.
    SY.

  • How to view CLOB column in SQLdeveloper

    I'd like to know how to display the value of a CLOB column when in SQLDeveloper. Thanks.

    The data grid's cell has a popup editor (a ... button in the cell) where you can see CLOB contents.
    -Raghu

  • Problem in viewing package body methods

    Hi,
    Methods are showing in object browser in the package header only but not in the body where I think it is the most useful. On clicking the desired method, the right window should also scroll to the selected method.
    Thanks.
    JC

    Hi Mithu,
    CAF service browser is based on CAF Web Dynpro model which has several limilations. Check the SAP note <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_caf/~form/handler">1030595</a> and <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20063659-4f03-2a10-6a8a-d88786c39b71">this</a> document for more details on the limitations of CAF Web Dynpro model. To check the operations working properly create a web service for the app service test from the wsnavigator.
    Thanks,
    Dipankar

  • How to open a package body in Oracle sql developer

    How to open a package body in Oracle sql developer..any shortcut for that

    I need another way to get to my package body. I'm on a locked down system, so the only way I can reference anything is if I already know the name of it. I accidentally overwrote my text document that I was using to work on it and I closed out of the package body in sqldeveloper. There must be a command, like an alter or some such. Anyone know the old fashioned way of looking at a package?

  • How to view body of SOAP error (in Java)

    I'm trying to track down the source of a "Server" error I keep getting back when trying to invoke Web Services from Java code. I can't figure out how to view my SOAP response to get the details of the error message. So all I have to work with now is "javax.xml.rpc.soap.SOAPFaultException: Server". I created the Web Service endpoint in JDeveloper by loading the .wsdl file and selecting "Generate Web Service Proxy" - So I can't view my SOAP message/response - I just call the 'accountInsertOrUpdate' method.
    Should I expect the SOAP body to have a more detailed error as to what is causing the 'Server' error?
    Does anybody know of a method where I can view the SOAP body being sent out and received?
    I consistently get this Server error when trying to call any Oracle CRM On Demand method (about 2-3 times in a row) and then the method call works fine - no changes on my side (it is just in a loop to retry if a Server error is encountered). (If I view the Web Service Utilization in CRM On Demand - it doesn't show any of the 'Server' errors - only the successful login, method call, and logout.
    Any ideas would be greatly appreciated - Thanks!
    Brian

    I just figured out how to view the body of the SOAP error. (I just needed to cast the Exception as a SOAPFaultException to view the details).
    This is the error I consistently get: Internal Error: Session is not available. Aborting. (SBL-ODU-01006)
    So now my question - has anybody else run into this?
    I log in - get my session id. Try to call a method and get (2 or 3 times in a row) this 'Session not available' error and then it works. I try and make another method call and get 2 or 3 more 'Session not available' errors.
    I thought it might be a timing issue (where I am making too many requests/second) so I added a little 'sleep' time between method calls with no difference in response.
    Ideas?

  • HOW TO VIEW PAGE OF ONLIE BOOK IN PDF FILE

    i HAVE A PDF FILE THAT i AM TRYING TO OPEN AND READ IT IS A ONLINE MANUAL THAT ONLY SHOWS 8 PAGES OF A BOOK THAT IS ABOUT 400 PAGES CAN i VIEW THE RESET OF THESE PAGE BY CONVERTING THE FILE OR NOT?

    I just figured out how to view the body of the SOAP error. (I just needed to cast the Exception as a SOAPFaultException to view the details).
    This is the error I consistently get: Internal Error: Session is not available. Aborting. (SBL-ODU-01006)
    So now my question - has anybody else run into this?
    I log in - get my session id. Try to call a method and get (2 or 3 times in a row) this 'Session not available' error and then it works. I try and make another method call and get 2 or 3 more 'Session not available' errors.
    I thought it might be a timing issue (where I am making too many requests/second) so I added a little 'sleep' time between method calls with no difference in response.
    Ideas?

  • How do I view a FUNCTION within a Package Body

    I can see the FUNCTION being executed within the Package...
    FUNCTION Stop_Refresh_AsBilled
    RETURN Number;
    And within Oracle SQL Developer and using the Connection and "Packages" part of the Schema, I see the Function Name. However, when I <Double-Click> on the FUNCTION Name within the Schema, it is taking me to where the FUNCTION is executed within the Package and NOT to the PL/SQL Code that actually makes up the FUNCTION.
    Am I missing something here??? Maybe in my Preferences??? How can I drill down further to actually find the FUNCTION Definition and PL/SQL Code that makes up the FUNCTION within the Package Body???
    I can bring up the Package Body and Search on the FUNCTION that way. I'm hoping there is an easier way however to drill down to the actual PL/SQL Code that makes up the FUNCTION.
    I hope I am being clear in my explanation here.
    Thanks for your review and I am hopeful for a reply.
    PSULionRP

    Jim, opening the body node to see all functions and procedures sometimes does not work in 3.0
    I have many packages generated by Feuerstien's CodeGen utility. The Query package appears just fine with every function and procedure appearing as expected in both header and body nodes. However, the Change Package fails miserably. Header shows all functions and procedures fine, but the body node only shows the top private declarations of variables and types. Not one function or procedure appears in the expanded node.
    The only thing I can figure is that the Change package of about 30 named items has many of the same name+ with overloaded parameters. I think SQL Dev is having problems parsing the names in the body even though it does fine with the names in the header of the package--perhaps because of many private variables and PRAGMA's declared at the top of the body.
    Both packages have about 30 functions, but the Change package body has over 2000 lines while the Query package has fewer than 500.
    Just adding to the mystery--but I think it merits a bug report (gotta figure out where to report it now).

  • How do I view package bodies in another schema ?

    For purposes of SOX and security/audit control, we log in under our network id's in our production environment. We have sourcecode compiled into Oracle seeded schemas ( APPS ) so that scheduled jobs are able to run with submitted from the Oracle Applications environment. We don't compile code into our personal network account areas.
    I know how to GRANT EXECUTE privs so that we can execute a package in another schema, but what I want to do is to be able to view the sourcecode in another schema. Compile into APPS but be able to see the package body from my network id schema account.
    I can't seem to find what the correct permission is anywhere. Granted I can look at DBA_SOURCE to get to it, but I want to use a tool like SQL Developer or TOAD to look at the code in a more presentable and easier to debug manner.
    Any help ?

    I did some more searching on the forum... seems its already a request... TOAD gives access to DBA_Views to resolve the issue... SQL Developer has not integrated that functionality yet, but forum entries seem to indicate that it is on the horizon.
    Thanks for responding though.
    ~Barry

  • What is the GRANT or permission setting that allows viewing of package body

    For purposes of SOX and security/audit control, we log in under our network id's in our production environment. We have sourcecode compiled into Oracle seeded schemas ( APPS ) so that scheduled jobs are able to run with submitted from the Oracle Applications environment. We don't compile code into our personal network account areas.
    I know how to GRANT EXECUTE privs so that we can execute a package in another schema, but what I want to do is to be able to view the sourcecode in another schema. Compile into APPS but be able to see the package body from my network id schema account.
    I can't seem to find what the correct permission is anywhere. Granted I can look at DBA_SOURCE to get to it, but I want to use a tool like SQL Developer or TOAD to look at the code in a more presentable and easier to debug manner.
    Any help ?

    I guess you need GRANT DEBUG ON SCOTT.PKG TO U
    SYS@LSC01> create or replace package scott.pk is procedure p; end pk;
      2  /
    Package created.
    SYS@LSC01> create or replace package body scott.pk is procedure p is begin null; end; end pk;
      2  /
    Package body created.
    SYS@LSC01> grant create session to u identified by u;
    Grant succeeded.
    SYS@LSC01> grant execute on scott.pk to u;
    Grant succeeded.
    SYS@LSC01> connect u/u
    Connected.
    U@LSC01> select text from all_source where name='PK';
    TEXT
    package       pk is procedure p; end pk;
    U@LSC01> connect / as sysdba
    Connected.
    SYS@LSC01> grant debug on scott.pk to u;
    Grant succeeded.
    SYS@LSC01> connect u/u
    Connected.
    U@LSC01> select text from all_source where name='PK';
    TEXT
    package       pk is procedure p; end pk;
    package body       pk is procedure p is begin null; end; end pk;

Maybe you are looking for

  • HR ABAP: Infotype 25 updation

    In my server table PA0025 is empty.....even i entered data (annual aprrisal ) for infotype 25 and save then also the table PA0025 is not updated.....!! Can anybody explain me why its behave like this??? and also <b>How to update the table PA0025 tabl

  • I cant hear anything but itunes

    i cant hear anything on safari, quicktime, or windows media player, but i can hear everything on my itunes. does anyone kno the problem?

  • How to hold back zoom level setting?

    Zoom level changes every time with opening page, & I want to keep already set zoom level ,as it happens in other browsers like Google Crome.How to keep zoom level always set ,at it's selected level? I tried with add on to solve this,but result was no

  • View in external browser keeps opening new tabs

    Recently, in a failed effort to address the new version's inability to close successfully, I reset Firefox. I seem to have lost another valuable setting, and I can't remember how to recreate it. I use a peculiar, old html editor. When I ask it to "Vi

  • Pricing: field CONTDURA (Condition Term) pass wrong value to userexit

    I use field "CONTDURA" in my Condition Value User Exit. But value of this field always remains the same, unless I save business document (for example, order). The following describes the situation and the corresponding values of the field: 1) If I cr