Re-compiling a package in a stored procedure

Hi All,
We are using Oracle 10g. I have coded a stored procedure that does many things one of which is re-creating a Materialized View using Dynamic SQL. However, when this Materialized View is created, a package that this stored procedure needs, becomes invalid. What is the syntax for recompiling the package using Dynamic SQL? I tried something like script listed below, but I am getting "*ORA-24344: success with compilation error*" error message. I like to re-compile the package before it's use in this stored procedure.
DECLARE
      v_sql         VARCHAR2 (1000);
      object_name   VARCHAR2 (50) := 'TEST.PS2_FNS366';
BEGIN
       dbms_output.put_line('This is a test.');
       v_sql := 'Alter package ' || object_name || ' compile  package';
       dbms_output.put_line (v_sql);
       EXECUTE IMMEDIATE v_sql;
       v_sql := 'Alter package ' || object_name || ' compile  body';
       dbms_output.put_line (v_sql);
       EXECUTE IMMEDIATE v_sql;     
END;Thanks,
Seyed

Hi Justin,
I agree with you. Initially, I didn't want to use materialized view in the stored procedure to load a table, but I a kind of was forced into it. I first tried using an Oracle View, but then the Oracle package using it was not finding the view. Then I tried to grant select to it, that failed too. That is when I decided to use a materialized view because, at least I could issue the needed grants.
After seeing your e-mail and Frank's, I went back to my original plan. I re-created the old view and then tried to give it the right grants. Here is what I tried and the resulting error message:
GRANT SELECT ON STUDENT.v_ben_reg_case_number TO SCOTT A grant similar to above results in ORA-01720: grant option does not exit for one of the underlying tables. Our DBA tried granting a developer role a system privilege called under_any_role, but that didn't solve it either.
Thank you for your assistance,
Seyed

