Procedure and package

What is the basic difference between procedure and package,as I know the usual aal differeneces but I want to know that whether it is having some another hidden difference? Please guide me.

Why are you not understand the problem my dear,The problem is not of concept.
The problem is that what is the differenece between procedure and package?
If you have any problem regarding concepts in Oracle by the way plz let me know,I can solve ur issues without getting angry. I have worth of two years experince,it doesnt mean I learnt everything.This is a way how we are helping to each other,we are not here to pull legs of each other,if you know the difference telme,leave it otherwise.

Similar Messages

  • How to copy procedures and packages from one server to another?

    Hi,
    I have 439 packages and 178 procedures located in one server called MAXWELL.
    I need to copy these objects to another server called TITAN.
    The schema names is SPCBR in both servers.
    So both servers have an instance running with this schema SPCBR.
    SPCBR in TITAN server has their tables with table data which was generated by an export/import process from MAXWELL server.
    However, procedures and packages were not copied by the export/import because I used the clause 'tables'.
    Now, what can I do in order to equalize procedures and packages in both databases? I can't risk in damaging or duplicating data in my database located in TITAN server, ok?
    Thanks,

    Another simple alternative, according to AskTom (http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:454220160386)
    ---------------- getcode.sql ----------------------------
    set feedback off
    set heading off
    set termout off
    set linesize 1000
    set trimspool on
    set verify off
    spool &1..sql
    prompt set define off
    select decode( type||'-'||to_char(line,'fm99999'),
    'PACKAGE BODY-1', '/'||chr(10),
    null) ||
    decode(line,1,'create or replace ', '' ) ||
    text text
    from user_source
    where name = upper('&&1')
    order by type, line;
    prompt /
    prompt set define on
    spool off
    set feedback on
    set heading on
    set termout on
    set linesize 100
    ------------------- eof --------------------------------
    it extracts one procedure, function or package to a file. Thats it. If you
    wanted to get all of the procedures in a schema extracted to the current working
    directory, you would run a script:
    --------------- getallcode ---------------------------
    set termout off
    set heading off
    set feedback off
    set linesize 50
    spool xtmpx.sql
    select '@getcode ' || object_name
    from user_objects
    where object_type in ( 'PROCEDURE', 'FUNCTION', 'PACKAGE' )
    spool off
    spool getallcode_INSTALL.sql
    select '@' || object_name
    from user_objects
    where object_type in ( 'PROCEDURE', 'FUNCTION', 'PACKAGE' )
    spool off
    set heading on
    set feedback on
    set linesize 130
    set termout on
    @xtmpx.sql
    ---------------- eof ---------------------------------
    You can see how to filter on that one by adding to the where clause if you want.
    Just run @getallcode_INSTALL to run all of the scripts...

  • How can I compile all functions, procedures and packages with a script?

    I need to compile all functions, procedures and packages of 5 schemas (users) with a script.
    How can I do it?
    Thanks!

    you can create a script to select all invalid objects in those schemas Since Oracle 8 introduced NDS this approach has struck me as a trifle old fashioned. It's much simpler to loop round the query in PL/SQL and use EXECUTE IMMEDIATE to fire off the DDL statements. No scripts, no muss, no fuss.
    Having said that, the problem with this approach and also with using DBMS_UTILITY.COMPILE_SCHEMA is that they do not compile all the invalid objects in dependency order. This may result in programs being invalidated by the subsequent compilation of dependencies. This is due to the introduction of Java into the database.
    The UTLRP script is much better, because it (usually) avoids cyclic references. But you still may need to run it more than once.
    In general it is better to avoid sledgehammer recompilations (like DBMS_UTILITY.COMPILE_SCHEMA, which starts by invalidating all the objects). If we have twenty invalid objects, nineteen of which are dependencies of the twentieth, we actually only need to recompile the master object, as recompiling it will trigger the recompilation of all the others.
    Cheers, APC

  • Oracle stored Procedure and Packages in CR4E

    Hi,
    I want to use Stored Procedure in CR4E. I don't know how to use Stored Procedures and packages in Crystal Reports for Eclipse. In the data source explorer I can only see the Tables, Views and Stored Procedures but not packages from my Schema and when I can only drag & drop the Tables and Views into the Field Explorer, I can't drag & Drop the Stored Procedures.
    I managed to attached the stored procedure from CR studio. I opened the report in CR4E and I can see the stored procedure and can preview the data. When I try to run the report and override the datasource, it throws oracle error saying "ORA-01008: Not all variables bound". When I tried to use the option
    DBOptions._doNotVerifyDB
    while replacing connection I get the this error
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
         at java.lang.Boolean.compareTo(Boolean.java:26)
         at com.crystaldecisions.sdk.occa.report.lib.ClonableMap.hasContent(ClonableMap.java:112)
         at com.crystaldecisions.client.helper.CloneUtil.hasContent(CloneUtil.java:135)
         at com.crystaldecisions.sdk.occa.report.data.ConnectionInfo.hasContent(SourceFile:151)
         at com.crystaldecisions.client.helper.CloneUtil.hasContent(CloneUtil.java:135)
         at com.crystaldecisions.sdk.occa.report.data.Table.hasContent(SourceFile:286)
         at com.crystaldecisions.sdk.occa.report.data.Procedure.hasContent(SourceFile:212)
         at com.crystaldecisions.sdk.occa.report.lib.ArrayListMerger.haveMatchingContent(ArrayListMerger.java:232)
         at com.crystaldecisions.sdk.occa.report.lib.ArrayListMerger.mergePass(ArrayListMerger.java:138)
         at com.crystaldecisions.sdk.occa.report.lib.ArrayListMerger.merge(ArrayListMerger.java:86)
         at com.crystaldecisions.sdk.occa.report.lib.ControllableList.copyTo(ControllableList.java:68)
         at com.crystaldecisions.sdk.occa.report.data.Database.copyTo(SourceFile:105)
         at com.crystaldecisions.sdk.occa.report.lib.ControllableHelper.copyToPreservingReferences(ControllableHelper.java:153)
         at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.a(SourceFile:2556)
         at com.crystaldecisions.sdk.occa.report.application.b9.onDataSourceChanging(SourceFile:315)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:971)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:4078)
         at com.crystaldecisions.sdk.occa.report.application.bv.new(SourceFile:121)
         at com.crystaldecisions.sdk.occa.report.application.bv.int(SourceFile:91)
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.performDo(SourceFile:151)
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.a(SourceFile:106)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:2159)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.mapFields(SourceFile:4061)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:3914)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.replaceConnection(SourceFile:3880)
         at
    Please advice if Stored procedures and packages are supported in CR4E ?

    Hi, Jack76,
    According to the [CR4E Release Notes|http://help.sap.com/businessobject/product_guides/cr4E/en/cr4e_relnotes_en.pdf] (available from the [CR4E Download page|http://www.businessobjects.com/campaigns/forms/downloads/crystal/eclipse/datasave.asp]), stored procedures are supported, as long as they don't use parameters that need null values.
    I don't see any references to packages.
    Bryan

  • How to Export only some tables with procedures and packages

    Hi...
    I want to export only some tables and packages and procedures. Can anybody please guide me how to do this.
    Thanks in advance.......
    pal

    could you please more elobarate in your question? do you want to export data from tables or you want to get the table structure, source of procedures and packages?
    Thanks
    M Thiyagarajan

  • Administering Stored Procedures and Packages

    I've read about WRAP utility but I don't know exactly what's it about. Here you are what ýI've read:ý
    The code used to create the procedure ,package ,or function is available in the dictionary ýviews DBA_Source ,All_Source,and user_source except when you create them with the ýWRAP utility .the WRAP utility generates encrypted code, which only the Oracle server ýcan interpret .ý
    does any one have any idea .
    Thanks in advance

    Generally, one uses the WRAP utility when
    - You are delivering code to a third party
    - You want to ensure that the third party isn't able to decompile your code.
    If you built a CRM application with stored procedures and packages and you started selling that commercially, for example, you would use the WRAP utility to ensure that competitors couldn't reverse engineer your code and see how you did things.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Procedures and packages

    Hi all,
    Pl clarify my doubt.
    Out of Standalone Procedures and Packaged procedures which is best one?
    why?
    Thank you,
    rampa

    This may be helpful to you ...
    http://asktom.oracle.com/pls/ask/f?p=4950:8:761888005577920510::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:7452431376537

  • "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE

    When I have the following create statement in a SQL Worksheet and run the script using "Run Script" (F5), I get the "PROCEDURE bogus Compiled." message. Why does it not tell me that there was a compile error? The procedure is marked with a little red "X" in the connections pane.
    CREATE OR REPLACE PROCEDURE bogus IS
    BEGIN
      x := 1;
    END;
    /Also, when I have the following command in a SQL Worksheet and run the script using "Run Script" (F5), I get the "PROCEDURE bogus Compiled." message. The difference is that I removed the slash after the CREATE PROCEDURE command. I can go into that procedure in the database via the Connections pane, click on the compile button, and the procedure compiles with no errors. Why does it not compile in a script when missing the slash?
    CREATE OR REPLACE PROCEDURE bogus IS
    BEGIN
      NULL;
    END;I noticed the same flaky behavior with CREATE PACKAGE BODY as well. This is in version 1.0.0.14.67 on Windows XP. Has this been fixed in the latest version?
    Mike

    I found a number of earlier posts on this (going back to at least v804), but I cannot find a thread with a response from the SQL Developer team - see:
    Package compilation error
    Succesful compilation message and Compiling Invalid Objects
    Creating a stored procedure from a file does not show compilation errors
    Re: Syntax Error Feedback
    I assume that it is just a bug with SQL Developer that it does not check for compilation errors when determining the status message to display (ie "PROCEDURE bogus Compiled"). At least now we get the little red cross on the navigator to tell us it is invalid :)

  • How to call procedure and package in BI

    IN OBIEE how to call procedure- function and pass parameter in it.??
    Thanks
    Jatin.

    Do you mean DB function. Check this link:
    http://oracle-bi.siebelunleashed.com/articles/callingdb-function-in-obiee/
    For OBIEE 11g, you have additional options to make calls with Action Framework. For now, I think the above link will help.
    If helpful pls mark as correct or helpful

  • Error while creating procedure and package

    Hi,
    I am getting an error while creating an procedure
    create or replace procedure mke_test (mke_gender varchar2) is
    begin
    declare global temporary table mag_hotline_glob
    INDIVIDUAL_ID NUMBER,
    ONE_MONTH NUMBER,
    THREE_MONTH NUMBER,
    SIX_MONTH NUMBER,
    TWELVE_MONTH NUMBER,
    CHILDREN_PRES VARCHAR2(1 BYTE)
    ) with replace on commit preserve rows not logged;
    begin
    insert into mag_hotline_glob
    select * from magazine_gender;
    end;
    end;
    can anybody plz suggest

    It's a total mess. You need to read the documentation first.
    Create your table separately
    CREATE global temporary table mag_hotline_glob(INDIVIDUAL_ID NUMBER,
                                                ONE_MONTH NUMBER,
                                                THREE_MONTH NUMBER,
                                                SIX_MONTH NUMBER,
                                                TWELVE_MONTH NUMBER,
                                                CHILDREN_PRES VARCHAR2(1 BYTE)) with replace on commit preserve rows not logged;Then use the procedure (I don't know why, this INSERT statement you can fire yourself)
    create or replace procedure mke_test(mke_gender varchar2) is
    begin
        insert into mag_hotline_glob
          select * from magazine_gender;
    end;If you want to create the GTT inside the procedure(should be avoided) then Use EXECUTE IMMEDIATE.
    By the way, where are you using the IN parameter ? It' unnecessary.

  • Searching strings in procedures, function and packages (OWB)

    Hi all,
    I'm working on an OMB script to look for a string in procedures, function and packages in OWB. So far, I found how to do it for functions and procedures:
    string match -nocase \*text_to_find* [OMBRETRIEVE FUNCTION 'my_function' GET PROPERTIES(IMPLEMENTATION)]
    string match -nocase \*text_to_find* [OMBRETRIEVE PROCEDURE 'my_procedure' GET PROPERTIES(IMPLEMENTATION)]
    I have tried something similar for packages but it didn't work. Does someone know how to do this search in packages? Any help will be appreciated.
    Regards,
    Mauricio

    Of course, if you are looking for a match in any source - including procedures and packages not imported into OWB, then OMB+ isn't going to be a ton of help as it won't be aware of those other packages.
    In that case, you can always find those dependencies by doing a standard select owner, name, type, text from all_source where text like '%YOUR_SEARCH_CRITERIA%' query.
    and you can embed that in your OMB+ using the Java/SQL library: How to run SQL from OMB+
    Cheers,
    Mike

  • To generate Script of  procedures/functions and packages with grants

    Hi
    is there wome way for to generate Source Code Script of the some functions, procedures and Packages in file
    I must to generate Script withall grants
    Tia

    Datapump export with Content=Metadata_only.
    Use SQLFILE option to generate the Schema DDL which
    includes
    tables,indexes,grants,stats,procedures,triggers,views
    etc...Sorry, I'm using 10g , but I don't know to use DataPump, is there other method ?
    Thanks

  • Needed to know how many procedures and name of them in Schema.

    Hi All,
    I wanted to know the name of Procedures and package name in the schema .
    Can i know how many schema are there in the data base ..
    Thanks in advance
    Sachin

    SQL> column object_type format a30
    SQL> column object_name format a30
    SQL> column how_many format a15
    SQL> select object_type
      2       , object_name
      3       , to_char(row_number() over (partition by object_type order by object_name))
      4         || ' out of ' || to_char(count(*) over (partition by object_type)) how_many
      5    from user_objects
      6   where object_type in ('PACKAGE','PACKAGE BODY','PROCEDURE','FUNCTION')
      7   order by object_type, object_name
      8  /
    Can i know how many schema are there in the data base ..
    select count(*) from dba_usersRegards,
    Rob.

  • Insert existing procedures into packages

    hi all,
    i have
    begin
    pg_reins_flat_file.pr_load_temp('1','sr_pre_inforce.txt');
    pg_reins_flat_file.pr_load_temp('2','sr_pre_spinforce.txt');
    end;
    i need create a new procedures to insert into my exisiting packages.
    wat i shud do ? tks.

    I'm not sure that I really understand what you're asking here.
    If you want to create a new procedure oin the PG_REINS_FLAT_FILE package, you'd just have to edit that package spec (assuming you want to create a public procedure) and package body to add the new procedure. You don't insert procedures into a package.
    Justin

  • Copy all fucntions, proecdures and packages to another DB

    Hi
    I hope someone can help me. I don't normally have to do this so I am at a bit of a loss as to the best way to do this.
    I need to copy all functions, procedures and packages with a specific prefix (long story - nothing to do with me) along with their grants and synonyms to another database (dev to many other dbs, not just schemas ). How is best to do this? I work directly in development so this is usually taken care of and if i'm aksed its a quick execute of the package etc from souce control but obviously I don't want to be doing that.
    Any pointers would be much appreciated.
    Thanks
    Vicky

    This is great but I have just realised I face another probelm currently.
    I do not have direct access to the directory on the server where datapump files are located (and I assumed saved during an export. I don't have DBA rights either. Is there any ohter way of me generating scripts etc or should I just use a bat file and execute each source file one after another? and generate synonyms and grants using a sql command?
    just for info, basically I am responsible for all custom code so need to be able to move it around as requested.
    Again, sorry for asking, this is trivial but I would rather make sure I am doing this the right way.
    Thanks
    Vicky

Maybe you are looking for

  • Moving folder does not work in this particular case

    Hi everybody, I am currently sorting folders and I do it from Lightroom. No problem until yesterday - 4 levels of sub-folder - I move the fourth level to another directory at the first level - I see the progress bar "moving" As a result, a new direct

  • Select schema via cursor

    I am working with a database in which all schemas have the same tables. I am trying to write a PL/SQL routine that will loop through each schema, query a table in that schema, and insert that data into a master table (simplified explanation). I can g

  • It's not an EXE!

    Hello folks Sorry to be thick here but I'm trying to download single files executables of Novell Clients for Windows XP, Vista and Windows 7 but when I go to dowload the file it does not save as an .exe What's going on?

  • My ipad2 needs updated to ios5

    How do I update my ipad2 to ios5?

  • Self Study CDs, Classroom...?

    Hi - I've been using the all-in-one 10g OCA/OCP Oracle guide to sudy for OCA. Would anyone give a specific recommendation for augmenting this with the self-study CDs or even classroom training (Oracle U)? The book alone is perfectly comprehensible. B