Idea for package/procedure/function distribution ??

Hi all
We have multilple databases (10.2.0.3). And we have a lot of "utility" packages for both appl. util and for DBA utils.
We have created a XXXUTIL schema on each database.
How do we keep those schemas in sync automatically - apart from doing export/import? We will name on "master" and all other should be in sync with this one schema (packages/procedures/functions/views)
Is there a smarter way of doing this, a pull or push replication solotiuon. We are on the 10g Enterprise verison.
Ideas appreciated
best regards
Mette

Hi,
As you said you got a lot of utility Packages, I think you can directly compile those scripts one you changed in the master DB, there won't be any thing to Sync the Procedures from One DB to another DB.
If it is a data then, you might gone for DB Link, Streams etc., for replicating the data.
In order to automate your need to write a script for logging into DB and running set of scripts and disconnecting - a shell script.
Just think is that your requirement.!!
Pavan Kumar N

Similar Messages

  • How to find out Unused Packages/Procedures/Functions/Triggers

    Hi,
    I have one database. This database is with 7 schemas. Around 1000 triggers are associated with each schema. But the application is using only some triggers.
    How to find out the used triggers? Apllications is developed in J2EE.
    Same way I want to find out the for Packages/Procedures and Functions.
    Any easy way is available?
    Please help me.
    regards
    Mathew

    Hi,
    >Audit the execution event on the objects by access.
    Kindly explain how to enable this auditing.
    regards
    Mathew

  • How can I create packages procedure & function in user-define Library

    hi.
    i am already created packages procedure & function in database and use so on.
    now i would like to create these in library file.
    please anyone give me example of any procedure or function to store in library.
    thanks
    Ali

    <FONT FACE="Arial" size=2 color="2D0000">> please send me one simple example for create library
    then create any function in library.
    2nd is any package can be create in library or not??
    Thanks S.K
    AliHave you checked the link?
    A simple example is provided.
    I think What I understood from your post is that, you want to put function/ Proc and want to call that as Library ..
    Which is not  possible.
    For exampel an external routine is a third-generation language procedure stored in a
    dynamic link library (DLL), registered with PL/SQL, and called by the DBA to perform
    special-purpose processing.
    In Unix a dynamic link library is known as a shared object (so).
    At run time, PL/SQL loads the library dynamically, then calls the routine as if it were a
    PL/SQL subprogram. To safeguard our database, the routine runs in a separate address
    space, but it participates fully in the current transaction. Furthermore, the routine can
    make a call back to the database to perform SQL operations.
    To identify a DLL we have to use CREATE LIBRARY command.
    The CREATE LIBRARY command is used to create a schema object, library, which
    represents an operating-system shared library, from which SQL and PL/SQL can call
    external third-generation-language (3GL) functions and procedures.
    Learn something more on External Procedures
    -SK
    </FONT>

  • Package,procedure,functions

    Iam having one requirement. i.e. i want know which package,procedure,function is calling....?
    for ex:
    procedure a
    -- p1
    call_procedure_b;
    -- p2
    call_procedure_c;
    at p1,p2 i want to know which is being called?
    is there any possibiliyt like that?
    can anybody help me on this?

    user632359 wrote:
    can u please provide me with an example?Here's some code someone posted a while back (can't remember who), but I saved it for a rainy day...
    create or replace procedure who_called_me( owner      out varchar2,
                             name       out varchar2,
                             lineno     out number,
                             caller_t   out varchar2 )
    as
        call_stack  varchar2(4096) default dbms_utility.format_call_stack;
        n           number;
        found_stack BOOLEAN default FALSE;
        line        varchar2(255);
        cnt         number := 0;
    begin
        loop
            n := instr( call_stack, chr(10) );
            exit when ( cnt = 3 or n is NULL or n = 0 );
            line := substr( call_stack, 1, n-1 );
            call_stack := substr( call_stack, n+1 );
            if ( NOT found_stack ) then
                if ( line like '%handle%number%name%' ) then
                    found_stack := TRUE;
                end if;
            else
                cnt := cnt + 1;
                -- cnt = 1 is ME
                -- cnt = 2 is MY Caller
                -- cnt = 3 is Their Caller
                if ( cnt = 3 ) then
                    lineno := to_number(substr( line, 13, 6 ));
                    line   := substr( line, 21 );
                    if ( line like 'pr%' ) then
                        n := length( 'procedure ' );
                    elsif ( line like 'fun%' ) then
                        n := length( 'function ' );
                    elsif ( line like 'package body%' ) then
                        n := length( 'package body ' );
                    elsif ( line like 'pack%' ) then
                        n := length( 'package ' );
                    elsif ( line like 'anonymous%' ) then
                        n := length( 'anonymous block ' );
                    else
                        n := null;
                    end if;
                    if ( n is not null ) then
                       caller_t := ltrim(rtrim(upper(substr( line, 1, n-1 ))));
                    else
                       caller_t := 'TRIGGER';
                    end if;
                    line := substr( line, nvl(n,1) );
                    n := instr( line, '.' );
                    owner := ltrim(rtrim(substr( line, 1, n-1 )));
                    name  := ltrim(rtrim(substr( line, n+1 )));
                end if;
            end if;
        end loop;
    end;
    create or replace function who_am_i return varchar2
    is
        l_owner        varchar2(30);
        l_name      varchar2(30);
        l_lineno    number;
        l_type      varchar2(30);
    begin
       who_called_me( l_owner, l_name, l_lineno, l_type );
       return l_owner || '.' || l_name;
    end;
    /

  • Encryption of pl/sql package/procedures/function code

    Is it possible to make the code inside a package/procedure/function un readable to other users.
    As is some of the api package body code in portal ?
    thanks in anticipation.
    SD,

    PL/SQL Wrap Utilityhttp://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/c_wrap.htm#LNPLS016
    Note, however that you cannot revert back to original un-wrapped code from a code that has been wrapped. You would need access to the original source files to get the original source code.

  • Package/procedure/function calls done with in a package

    Hi Experts,
    Can anybody suggest me the table/ a query to find the package/procedure/function calls (with in the same db or remote) done with in a package.
    It would be great if we can provide a tree like structure of the objects being called/used.
    btw.. dba_dependencies will provide me the info about the global procedures only not the local ones used with in the package body.
    Appreciate your time..
    Thanks
    Manju

    manjukn wrote:
    Hi Experts,
    Can anybody suggest me the table/ a query to find the package/procedure/function calls (with in the same db or remote) done with in a package.
    It would be great if we can provide a tree like structure of the objects being called/used.
    btw.. dba_dependencies will provide me the info about the global procedures only not the local ones used with in the package body.
    Appreciate your time..What database version do you have?
    11g I think provides some sort of fine grained dependency information which can detail packages, but prior to 11g you can only get dependencies on the database objects themselves of which functions/procedures within a package are not, as the package itself is the object.
    I don't think there's any easy way to find out from any tables or views and I think third party tools would have to parse the code to determine such things themselves, so that may be one of your only options.

  • Privilages for Package.procedure

    Hi all,
    can any one plzz help me out how to grant privilages for package.procedure.
    I had given grant execute on Package but its not working out.
    Thanks in Advance

    <FONT FACE="Arial" size=2 color="2D0000">
    The reason may be
    ORA-00942:     table or view does not exist
         ORA-06512: at line <number> ? check in that line number
       * the spelling of the table or view name.
        * that a view is not specified where a table is required.
        * that an existing table or view name exists.
      -SK
    Edited : See to that table/view used in the packages can be accessed by  granted user
    </FONT>

  • Synonyms for packaged procedures

    Heres something that is currently bothering me.
    Why are we not allowed to create synonyms for procedures and functions within packages ?
    Our database has too many individual procedures and functions for my liking and I would like to move some of them into packages. Consequently I want to create synonyms to avoid changing application code.
    I have found metalink note 1061643.6 which confirms this cannot be done, but it also goes on to say:
    "Oracle does this using the STANDARD package with overloaded functions and procedures such as TO_CHAR() and TO_DATE(), but how Oracle does this is proprietary information and is not available to the public."
    (Thanks Oracle)

    The basic reason for this restriction is that the Oracle synonyms are alternative names only for database objects, not for PL/SQL objects like packaged function and procedures.
    But moving stored procedures/functions to packages is a good idea, recommended by all the experts, with many benefits for you in the future.
    There is a simple solution for you problem, with very little impact on the continuity or performance of your applications:
    1. Copy the code of the DB stored procedures and functions to PL/SQL packages, mirroring them into packages subprograms.
    2. Replace the body of the DB procedures and functions with plain calls to their packages equivalents, transforming them effectively into wrappers behaving like synonyms.
    3. Change gradually the code of the application to call directly the packages functions and procedures
    4. When the change is completed, delete the wrappers.
    BTW If Oracle does not support a feature, than you it's better not to use it. Modifying the STANDARD package or using some volatile, undocumented features is not a clever move...

  • Help with Oracle packaged procedures/functions in JDBC

    Up to this point I've pretty much used vanilla SQL calls for Oracle (with the JDBC thin driver).
    However, I just received a PL/SQL script (that I didn't write) which I need to execute in a Java application (and get a result set). So I started looking at the Callable object. However, I'm having problems:
    I'm trying to execute the following, piece by piece:
    exec pay_balance_pkg.set_context('TAX_UNIT_ID','143') ;
    select /*+ ORDERED */
    ppf.employee_number,
    ppf.full_name,
    pdb.balance_name,
    ppa.effective_date,
    pay_balance_pkg.get_value(pdb.defined_balance_id, paa.assignment_action_id) amount
    from
    lots more SQL
    Using a Callable statement, I can run the pay_balance_pkg.set_context('TAX_UNIT_ID','143') as "{call pay_balance_pkg.set_context(?,?)}" and set up the input parameters. It runs.
    But the pay_balance_pkg.get_value(pdb.defined_balance_id, paa.assignment_action_id) attempt generates errors because of the implicit parameters (pdb.defined_balance_id, paa.assignment_action_id). I was assuming the previous call set up the "context" for these parameters. But it doesn't seem to in JDBC.
    What's the solution for this?
    Is there a way to just "run" the .sql file via JDBC or JDeveloper? Or do I literally have to parse out the PL/SQL and SQL from the file?

    Thanks for the reply.
    It turned out that within that "large chunk of SQL", there was a package call that wasn't returning the expected results... which mucked up the rest of the SQL call.
    Apparently it was a permissions issue in that the package didn't like to be called from JDBC; but would work fine out of SQL*Plus. Have you heard of this?
    I ended up just throwing the first package call into an an anonymous PL/SQL block, and then doing the SQL call... both in SQLJ. Only because the app is throw-away. Otherwise I agree: it would have been better in a stored procedure/function.

  • Browser bug for package procedure named "delete"

    One should not use a reserved word when naming stored procedures, but while Oracle allows one to create a packaged procedure or function named "delete" (at least in 9.2 through 11.2), an object so named prevents the object browser and outline window from properly displaying all procedure and function names.
    Test case:
    CREATE OR REPLACE PACKAGE my_pk
    AS
    PROCEDURE delete;
    PROCEDURE p;
    END my_pk;
    The object browser shows the word "PROCEDURE" but not any of the procedure names.
    - Doug

    Hi Doug,
    Thanks for reporting this issue. I logged a bug for it:
    Bug 14474608 - FORUM - USING DELETE AS PACKAGE PROCEDURE NAME, NAV TREE RENDERS IMPROPERLY
    Also note that using something like "PROCEDURE delete(key NUMBER);" prevents any member nodes from showing in the package's tree. Many other "reserved words" like select, create, insert result in compilation failure in both SQL*Plus and SQL Developer, but apparently your case should work.
    Regards.
    Gary

  • Differences between Package & procedure/function

    hi everybody,
    can anyone tell me why we need to go for functions eventhough we are having procedures and why we need to go for packages eventhough we are having procedures&functions
    Best Regards,
    bobby

    Hi,
    We have to go for functions though we have procedures, because in cases we have to return the values to a select statement.
    ex: select abc from dual;
    where abc is a function which will return a value to the select statement on computing the result.
    And also functions must and should return a value.
    We use packages though we have both procedures and functions
    1) Overloading : Use the same subprogram name for multiple times by changing the parameters
    2) Security : We can declare any of the subprograms as private with in package. so that the subprogram can't accessed outside of this package. And the functions and procedures with in packages are more secured than outside ones because they have to call by package name.
    ex: there a procedure abc with in xyz package
    you have call it by xyz.abc
    3) Reduce Network traffic : when you call procedure/function with in a package entire body will store in RAM. so further if u want use other subprograms with in the package it will take directly from RAM, no need to go to the database again.
    4) Ease of maintainable : We can easily maintain.

  • SQL query statement  for stored procedure / function listing ...

    Hi everyone,
    Is there a SQL query to list all the stored procedures and functions of an user in an Oracle 8 database?
    I have this idea:
    select * from USER_SOURCE where TYPE = 'PROCEDURE' or TYPE = 'FUNCTION'
    but I am not too sure whether this is correct.
    Thanks in advance,
    Eric

    Yeah
    I agree with you Garcia , my above posting was a correction to the query mentioned in the question only.
    you are correct
    If you only want the name of the object,
    SELECT Object_Name from User_Objects where object_type in ( 'PROCEDURE' ,'FUNCTION');
    is much faster than Selecting (distinct) from User_Source.

  • How to find the grants given to user for package/procedure?

    Hi all,
    how to find the grants in oracle for what all are the grants a user is having for package and procedure?
    Thanks & Regards,
    M.Murali..

    M. Murali
    Questions like this are asked over and over again on numerous sites on the Internet, including this forum, and answered.
    You are aware this forum has a 'Search Forum' button?
    PLEASE USE IT and STOP asking FAQ and DOC questions!!!!!!!!!!!!!!!!!!!
    Sybrand Bakker
    Senior Oracle DBA
    Experts: those who did read the documentation

  • Messages in forms for stored procedures/functions

    Hi!
    i wand to send message or raised exception from the
    stored procedure/function to the oracle forms during
    processing . how can i do this
    Thanking U

    Declare
      invalid_code  EXCEPTION;
      PRAGMA        EXCEPTION_INIT     (invalid_code, -20009); -- raised from server side functionBEGIN
    DO what eva ..... to raise exception
    EXCEPTION
    WHEN invalid_code
    THEN handle appropriately
    END;
    Thanks,
    N.

  • Ability to filter out Views, Indexes, Packages, Procedures, Functions, etc.

    Under Connections, I choose my database, then the user, and from there I view my Tables. I have no need to view Views, Indexes, Packages, Procedures, etc., just the tables (which I am able to filter).
    Since the tree containing Views, Indexes, Packages, etc., take up a lot of real estate (I work with multiple databases, each with a specific user, or schema), is it not possible to filter these out?
    Thanks!
    Edited by: user9956988 on Jun 15, 2010 3:53 PM

    Just to double check that I'm interpreting the problem correctly, is the following true:
    select * from all_objects where object_name = 'DBA_SOURCE'
    returns nothing
    select * from dba_source where name = your PL/SQL module
    returns all the code

