How to compile all package body using sqlplus ?

hi all,
How to compile all package body using sqlplus ?
Please help.
Amy

dbms_utility.compile_schema will compile all the invalid objects in a schema, including the invalid package bodies. If you only want to compile the invalid package bodies, you could write your own dynamic SQL stored procedure to do that using the user_source view, but that's a lot more effort for a very minimal benefit.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • Compile UTL_FILE PACKAGE BODY

    Hi ALL,,,
    I refreshed one db from PROD dump.
    After that I compiled all Invalid objects .But am unable to compile UTL_FILE PACKAGE BODY
    Showing all are invalid.
    OBJECT_NAME OBJECT_TYPE OWNER
    UTL_FILE PACKAGE BODY UTLFILE
    UTL_FILE_EX PACKAGE BODY UTLFILE
    UTL_FILE_ADMIN PACKAGE BODY UTLFILE
    SQL> show parameter utl
    NAME TYPE VALUE
    create_stored_outlines string
    utl_file_dir string
    Please help me how to compile this.
    If I tried to copile manualyy..I am gettimg Error like..PACAGE ALTERED WITH COMPILATION Errors.
    Thanks
    Manohar.

    Invalid objects are best compiled by using
    sqlplus / as sysdba
    @?\rdbms\admin\utlrp
    This will report the number of invalid objects when finishing.
    When you still have invalid objects you should query dba_errors where name='<name of invalid object>'
    All Oracle provided sources are in
    %ORACLE_HOME%\rdbms\admin
    You can simply find or grep for utl_file.
    There always will be two files
    utl<facility>.sql (or dbms<facility>.sql) and prvt<facility>.plb
    You need to run them both in sqlplus connected as sysdba.
    Sybrand Bakker
    Senior Oracle DBA

  • How to compile all objects.....in Oracle10g

    Hi ,
    The Oracle Doc about PL/SQL Packages and Types reffering to DBMS_UTILITY and the COMPILE_SCHEMA procedure....points out :
    "Compiles all procedures, functions, packages, and triggers in the specified schema"
    So how to compile views and possibly other db schema object types ......????
    For example issuing the command :
    select object_name from user_objects where status='INVALID';
    we get all invalid objects, views , packages , e.t.c.
    How to compile all types of objects ... except for EM10g env......
    Many thanks....
    Sim

    You may want to use Solomon Yakobson's utility available here:
    http://apex.oracle.com/pls/otn/f?p=2853:5:4266218307366505

  • How to compile all forms in a directoy at time?

    Hi friends, thank for your replies for the previous questions.
    Now
    How to compile all form modules located in a directory
    at a time? usually what I know is opening form one by one
    and compile it. But I want to compile all forms and create
    executable files at a time.
    Is project Builder helpfule to achive this??
    thanks
    madhu

    Yes, his file is useful -- it should run on Windows XP. You need to copy the above text into a file using a standard text editor, something like Notepad. To run it, you open a Cmd.exe DOS window on your pc, change directory (CD) to the folder where your forms are, and enter the command script file name.
    Here are several more links to other topics in this forum asking how to do the same thing:
    Re: How To Compile 370 forms ?
    Re: Creating Oracle 10g Forms and Reports Builds

  • 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 compile a package with classess

    Hi,
    Can any one tell me , how to compile a package ?
    Actually, i have three classes under the package named as linklist.
    i am unable to compile the classes under this package ? its always raising errors. saying that the package does not exist.
    Can any one tell me, why it is like this ?
    thanks in advance

    Hi,
    Can any one tell me , how to compile a package ?I'll try.
    Actually, i have three classes under the package named
    as linklist. Okay, so you have the package statement at the top of each class, right?
    And the 3 classes reside in a folder named linklist?
    Okay, if you do, while in the folder above linklist, do:
    javac linklist/*.java (using the appropriate slash)
    Did it work?

  • Help required in compilation of package body.....

    Hi ..
    While taking the export i encounter the error message..
    . exporting synonyms
    . exporting views
    . exporting stored procedures
    . exporting operators
    . exporting referential integrity constraints
    . exporting triggers
    EXP-00056: ORACLE error 6550 encountered
    ORA-06550: line 1, column 26:
    PLS-00201: identifier 'XDB.DBMS_XDBUTIL_INT' must be declared
    ORA-06550: line 1, column 14:
    PL/SQL: Statement ignored
    EXP-00056: ORACLE error 6550 encountered
    ORA-06550: line 1, column 26:
    PLS-00201: identifier 'XDB.DBMS_XDBUTIL_INT' must be declared
    ORA-06550: line 1, column 14:
    PL/SQL: Statement ignored
    EXP-00000: Export terminated unsuccessfully..
    SELECT status,object_id,object_type,owner,object_name
    FROM dba_objects
    WHERE object_name = 'DBMS_XDBUTIL_INT';
    gives the output as...
    status object type owner object_name
    valid synonym public DBMS_XDBUTIL_INT
    valid package xdb DBMS_XDBUTIL_INT
    invalid package body xdb DBMS_XDBUTIL_INT
    when i try to compile the invalid object...
    SQL> alter package XDB.DBMS_XDBUTIL_INT COMPILE BODY;
    Warning: Package Body altered with compilation errors.
    SQL> sho err
    Errors for PACKAGE BODY XDB.DBMS_XDBUTIL_INT:
    LINE/COL ERROR
    61/7 PL/SQL: Statement ignored
    61/17 PLS-00306: wrong number or types of arguments in call to
    'IS_HIERARCHY_ENABLED_INTERNAL'
    74/7 PL/SQL: Statement ignored
    74/29 PLS-00302: component 'GENERATE_TRGNM' must be declared
    108/9 PL/SQL: Statement ignored
    108/37 PLS-00302: component 'TRUNCATE_NAME' must be declared
    123/7 PLS-00201: identifier 'SYS.DBMS_SYS_SQL' must be declared
    123/7 PL/SQL: Statement ignored
    135/9 PL/SQL: Statement ignored
    LINE/COL ERROR
    135/37 PLS-00302: component 'TRUNCATE_NAME' must be declared
    153/9 PL/SQL: Statement ignored
    153/33 PLS-00302: component 'TRUNCATE_NAME' must be declared
    168/7 PLS-00201: identifier 'SYS.DBMS_SYS_SQL' must be declared
    168/7 PL/SQL: Statement ignored
    181/9 PL/SQL: Statement ignored
    181/33 PLS-00302: component 'TRUNCATE_NAME' must be declared
    Since the code is wrapped .. i cant do anything.. needs ur help.
    sorry for explaining in such a detail...
    Message was edited by:
    437022

    Hi,
    In side the Package Body,
    a) invalid arguments for IS_HIERARCHY_ENABLED_INTERNAL
    b) invalid components GENERATE_TRGNM, etc.
    First, you need to correct the above errors and then
    try to compile the Package Body
    Regards,
    Sailaja

  • How to display all the surveys using content query web part

    Can you please tell me how to display all the surveys using content query web part in more details? I also created a subsite and multiple surveys in that site. Then, I inserted a Content Query Web Part and select the List Type to be "Survey",
    however, it returned nothing. Did I miss anything?

    Hi,
    OOTB Survey List does not contain any
    Content Types and it has the following structure:
    Response entry is represented by
    List Item
    Response entry consist of questions and answers, where Question correspond to
    Field and Answer to Item value respectively.
    For querying Survey List via CQWP  the following properties could be used
    BaseType 
    <Lists BaseType="4">
    ServerTemplate
    <Lists ServerTemplate="102">
    Example
    To retrieve all the responses from Survey lists, specify List Type property as shown on picture
    Reference:
    http://stackoverflow.com/questions/17280778/display-all-surveys-using-content-query-web-part
    Best Regards,
    Eric
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • && Substitution Variable in Package Body using SQL Developer

    Hi Folks,
    I've moved over to working to in SQL Developer (its a very early version - 1.0.0) from a combination of SQL*Plus command line and a text editor. I'm trying to get this upgrgraded, but I think the question will be the same with a newer version anyway.
    I am creating a package, and in the package body I have some &&my_var substitutions that I was previoulsy prompted for when calling the .sql from the command line SQL*Plus. I need this as the variable needs to be different for the development and live environment.
    When working in SQL Developer, I can load the package body from Connection->Packages->My Package->My Package Body, and click the edit button to edit the code, however, when I click the Compile button in the top of the window my code error's because of the substituion variablle. An example is:
    CREATE OR REPLACE
    PACKAGE BODY MY_PACKAGE AS
    PROCEDURE MY_PROCEDURE
    BEGIN
    my_variable := &&my_function_from_live_or_dev_database
    END MY_PROCEDURE
    Can anyone tell me if there is a way of defining a compiler variable within the IDE widow while editing a package body stored in the database, without manually copying the code into the Worksheet and running it as a script?
    Thanks,
    AM

    953104 wrote:
    Thanks for the reply, the code was just quickly typed to show the sort of thing I am doing, it wasn't actual code form my project.
    I've come from a C background so what I would have done would be create a #define and changed to when on live or development - or passed the variable to the build environment from the IDE or makefiles and the change would have reflected through my whole project.
    What I want to be able to do is alter a definition of some sort that will reflect throughout my whole project, so I can change it in one location to minimize code changes before going live. I don't really want to be prompted at all. On one system it needs to be DEV_10 and on the other it needs to be LIVE_10.Is there a possibility to elimiante this difference at all?
    For example if DEV_10 is the oracle schemauser on the development database and LIVE_10 would be the one on the production system. THen you could just remove all references to the schema from your code.
    IF you are already connected to this schema, then you don't need to specify the schema name anymore.
    example
    instead of
    create or replace package dev_10.myPackage
    ...you can simply use
    create or replace package myPackage
    ...If needed you can alter the cuurently connected user just before you run the script.
    alter session set current_schema = LIVE10;
    create or replace package myPackage
    ...This would be a different working window in the developer (script worksheet, instead of direct pl/sql editor).
    Substitution variables are allowed there.

  • How to compile and package my EJB application

    Hi,
    I just ran the sample programs from the Sun J2EE tutorial. Seems to work fine. I used the ant utility to compile all the programs and the J2EE Deployment Wizard to package and deploy everything. Now how do I compile and deploy a sample EJB program that I have written ?
    I am using the following platforms:
    1: JBuilder 3.0 : IDE (for writing the source code)
    2: JDK 1.4.0_01
    3: J2SDK EE 1.3.1 (EJB/Appln server)
    How do I make ant recognize my program and compile it... i guess the deployment procedure would still be the same.
    Can somebody please help me out on this ??
    Thanks
    prasanna

    Hi,
    Thanks for your prompt reply. I tried that out.. I have a directory called "customer" under which I have my interfaces,bean implementation class and the J2EE application client.
    ANT_HOME is set to : the directory where ant is installed
    JAVA_HOME is set to : the directory where JDK is installed
    J2EE_HOME is set to : the directory where J2EE server is installed
    and PATH : includes the bin directories of JDK, ant and J2SDK EE
    These are the paths I had to set when I ran the J2EE tutorial programs. It worked fine.
    Now when I say : ant myprogram I get an error saying:
    BUILD FAILED
    Target "myprogram" does not exist in this project
    How do I add my program also to the project so that ant can recognize it ?
    Also if there is any other way you can suggest to compile and package my application it would be great...
    Thanks
    prasanna

  • Package Manager to compile all packages as in Gentoo

    Hello,
    I love Arch and was looking to get my hands dirty, I there a way where I can compile all the packages that I install like in Gentoo rather than using only the pre-compiled i686 packages? I looked at ABS but was not sure how to keep track of the changes, I believe I simply cant do '-Syu' with ABS. I am just looking for something like Yaourt or Packer AUR helpers but for all the packages from core/extra/community.
    Thank You
    Gopi

    RichAustin wrote:I'm perhaps being a bit dumb here but why not just use Gentoo instead? I am actually quite serious here since I wouldn't have thought there was a major difference between the two except you compile everything in Gentoo. I can't really see why you would want to find a workaround to do what you can already do in Gentoo.
    I recently spent many days relearning the Gentoo way, did a stage3 Gentoo install alongside my Arch system, compiled a custom kernel from pf-sources, updated world, spent time reading the forum and web pages.  I won't try to replay "what I found wrong in Gentoo" except for the refrain "Gentoo is broken." That was my take. I found important things broken for long periods with no attention. People rude to each other.   I won't do that scene...
    Arch may have a smaller developer team but I've experienced a generally high level of cooperation and discipline here. I've seen complaints about the forum here being moderated -- to me that seems to work for our good.  Thanks to the moderators who keep this place civil and rational!
    There seems to be a good knowledge base here and the principle of always keeping up-to-date with the upstream releases forces the developers to constantly parse upstream information to roll a coherent stream of Arch packages. The knowledge here is as good as anywhere.  I just don't expect Arch Linux to be an integrated operating system, like Debian stable or Ubuntu.  In my experience it gets almost as much stability as Debian Testing by virtue of quickly taking in the upstream releases, which then fix the bugs that Arch never has to fix ourselves.  We trust upstream   I didn't see a clear policy in Gentoo -- some upstream releases are held back forever as Gentoo devs argue over it.
    I have found it possible to use Arch as the base for a customized, locally compiled system; it's possible to do that with abs/AUR and makepkg.  I've developed my own style.  In place of USE flags I use meld to carry forward my local changes from my local PKGBUILD to the newly released Arch PKGBUILD.  I don't modify many pkgbuilds and mostly just remember which ones I change, for example to exclude gconf from my system. (It's a KDE / Xmonad desktop with a lot of audio tools).
    I haven't found it possible or desirable to do bulk builds on Arch. I encounter quite a few pkgbuilds from abs that do not build straight away, sometimes because the package won't build against the library that is in abs at the same time, sometimes because patches are missing or checksums are incorrect:  it becomes clear that the released binary packages are not built from the daily abs update. That would be the job of a build server that takes in abs and spits out a complete set of binaries. That is the missing step that I do myself: take in abs and compile a (daily) coherent set of binaries from it (with local mods). It is not like Gentoo.  I don't think that the Arch team tries to guarantee that the their binaries can be re-built perfectly from abs, so if you try to use abs rather than pacman -S you need to understand that and accept the responsibility. It works well enough for me.

  • How to make my package body hide in oracle......

    hi all,
    i have a package, and i want to hide my package body only not spec;
    i searched in websites, but not getting the correct answer,,
    help me.
    Edited by: 887268 on Sep 28, 2011 1:10 AM

    887268 wrote:
    hi all,
    i have a package, and i want to hide my package body only not spec;
    i searched in websites, but not getting the correct answer,,
    help me.
    Edited by: 887268 on Sep 28, 2011 1:10 AMMake it hide for other users?
    So use grant / revoke privileges

  • Edit package body from sqlplus

    HI,
    I usually use SQL developer to create and edit my packages which usually worked fine. But the problem for today is that I can not save only packageA's body, and the others can be saved well. ( the SQL developer just runs for ever when I click save)
    And I try to edit it using sqlplus, but I don't know the syntax for it.
    Any help appreciated!!

    HI, thanks so much for your help!
    The final solution was to create a new package with same code, and of course, with new updates.
    The new problem is : no way to drop the old package( tried many times):
    Error starting at line 1 in command:
    drop package packageA
    Error report:
    SQL Error: ORA-04021: timeout occurred while waiting to lock object
    04021. 00000 - "timeout occurred while waiting to lock object %s%s%s%s%s"
    *Cause:    While waiting to lock a library object, a timeout is occurred.
    *Action:   Retry the operation later.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to wrap a package body in the Oracle Cloud

    Does anyone know if it is possible to wrap a PL/SQL package body in the Oracle Cloud? I tried to wrap it on my local machine and then upload it but when I ran it, it said the wrapped package was corrupt. DBMS_DDL is a lot of extra work and only works for packages <= 32K. Is there any other way to do this?
    Maybe in the SQL Workshop, upload script section, there could be an option to wrap code when you run it?
    Thanks,
    Steve

    Rick,
    Thanks for the quick response. I used the SQL Workshop, script upload function (in Apex) to upload a package that I wrapped on my pc (Windows 7) using the wrap command line utility (11g). It uploaded fine but when I tried to run it, it returned a message like "Wrapped code is invalid or corrupted". This was not what I would have expected since I know you can import/export wrapped code between systems (different OS) without issue. Perhaps the command line wrap is OS specific and the import/export is doing some kind of translation?
    Anyway, I know you cannot use the command line option directly in the cloud because, as you say, you don't have access to the command line. DBMS_DDL is too tedious to use and has the 32K limit and unfortunately, there is no command like, "Alter package body xxx compile wrapped". So that leaves using the SQL Developer Cart option to move wrapped code from a local db to the cloud db. Unfortunately, I'm still having roles and permissions issues with my account which Oracle Support hasn't been able to fix over the last few weeks so I can't try this option (or even login using SQL Dev). Has anyone tried to do this? Does anyone know of another way to do this that I'm not thinking of?
    Thanks,
    Steve

  • How to export UTL_ENCODE package body in Oracle9i?

    I want to export UTL_ENCODE package and import it into Oracle8.1.6. Because its package body is wrapped, I can't copy and paste the code. Is there any other way to export the package? thanks for your replying.

    Wrapped source compiles just as plain text does. However, it is not backwards compatible. So if the UTL_ENCODE was wrapped with the 9.0.1 wrap binary then the 8.1.6 database won't understand the wrapped source. You can go forward though.
    Even if you had plain text source - it isn't generally a good idea to move Oracle Builtins to a backward version.
    Two workarounds:
    1) roll your own - as it isn't a tremendously complicated package.
    2) If your 8.1.6 database shares a network with a 9i database, use a database link to get at the functionality you need.
    Michael O'Neill
    Publisher of the PigiWiki
    clever-idea.com

Maybe you are looking for

  • Can the subselect be made into a join?

    SELECT A.ROLEUSER, A.ROLENAME, B.OPID FROM PSROLEUSER A, PSOPRDEFN B WHERE B.OPRID = A.ROLEUSER AND A.ROLEUSER IN (SELECT C.ROLEUSER FROM PSROLEUSER C WHERE C.ROLENAME = 'AAA_DDD_TECHNICAL'

  • NewBie : How can I do to compile the samples of XML Parser ?

    How can I do to compile the samples of XML Parser ? I must create a Makefile file, and after ? Thanks

  • Adding one column in RFITEMAR.  tr-code  FBL5N

    hi experts. AFTER CONVERTING TO Y OR Z PROGRAM. I want to add one WBS Element(projk) field in the output report ie i want one column in rfitemar(yrfitemar). how to add the coulme i am not getting how to add that column in the report output. table bse

  • How to open a link in a different browser tab.

    Hi all. I have this simple requirement: - Create a link on a page with several options (some page within application, others, URL link). - Want to automatically open a new tab on browser when users clicks on any link (without having to right click on

  • 3d sphere inflating and deflating

    I am trying to build a simple VI which when given a duration, will display a sphere increasing in size/scale and then decreasing in size/scale for the same duration. Imagine this to be like a baloon that is inflating and deflating continuously. The i