Similar Messages

  • Call a function inside a package from a stored procedure

    Hello:
    I am kind of new to the stored procedure. Does anyone know how to call a function inside a package from another stored procedure?
    I have a existing function (func_b) inside a package (pack_a) and it returns a cursor. I want to call this function from a stored procedure (proc_c) so that I use the data inside the cursor.
    can I do the following in proc_c:
    my_cursor1 SYS_REFCURSOR;
    begin
    my_cursor1 := exec pack_a.func_b
    end
    It will be very helpful if anyone can point me to any reading or example. Thank you very much for your information.

    guys:
    Thank you for your information so far. I need some more help here. I was able to run the function in my stored procedure. However, I was not able to print the result on the screen to view the cursor result, although I am using dbms_output.put_line statement inside my stored procedure.
    I use the following statement to execute my stored procedure on sql*plus. I can tell the stored procedure is executed successfully, but I did see anything printed:
    DECLARE TEMP VARCHAR2(100);
    BEGIN PROC_LAWS_CAD_NAME_SEARCH('LPD', 'TEST DEVICE ID', 'TEST LAST NAME', 'TEST FIRST NAME', 'F', '11112009', TEMP); END;
    I tried to use 'set serveroutput on' and got the following error:
    ERROR:
    ORA-06502: PL/SQL: numeric or value error: host bind array too small
    ORA-06512: at line 1
    I am kind of confused now. thank you for your help.
    Jack
    Here is my procedure:
    create or replace
    PROCEDURE PROC_SEARCH
    ( AGENCY_ID IN VARCHAR2,
    DEVICE_ID IN VARCHAR2,
    L_NAME IN VARCHAR2,
    F_NAME IN VARCHAR2,
    SEX IN VARCHAR2,
    DOB IN VARCHAR2,
    CAD_NAME_SCH_RESULT_STR OUT VARCHAR2)
    AS
    v_agy_id varchar2(10);
    v_device_id varchar2(20);
    v_l_name varchar2(25);
    v_f_name varchar2(15);
    v_sex varchar2(1);
    v_dob date;
    -- this cursor is going to be used to store a list of warrant matching
    -- name search criteria
    cad_srch_cursor sys_refcursor;
    objSrch SEARCH_RESULT_TEMP%ROWTYPE;
    BEGIN
    cad_srch_cursor := SEARCH_PKG.SEARCH('TESTING', 'TESTER', null, null,null, null, getPhonetic('TESTING'));
    LOOP
    FETCH cad_srch_cursor INTO objSrch;
    EXIT WHEN cad_srch_cursor%NOTFOUND;
    --insert into SEARCH_RESULT_TEMP (name_last) values (objSrch.name_last);
    CAD_NAME_SCH_RESULT_STR := objSrch.name_last;
    dbms_output.put_line('First:'||objSrch.name_first||':Last:'||objSrch.name_last||':Middle:'||objSrch.name_middle);
    end LOOP;
    END PROC_LAWS_SEARCH;
    -----------------------------------------

  • 4gb file size limitation using java.io.* package in java stored procedure

    Does anyone know about file size limitations when using java.io.* package inside java stored procedures. I have some java stored procedures that read and write to files. They error out when run as a java stored procedure within oracle on files over 4gb. I have no problems with these procedures when I test them outside of oracle.

    I am using 10g Release 10.2.0.1.0, the java version returned by the Oracle JVM is 1.4.2_04
    When I tested it outside of oracle I ran it using the java run time in ORACLE_HOME\jdk\bin and it works perfectly on files larger than 4gb.
    Thank you for the UTL_FILE suggestion. I have considered using that but there is one method in Java that I can't seem to find a corresponding procedure for in PL/SQL.
    RandomAccessFile.setLength()
    This allows me to truncate a file. I have a need to strip bytes off the end of a file without creating a copy because I am working with large files and disk space may be limited. It is also much slower to read from the original file and writing the same bytes to a new file (minus the trailing bytes).
    If anybody has any insight about the 4gb java.io limitation in Oracle JVM or has a workaround in PL/SQL for the RandomAccessFile.setLength() method in Java, I would really appreciate the help.
    Thanks,
    Thach

  • Use of Java packages in Java stored procedures? (Oracle 10.2)

    Hi all-
    Does Oracle's Java stored procedures support Java packages? In all the examples I've seen, packages are never used, and when I added one to a test file, it compiled it just fine, but referencing the class from the package itself resulted in a compiling error.
    In other words, it seems to make absolutely no difference if I preface my Java class with
    package com.mycompany.whatever;
    and while I can "import com.mycompany.whatever.MyClass" in another Java file, it seems to not care at all whether I do so or not.
    Thanks for any clarification,
    Ilford

    Hi Ilford:
    Sure you can use fully package notation in your Java classes.
    Look at this Java source code:
    http://dbprism.cvs.sourceforge.net/dbprism/cms-2.1/src/com/prism/cms/core/
    All of them are Java Stored procedures.
    Best regards, Marcelo.

  • Getting error code 1 when calling SSIS package from a stored procedure (SQL Server 2008 R2)

    Hello,
    I am trying to execute a SSIS package from SQL Server 2008 R2 stored procedure but getting error code 1 (as per my knowledge, error code description is as below:
    0 The package executed successfully.
    1 The package failed.
    3 The package was canceled by the user.
    4 The utility was unable to locate the requested package. The package could not be found.
    5 The utility was unable to load the requested package. The package could not be loaded.
    6 The utility encountered an internal error of syntactic or semantic errors in the command line.
    Details:
    I have a stored procedure named "Execute_SSIS_Package" (see below sp) which executes 'Import_EMS_Response' SSIS package (when I execute this package directly from SQL Server BID it works fine it means package itself is correct) and calling
    it from SQL as:- EXEC Execute_SSIS_Package 'Import_EMS_Response'.
    Here I receives error code 1.
    Can anyone help me to resolve this issue please?
    Thanks in advance!
    CREATE PROCEDURE [dbo].[Execute_SSIS_Package]
     @strPackage nvarchar(100)
    AS
    BEGIN
     -- SET NOCOUNT ON added to prevent extra result sets from
     -- interfering with SELECT statements.
     SET NOCOUNT ON;
     DECLARE @cmd VARCHAR(8000)
     DECLARE @Result int
     DECLARE @Environment VARCHAR(100)
        SELECT @Environment = Waarde
     FROM  Sys_Settings
     WHERE Optie = 'Omgeving'
     --print @Environment
     SET @strPackage = '"\W2250_NGSQLSERVER\BVT\' + @Environment + '\' + @strPackage + '"'
     SET @cmd = 'dtexec /SQL ' + @strPackage +  ' /SERVER "w2250\NGSQLSERVER"  /Decrypt "BVT_SSIS" /CHECKPOINTING OFF /REPORTING E'
     --print @cmd
     EXECUTE @Result = master..xp_cmdshell @cmd, NO_OUTPUT
     --print @Result
    END

    It has something to do with the security.
    E.g. cmdshell is not enabled or the caller has not rights over the package.
    There could be a syntax error, too.
    I suggest you make the package runnable off a SQL Agent job then trigger the job from the stored proc with
    sp_start_job <job name>
    Arthur
    MyBlog
    Twitter

  • Deploy package with Java Stored Procedure without JDeveloper

    I have a set of Java Stored Procedures deployed as a package on a Oracle 8i server. Everything works fine in my development environment, and now I would like to deploy the same package in the customers runtime environment. Both environments are running Oracle 8i rel 2 on NT.
    Is there a simple way to use the JDeveloper .prf deployment profile without installing JDeveloper in the customers environment?
    If not, can I the get the .jar files and .sql scripts from JDeveloper to create the call specs and package bodys?
    I guess JDeveloper must have this information, and my idea was then to write a script using loadjava and SQL*Plus.
    Regards,
    Tom Bjerre

    you would not be able to take just the deployment profile and run it outside JDeveloper.
    You would be able to create archive of all java classes in the package using Deployment Wizard in JDeveloper.
    Then you can load the jar file using the utilities in 8i.
    JDeveloper does generate the SQL for CALL specs etc ., at the deployment time and it is printed in MEssage Viewer along with other information.
    Hope that info is useful for you
    raghu

  • Problem in package run inside stored procedure

    i have ssis package to import data from excel to database.
    package is running correctly inside BIDS.
    but when i run package under stored procedure it is giving error :
    Error:   Code: 0xC0014023
       Source: loop sheets in excel
       Description: The GetEnumerator method of the ForEach Enumerator has failed with error 0x80040E21 "(null)". This occurs when the ForEach Enumerator cannot enumerate.

    Hi BI_DEV_19,
    Does the package connects with network resources? If so, try set the job step to run under a proxy account that is created based on a domain account. In BIDS, the package runs under the Windows account that you log onto the operating system.
    The error message “The GetEnumerator method of the ForEach Enumerator has failed with error 0x80040E21” may occur because the ADODB.dll file is corrupted or missing.  You can check whether the ADODB.dll exists in the following folder:
    C:\program files (x86)\Microsoft.NET\Primary Interop Assemblies
    In this situation, you can back up the existing ADODB.dll file, and copy one from another machine to this server.
    Regards,
    Mike Yin
    TechNet Community Support

  • Remote execution of DTS packages from Java Stored Procedures

    I'm an Oracle 10G DBA and Linux/Unix Sysadmin looking for a Java guru to help me find a reusable template or locate a solid programming methodology (examples) that will enable me to connect via JDSI to SQL Server 2000/2005 and remotely execute DTS packages from within Oracle. I am working at office that's absolutely addicted to MicroSlop products and the DBA team cannot conceive of giving up their precious DTS packages. I've already converted their MS SQL Server 2000 database to Oracle 10G on RHEL4 via SQLDeveloper but I am unschooled in the art of java programming and would like to locate some sort of rudimentary template or examples or java class that can easily be loaded into the Oracle 10G database instance via the loadjava utility. These java classes/methods/stored procedures need to be executable from within embedded PL/SQL code and able to connect to SQL Server 2000 to execute DTS packages via passing dtsrun commands ... Any help or direction would be greatly appreciated.

    Hi Ilford:
    Sure you can use fully package notation in your Java classes.
    Look at this Java source code:
    http://dbprism.cvs.sourceforge.net/dbprism/cms-2.1/src/com/prism/cms/core/
    All of them are Java Stored procedures.
    Best regards, Marcelo.

  • Oracle stored procedure in a package

    Hello,
    I'm working on a Web service -> XI -> Oracle scenario.
    In the receiver side I'm using JDBC Adapter to call to stored procedure.
    I have stored procedure in a package.
    For example: package "price_list_pk" and stored procedure "is_pl".
    When I try to enter the stored procedure path to XML tags I need to separate between the package and the stored procedure with dot "." and dot is not allowed in XML tag.
    I want to now if you have answer for this problem
    Have other way to work with stored procedure in packages?
    Elad

    Hey everyone,
    What Elad means is that in the XML structure of JDBC there are 2 places you define the DB\SP name:
    1. Defined in the structure itself as an element name. (DT)
    2. Mapped with a constant to a subelement called TABLE. (MM)
    The MM shouldn't be a problem as a value can get the dot character.
    But, in the DT structure, because you define here a XSD (XML structure) there is a problem naming the element with the dot character being part of the name as this character is not accepted in a XML tagname.
    The right question is if anyone knows of a special XML attribute with which you could define that the element name would contain a dot character? Or else a creative way to call a Stored Procedure inside a Package despite the disabilities above?
    Ben

  • N-comp compilation of an Java Stored Procedure

    I am working on Oracle 9.2.0.2 Enterprise Server running on Windows 2000 Advanced Server SP3. I am trying to compile (N-comp) a Java Stored Procedure. It throws up quite a few errors. Normal deployment works fine.
    Oracle has acknowledged the error & provided a bug number. (Period)
    Is there a solution to this ? Has anyone attempted this with success on the environment mentioned above.
    Thanks..

    Thanks. One of the Oracle support staff told me it is a known bug.
    The bug number is 2453291
    "NCOMP DOES NOT WORK ON THE WINDOWS NT PLATFORM"
    While N-comp compilation of an Java Stored Procedure (SQLJ) am getting following errors :-
    softwares used
    Java ver :- JDK 1.3
    database :- oracle version 9.2 with JServer Rel 9.2.0.1.0
    Steps carried for Ncomp compilation
    1) sqlj -ser2class Ap_cm_am_exchange1.sqlj
    2) jar cvf ap_cm_am_exchange1.jar *.class
    3) dropjava -user host/[email protected] ap_cm_am_exchange1.jar
    4) loadjava -oci8 -resolve -force -user host/[email protected] ap_cm_am_exchange1.jar
    5) ncomp -user host/[email protected] -force ap_cm_am_exchange1.jar
    Also Pls find attached
    1) SQLJ code ( Ap_cm_am_exchange1.sqlj )
    2) complete error txt
    3) Ncomp log
    Errors
    error in: FindClassesToNcomp :java.sql.SQLException: ORA-29540: class oracle/jaccelerator/server/ap_cm_am_exchange1_minimalClassListAndTCDumper does not exist
    ORA-06512: at "DV58BOTEST2.JACCELERATOR___FIND_CLASS_LIST", line 0
    ORA-06512: at "DV58BOTEST2.JACCELERATOR_FIND_CLASS_LIST", line 1
    ORA-06512: at line 1
    java.sql.SQLException: ORA-29540: class oracle/jaccelerator/server/ap_cm_am_exchange1_minimalClassListAndTCDumper does not exist
    ORA-06512: at "DV58BOTEST2.JACCELERATOR___FIND_CLASS_LIST", line 0
    ORA-06512: at "DV58BOTEST2.JACCELERATOR_FIND_CLASS_LIST", line 1
    ORA-06512: at line 1
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
    at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java)
    at oracle.jdbc.oci8.OCIDBAccess.executeFetch(OCIDBAccess.java)
    at oracle.jdbc.oci8.OCIDBAccess.parseExecuteFetch(OCIDBAccess.java)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java)
    at oracle.jaccelerator.client.FindClassesToNcomp.doit(FindClassesToNcomp.java:82)
    at oracle.jaccelerator.client.JDBCDriver.run(JDBCDriver.java:80)
    at oracle.jaccelerator.client.FindClassesToNcomp.main(FindClassesToNcomp.java:17)

  • Trigger Unix Program from a stored procedure

    Is it possible to start a Unix program as a background OS process from a stored procedure?
    In fact I want to call a stored procedure which starts a Unix process. After the termination of this process get the results of the programm (a text file) using UTL_FILE package from the stored procedure and produce an HTML document based on the output of the started process using the htp package.
    Thanks, JV

    wrote:roadbike
    Whats the best way to start a host (Unix) program from a stored procedure or trigger without having to wait for a response from the program (i.e start it and forget it )The BEST way depends on your operating system and version of the Oracle database. If you are at Oracle 10g or higher, I would certainly suggest using dbms_scheduler. In 10gR2 you can set a program to execute on receipt of an event, and the trigger or stored procedure can be the cause of the event.

  • Stored Procedure Does Not Run Properly When Called From Portlet

    We have a simple Java portlet that calls a PL/SQL stored procedure which we wrote. The stored procedure sends a large number of emails to users in our corporation using the "utl_smtp" package. The stored procedure returns a count of the emails back to the Java portlet when it's finished. This number is displayed in the portlet.
    Our problem:
    The stored procedure functions as expected when run from a PL/SQL block in SQL*Plus, and the Java portlet calls the procedure properly when sending out a smaller number of emails (Less than 200 usually). When we get into a higher number of emails the procedure hangs when called from the portlet, but it STILL functions properly from SQL*Plus. It does not return the number of emails sent
    and the Java portlet is unable to return a SQLException. Also, we have noticed that emails are sent at a much slower pace from the stored procedure when it's called from the portlet.

    Any Ideas?

  • Calling a stored procedure runs into an error

    Hello,
    We are testing the Database Adapter.
    In our database we created the following
    - Table tt
    - Package ttpackage, with a procedure with 1 input and 1 output parameter which inserts a record in the tt table.
    (see scripts at bottom of message)
    We created a Database Adapter based upon this Package (Call a stored procedure or function) and register this Database Adapter with the Integration Server.
    When we invoke this Database Adapter and enter the input, we can see in the database that 4 records are created. The Web Service returns after a minute with an error
    How can we solve this problem?
    Regards Leon Smiers
    ERROR
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
         at java.util.Vector.get(Vector.java:710)
         at oracle.tip.esb.server.common.wsif.WSIFInvoker.readResponseHeader(Unknown Source)
    SCRIPT
    drop table tt
    drop sequence seq_tt;
    drop package ttpackage;
    create table tt
    (field1 number(10) not null
    ,field2 varchar2(25) not null
    ,status varchar2(1) not null
    ,primary key (field1)
    create sequence seq_tt;
    create or replace package ttpackage is
    procedure insert_tt(
    pi_field2 in tt.field2%type,
    po_status out klacht_data.status%type);
    end;
    show errors
    create or replace package body ttpackage is
    procedure insert_tt(
    pi_field2 in tt.field2%type,
    po_status out klacht_data.status%type) is
    begin
    po_status:='I';
    insert into tt
    (field1, field2,status)
    values(seq_tt.nextval,pi_field2,po_status);
    end insert_tt;
    end;
    show errors
    /

    Hello Dave,
    Thanks for the quick fix.
    I've tested the fix. The 'Array index out of range: 0' disappeared.
    I get, unfortunately, the following error. I already described the steps I take in the first message. Based upon the TTpackage I create a Database adapter, register it with the ESB and invoke the URL from the ESB.
    Regards Leon
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>env:Server</faultcode><faultstring>oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: An unhandled exception has been thrown in the ESB system. The exception reported is: "oracle.xml.parser.v2.XMLDOMException: Ongeldige naamruimte http://xmlns.oracle.com/pcbpel/adapter/db/OCOP/TTPACKAGE/INSERT_TT/ voor prefix xmlns
         at oracle.xml.parser.v2.XMLElement.setAttributeNS(XMLElement.java:1015)
         at oracle.tip.esb.utils.DOMUtil.copyContentsTo(Unknown Source)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.raiseEvent(Unknown Source)
         at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.processMessage(Unknown Source)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:869)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:460)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:177)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    </faultstring><faultactor></faultactor></env:Fault></env:Body></env:Envelope>

  • Calling stored procedure dynamically

    Hello,
    I have a feeling this is not possible but was wondering if it is possible to have a call within a package to a stored procedure that is outside the said package? And can a stored procedure outside a package call another stored procedure that is also outside a package?
    Reason is, i have a couple of packages that both contain a procedure that is exactly the same so for efficiency can i have the stored procedure that is used by both packages stored outside the packages where it can be called by them both?
    Thanks in advance

    Ah!!! So if i had for example, a stored procedure called total_Customers in Package1 and required to use this >in Package2, i could then have a call within Package2 that said;
    Package1.total_CustomersYes, if the procedure total_Customers in Package1 has been declared in the package specification
    I recommend you to study the PL/SQL User's Guide and Reference
    What Is a PL/SQL Package?
    http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/09_packs.htm#362
    Message was edited by:
    Jens Petersen

  • Triggers, Stored Procedures and Java

    Hi all.
    I started developing some useful (at least for me) Java Package, and I'm wondering if I'm doing the right thing.
    Let's say that I have a trigger that calls a Stored Procedure that calls a Java Package.
    Let's say that the Java Package can be used by more than one Oracle Schema.
    So, my question is:
    Should I load the package in every Schema ? Or should I load the package in the System (for instance) schema, creating synonyms for it (if possible) ? Or should I create both the package and the Stored Procedure in System, creating synonyms for the procedure ?
    I'm a little stuck in this....
    Another question : when my trigger fires, it launch the Stored Procedure and, consequently, my Java Package.... At this point, am I in the same transaction of the trigger ? Or the Java Package start a new "subtransaction" ?
    Thanks in advance for Your help.
    Best Regards
    Fabio GRANDE

    Do not create anything in the System schema. Create the package and procedure in one schema and create a public synonym that the other schemas can use to access it.
    And yes the trigger and anything it executes are all part of the same transaction. As long as none of the procedures are declared as an autonomous transaction, in which case that procedure would be a separate transaction.