Maybe you are looking for

  • Transport Error - DS does not exist in Source system

    Dear All, I am getting below Error while transporting the DSO from DEV to Quality. DataSource  8ZM_ALT  does not exist in source system  DCQCLI041 of version A. I have checked the dataosource is active and available in Development system.  But Its gi

  • Failed to export images with droplet

    I've Created a droplet and tested it successfully in Photoshop, then I use this droplet by select it in Post-Processing when I export DNG to TIFF in Lightroom, but there's a problem: 1. If PS is not opened when I'm exporting images in LR, the droplet

  • Body of my email won't printout

    I am using Outlook Express on Mac OS X but the body of my emails wont print out. I just get a top strip, the print preview is also blank except for a top header strip.  The printer ios fin from other devices.

  • Oracle 11gR2 for RHEL5.5 – 32Bit version

    Hello, I am trying to install Oracle 11g R2 on RHEL5.5 – 32Bit version. But some one psoted that 11g r2 is not supported on RHEL5.5 – 32Bit version. I am tyring to find the correct posting on internet but not able to find till.. Any idea about it , c

  • My iphone 4s has trouble connecting to my home WIFI.

    Unless im standing in my study i am unable to join my wifi network from anywhere in the house. Once i step out, i lose connection and im "unable to join wifi network". I can see my network pop up in wifi menu of the settings but when clicked i almost