Maybe you are looking for

  • How to print the file name in sap

    Hi All, I have requirment like, there is a folder in my local system, inside that folder there are 10 Excel file like file1.xls,file2.xls..............file10.xls how to print the file name of all these file in SAp like file1.xls file2.xls file3.xls f

  • Problem while import u201CSAPKU60003 & SAPKNA7013u201D into SAP CRM 2007

    Gentlemen, I have a problem while import u201CSAPKU60003 & SAPKNA7013u201D into SAP CRM 2007, My current Support Package Level is: SAP_ABA       700     0015 SAP_BASIS     700     0015 PI_BASIS      2006_1_700     0006 ST-PI     2005_1_700     0006 C

  • Ibook G4 (mid 2005) dual displays

    Greetings fellow mac users! I have a ibook G4 1.33 Ghz and I want to connect it to a projector. I understand that I would need a vga adapter but I want the ibook screen to display the software interface and I want the projector to show the composite

  • Regarding Work center

    Hi gurus, Presently I am working for a Engineering and Construction Project, I am new to Project systems. In this project client have one Fabrication unit and 20 Projects across the India. In project site also they are doing some production activitie

  • Loading Tree Node/Leaf causing numerous errors

    I am loading a tree with UNSPSC codes using an application engine program with code borrowed from a delivered app engine program. The code loads most of the codes, however I receive numerous errors as follows: Node not Found (92,3209) - I get this a