Compiling a frequently accessed Stored Procedure

RDBMS version :10.2.0.4.0 in a 2 node RAC
Our Production DB is 24x7 . Our development team has made a change in a frequently accessed Procedure's code.
At any given time this Stored proc is accessed by at least 5 sessions.
I have been asked to compile this Procedure with the new changes.
Since this is a frequently accessed, i think the only option i've left to compile this proc is to Shutdown the DB and start it up using
STARTUP RESTRICTand then compile it. But, this procedure is actually run by a DBMS_JOB , so even if i shutdown, when i restart it , the job will resume ie continue executing the stored proc. Right?
I cannot bring down the local listeners as they are listening for another DB in the cluster.
Is there any other better way ?

It's nothing to do with Oracle or any other technology -it's part of defining maintainable service levels.
Unless you really, really need 24/7 availability, it's always best to give yourself a window of downtime for doing upgrades, maintenance etc. A small bit of planned downtime can help prevent large periods of unplanned!
If you do need that 100% uptime then it needs to be architected in from the start - define your SLAs then architect an environment that can deliver. Unfortunately it is nearly always done the other way round, based upon what people would like, not necessarly what they need, or what is deliverable.

Similar Messages

  • Sqlexception ,when trying to access stored procedure

              hi
              i have a strange problem, iam using jsp code for accessing stored procedure in sql
              server database, below is my java code which calls stored procedure,
              <%
                   CallableStatement cstmt=null;
                   String sql= "{?= call ascs_submit_prem_adj(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
                   cstmt=con.prepareCall(sql);
                   cstmt.registerOutParameter(1,java.sql.Types.INTEGER);
                   cstmt.registerOutParameter(2,java.sql.Types.INTEGER);
                   cstmt.setObject(3,adjustId);
                   cstmt.setString(4,co_id);
                   cstmt.setString(5,policyNo);
                   cstmt.setString(6,subPolicy);
                   cstmt.setString(7,busDiv);
                   cstmt.setString(8,commAcct);
                   cstmt.setString(9,agentId);
                   cstmt.setString(10,premAmount);
                   cstmt.setString(11,dueDate);
                   cstmt.setString(12,lobCd);
                   cstmt.setString(13,commAmount);
                   cstmt.setString(14,commReason);
                   cstmt.setString(15,recovFlag);
                   cstmt.setString(16,recovPercent);
                   cstmt.setString(17,combId);
                   cstmt.setString(18,payFlag);
                   cstmt.setString(19,combAcct);
                   cstmt.setString(20,combSub);
                   cstmt.setString(21,paidFlag);
                   cstmt.setString(22,changeBy);
                   cstmt.setString(23,transDt);
                   cstmt.execute();
              ERROR LINE-->     adjustId=cstmt.getObject(2).toString();
                   spReturnCode=cstmt.getInt(1);
              %>
              i hv two output parameters,,when i try to get the second output parameter (ie ERROR
              LINE)
              IAM GETTING a strange error, i don't know what it is? this is the error i got
              Tue Feb 13 10:06:26 EST 2001:<E> <ServletContext-General> exception raised on '/
              PremAdjSubmit.jsp'
              java.sql.SQLException: Invalid column number (2). This table has 1 columns (a va
              lid index is 1 trough 1).
              at weblogic.jdbcbase.mssqlserver4.TdsResultSet.getEntry(TdsResultSet.jav
              a, Compiled Code)
              at weblogic.jdbcbase.mssqlserver4.TdsResultSet.getObject(TdsResultSet.ja
              va, Compiled Code)
              at weblogic.jdbcbase.mssqlserver4.TdsStatement.getObject(TdsStatement.ja
              va:2338)
              at jsp_servlet._premadjsubmit._jspService(_premadjsubmit.java, Compiled
              Code)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java, Compiled Code)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              ContextManager.java, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              a, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java, Com
              piled Code)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              detailed error-----------
              Error Found
              Oops! an exception occurred.
              The name of the exception is
              java.sql.SQLException: Invalid column number (2). This table has 1 columns (a valid
              index is 1 trough 1).
              can any one help me out...
              thanks
              san
              

              hi
              i have a strange problem, iam using jsp code for accessing stored procedure in sql
              server database, below is my java code which calls stored procedure,
              <%
                   CallableStatement cstmt=null;
                   String sql= "{?= call ascs_submit_prem_adj(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}";
                   cstmt=con.prepareCall(sql);
                   cstmt.registerOutParameter(1,java.sql.Types.INTEGER);
                   cstmt.registerOutParameter(2,java.sql.Types.INTEGER);
                   cstmt.setObject(3,adjustId);
                   cstmt.setString(4,co_id);
                   cstmt.setString(5,policyNo);
                   cstmt.setString(6,subPolicy);
                   cstmt.setString(7,busDiv);
                   cstmt.setString(8,commAcct);
                   cstmt.setString(9,agentId);
                   cstmt.setString(10,premAmount);
                   cstmt.setString(11,dueDate);
                   cstmt.setString(12,lobCd);
                   cstmt.setString(13,commAmount);
                   cstmt.setString(14,commReason);
                   cstmt.setString(15,recovFlag);
                   cstmt.setString(16,recovPercent);
                   cstmt.setString(17,combId);
                   cstmt.setString(18,payFlag);
                   cstmt.setString(19,combAcct);
                   cstmt.setString(20,combSub);
                   cstmt.setString(21,paidFlag);
                   cstmt.setString(22,changeBy);
                   cstmt.setString(23,transDt);
                   cstmt.execute();
              ERROR LINE-->     adjustId=cstmt.getObject(2).toString();
                   spReturnCode=cstmt.getInt(1);
              %>
              i hv two output parameters,,when i try to get the second output parameter (ie ERROR
              LINE)
              IAM GETTING a strange error, i don't know what it is? this is the error i got
              Tue Feb 13 10:06:26 EST 2001:<E> <ServletContext-General> exception raised on '/
              PremAdjSubmit.jsp'
              java.sql.SQLException: Invalid column number (2). This table has 1 columns (a va
              lid index is 1 trough 1).
              at weblogic.jdbcbase.mssqlserver4.TdsResultSet.getEntry(TdsResultSet.jav
              a, Compiled Code)
              at weblogic.jdbcbase.mssqlserver4.TdsResultSet.getObject(TdsResultSet.ja
              va, Compiled Code)
              at weblogic.jdbcbase.mssqlserver4.TdsStatement.getObject(TdsStatement.ja
              va:2338)
              at jsp_servlet._premadjsubmit._jspService(_premadjsubmit.java, Compiled
              Code)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java, Compiled Code)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              ContextManager.java, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              a, Compiled Code)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java, Com
              piled Code)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              detailed error-----------
              Error Found
              Oops! an exception occurred.
              The name of the exception is
              java.sql.SQLException: Invalid column number (2). This table has 1 columns (a valid
              index is 1 trough 1).
              can any one help me out...
              thanks
              san
              

  • 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)

  • JDBC - CallableStatement - Error in Accessing Stored Procedure of MS SQL

    Dear Friends,
    The following is the code to access a stored procedure of MS SQL Server 7.0 sp4,
              try
                   CallableStatement cstmt;
                   ResultSet rst;
                   cstmt = connection.prepareCall("{call backupdb[?,?]}");
                   cstmt.setString("db_name","SBIREMITLIVE");
                   cstmt.setString("path", "c:\testing.bak");
                   cstmt.executeQuery();
                   System.out.println("Stored Procedure called successfully");
              catch(SQLException se)
                   System.out.println(se.toString());
    when i execute this i am getting the error as " MS ODBC-MS SQL Server Syntax error or Access Violation "
    What's the problem exactly ? anybody came across this issue..if so...kindly help me....
    Here is my MS SQL Server stored procedure.....for reference
    create procedure backupdb(@db_name varchar(40), @path varchar(100)) as
    Backup database @db_name to disk = @path
    Regards,
    V.Prasanna

    Dear DigitalDreamer,
    Yes, as per your suggestion, it's working fine...thanks a lot...
    here is the code...
                   CallableStatement cstmt;
                   ResultSet rst;
                   cstmt = connection.prepareCall(" exec backupdb ?,? ");
                   cstmt.setString(1,"SBIREMITLIVE");
                   cstmt.setString(2, "c:\\testing.bak");
                   cstmt.execute();
    Regards,
    V.Prasanna

  • Access stored procedure in runtime

    I would like to know how I can access the stored procedure in the runtime and is there any way to call the stored procedure from fx (edit formula button).Otherwise, any suggestion is much appreciated.
    Thanks and Regards

    Hi All,
    Problem is solved after adding files to microsoft access 2000 runtime. runtime missing some DLLs related to sql server 2000 to update those files follow the links below
    http://support.microsoft.com/?kbid=287484
    http://www.microsoft.com/office/orkarchive/2000ddl.htm#accsql
    Thanks,
    Brahma

  • Passing Parameters in Crystal XI (v1) to SQL or MS Access Stored Procedures

    Post Author: mib
    CA Forum: Crystal Reports
    In Crystal Reports 8.5 I had a report with a parameter called WeekCommencing which was
    a datetime parameter.  This worked against a stored procedure in a SQL
    database and a union query with a parameter within MS Access database
    - my application works on either platforms.
    Now in Crystal XI, Crystal is now looking for a parameter called
    @WeekCommencing which would be the full name in the stored procedure
    but if I rename the parameter the same report would no longer work
    against the MS Access database.
    Anyone have any suggestions?

    Post Author: mib
    CA Forum: Crystal Reports
    In Crystal Reports 8.5 I had a report with a parameter called WeekCommencing which was
    a datetime parameter.  This worked against a stored procedure in a SQL
    database and a union query with a parameter within MS Access database
    - my application works on either platforms.
    Now in Crystal XI, Crystal is now looking for a parameter called
    @WeekCommencing which would be the full name in the stored procedure
    but if I rename the parameter the same report would no longer work
    against the MS Access database.
    Anyone have any suggestions?

  • UCCX 8.5 - Accessing stored procedure result

    Hi,
    I am trying to access a stored procedure through UCCX script.
    I can access a stored procedure by following SQL query through DBRead step and it is successfully getting executed.
    DECLARE         @return_value int,
                            @Result int;
                EXEC        @return_value = [dbo].[SP_ValidateUser]
                                @ContactPersonId =$input1 ,
                                @ContactPersonTypeid = $input2 ,
                                @Result = @Result OUTPUT;
             SELECT        @Result as '@Result'
    I have to get the output of stored procedure in UCCX script variable. Is there any way to get it through DBGet Step.
    Any help regarding this is greatly appreciated.
    Thanks,
    Indumathi.P

    Hi Indumathi,
    Have you got a response to this? I am also looking for a solution to get the output of Stored procedure in my UCCX local script variable. Can you kindly provide me with the script solution?
    Thank you
    Regards
    Jeesh

  • Java Stored Procedures + oralce.xdb.XMLType + initxdbj.sql

    In order to use XMLType object in java stored procedures, I need to import oralce.xdb.XMLType package. I got compiler error saying "Class oracle.xdb.XMLType not found" (See List1).
    I check my installed package, sure enough these is no "oracle/xdb/XMLType" or any xdb related one. (See list2) This surprises me since my 9i/Solaris installation was successful and spotless one.
    The 9i App Dev - XML doc states that script $ORACLE_HOME/rdbms/admin/initxdbj.sql could install that package. (See List3) The fact is no way this script could be found from Oracle901/Solaris8 or Oracle901/NT installations.
    If java program moved to client and included xdb_g.jar in CLASSPATH, then it is fine as Doc declares. It just failed to compile in server as stored procedures.
    Please help, Thanks.
    Andy Ting DBA (301)240-2223, [email protected]

    (now include Listings)
    In order to use XMLType object in java stored procedures, I need to import oralce.xdb.XMLType package. I got compiler error saying "Class oracle.xdb.XMLType not found" (See List1).
    I check my installed package, sure enough these is no "oracle/xdb/XMLType" or any xdb related one. (See list2) This surprises me since my 9i/Solaris installation was successful and spotless one.
    The 9i App Dev - XML doc states that script $ORACLE_HOME/rdbms/admin/initxdbj.sql could install that package. (See List3) The fact is no way this script could be found from Oracle901/Solaris8 or Oracle901/NT installations.
    If java program moved to client and included xdb_g.jar in CLASSPATH, then it is fine as Doc declares. It just failed to compile in server as stored procedures.
    Please help, Thanks.
    Andy Ting DBA (301)240-2223, [email protected]
    ====================================================================
    List 1:
    sql> select NAME,TYPE,SEQUENCE,LINE,substr(text,1,80) TEXT from user_errors order BY 1,2,3,4
    NAME TYPE SEQUENCE LINE
    TEXT
    proto4a/database/XMLTypeTest JAVA CLASS 1 0
    ORA-29535: source requires recompilation
    proto4a/database/XMLTypeTest JAVA SOURCE 1 0
    proto4a/database/XMLTypeTest:11: Class oracle.xdb.XMLType not found in import.
    proto4a/database/XMLTypeTest JAVA SOURCE 2 0
    proto4a/database/XMLTypeTest:12: Class XMLTYPE not found in import.
    proto4a/database/XMLTypeTest JAVA SOURCE 3 0
    Info: 2 errors
    ==============================================================
    List 2:
    sql> select OWNER,OBJECT_NAME,OBJECT_TYPE from all_objects
    where upper(object_name) like '%XMLTYPE%';
    OWNER OBJECT_NAME OBJECT_TYP
    SYS /219cdace_AQxmlTypeInfoRespons JAVA CLASS
    /a341e963_AQxmlTypeInfoRequest
    XMLTYPE TYPE
    XMLTYPE TYPE BODY
    XMLTYPE_LIB LIBRARY
    PUBLIC /219cdace_AQxmlTypeInfoRespons SYNONYM
    /a341e963_AQxmlTypeInfoRequest
    sql> select OWNER,OBJECT_NAME,OBJECT_TYPE from all_objects
    where upper(object_name) like '%XDB%';
    no rows selected
    ====================================================================
    List 3:
    Installing and using oracle.xdb.XMLType class
    The oracle.xdb.XMLType is available in the xdb_g.jar file in the ORACLE_
    HOME/rdbms/jlib where ORACLE_HOME refers to the Oracle home directory.
    Using oracle.xdb.XMLType inside JServer:
    This class is pre-loaded in to the JServer and is available in the SYS schema.
    It is not loaded however, if you have upgraded your database from an earlier
    version. If you need to upload the class into the JServer, you would need to run the
    initxdbj.sql file located in the ORACLE_HOME/rdbms/admin directory, while
    connected as SYS.
    Using oracle.xdb.XMLType on the client:
    If you need to use the oracle.xdb.XMLType class on the client side, then ensure that
    the xdb_g.jar file is listed in your CLASSPATH environment variable.
    =====================================================================

  • Oracle Stored Procedure call in a Derived Table?

    Can a statement that defines derived table in the Designer contain a call to an Oracle Stored Proc? The proc takes one varchar2 parameter and returns a result set that consists of one field of several records and is currently implemented via sys_refcursor (return type is flexible as long as it allows to pass the result set back)
    Is there any difference between BOXI R2 and R3.0 regarding to the matter?

    Hi there,
    In XI R 3 you can now created a special universe to use stored procedures.A stored procedure universe is a special universe that enables Web Intelligence users to access stored procedures residing in the database. In BusinessObjects XI Release 3, you can use stored procedures with Desktop Intelligence and with universes in Designer. You also benefit from universes that contain stored procedures for Crystal Reports and Web Intelligence.
    XI R 2 no can do.
    Hope this helps
    Jacques

  • [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'dbo.sp_SPNAMEHERE'.

    OK, something seemed to have changed with my system because this error is NEW. It might be related to my system upgrade from Vista to Win7, but just guessing here.
    I run a database on a corporate MS Sql Server (2005) and an ASP application that connects via ODBC. The real world application works fine, however when I attempt to access Stored Procedures from Dreamweaver (on my development machine)  I am getting the following error:
    [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure 'dbo.sp_SPNAMEHERE'.
    This only seems to happen on Stored procedures that RETURN a recordset.
    system:
    Win7
    Dreamweaver CS4
    Code: VBScript/Classic ASP
    SQL Server 2005
    Connecting via ODBC: MM_MY_STRING = "Driver={SQL Server};Server=wscxxxxxxxxx;Database=dbsystem;Uid=username;Pwd=XXXXXXXXXXXX"
    Stored procedures that do not return a recordset are not an issue.... this has put my development work at a standstill!!
    Thanks in advance!

    Well, I hate bumps, but I am really running out of solutions. I have now tried to use a system DSN on my development machine and that didnt solve the problem. I just un-installed DW and re-installed it and that didnt solve my problem either.
    This is very frustrating, because I cannot use any stored procs that return recordsets... I am stuck... can anybody think of a relatively easy work-around to working in DW w/ recordsets that come from SPs when you cant actually access them?
    The really weird thing is, when I build the command, and choose the stored proc, and give it valid input variables, and TEST it from the TEST button, everything works and data is returned as expected. Once I click "OK" and actually add it to the ASP page the recordset that should be visible isnt... and when I click the plus sign in the bindings window I get the error...
    Help!!

  • Stored Procedure with in param not working

    I have  a stored procedure that works  now I need to use an in Parameter . when I made modification now the stored proc says  "Source does not have a runnable target." I can't seem to figure out what is wrong wit it.
    using SQL developer  version 1.5.5
    here is the  stored proc
    CREATE OR REPLACE
    PROCEDURE STATEMENT_DOMESTIC_TEST
    ( s_date IN statement.statementdate%Type
    ) AS
    BEGIN
    INSERT INTO STATEMENT_DATA
                      (   STATEMENTNUMBER,
                          STATEMENTTOTAL,
                          STATEMENTDATE,
                          BALANCE_FORWARD,
                          CUSTID,
                          CUSTNAME,
                          STATEMENTPURCHASES,
                          STATEMENTPAYMENTS,
                          NOMAILNOPRINT,
                          SOLDTOCOUNTRYNAME,
                          CREDITZEROFLAG,
                          SOLDTOCOUNTRYCODE)
                SELECT  STATEMENTNUMBER,
                        STATEMENTTOTAL,
                        STATEMENTDATE,
                        BALANCE_FORWARD,
                        CUSTID,
                        CUSTNAME,
                        STATEMENTPURCHASES,
                        STATEMENTPAYMENTS,
                        NOMAILNOPRINT,
                        SOLDTOCOUNTRYNAME,
                        CREDITZEROFLAG,
                        SOLDTOCOUNTRYCODE
                            FROM  EROCKS.PS_JWF_STATEMENT
                                  WHERE (statementdate = s_date)and (STATEMENTTOTAL >0)
                                        and (SOLDTOCOUNTRYNAME is null or SOLDTOCOUNTRYNAME='US')
                                        and (TRIM(NOMAILNOPRINT) is null and NOMAILNOPRINT!='99');
    update STATEMENT_DATA H
                        set
                          ( H.REMTO_ZIP,
                            H.REMTO_CITY,
                            H.REMTO_STATE,
                            H.REMTO_MAILNAME,
                            H.REMTO_ADDR1,
                            H.REMTO_ADDR2,
                            H.REMTO_ADDR3,
                            H.SOLDTO_CITY,
                            H.SOLDTO_STATE,
                            H.SOLDTO_ZIP,
                            H.SOLDTO_ADDR1,
                            H.SOLDTO_ADDR2,
                            H.SOLDTO_ADDR3,
                            H.PHONE_PREFIX,
                            H.PHONE_NUMBER,
                            H.COMPANY_NUMBER,
                            H.STATEMENTMISC_CREDIT1,
                            H.STATEMENTMISC_CREDIT2)=
                      (SELECT J.REMTO_ZIP,
                              J.REMTO_CITY,
                              J.REMTO_STATE,
                              J.REMTO_MAILNAME,
                              J.REMTO_ADDR1,
                              J.REMTO__ADDR2,
                              J.REMTO_ADDR3,
                              J.SOLDTO_CITY,
                              J.SOLDTO_STATE,
                              J.SOLDTO_ZIP,
                              J.SOLDTO_ADDR1,
                              J.SOLDTO_ADDR2,
                              J.SOLDTO_ADDR3,
                              J.PHONE_PREFIX,
                              J.PHONE_NUMBER,
                              J.COMPANY_NUMBER,
                              J.STATEMENTMISC_CREDIT1,
                              J.STATEMENTMISC_CREDIT2
                              FROM STATEMENT_HEADER J
                                  WHERE  H.STATEMENTNUMBER= J.STATEMENTNUMBER);
    INSERT INTO EROCKS.STATEMENT_DATA_DETAILS
                      ( INVOICENUMBER,
                      STATEMENTNUMBER,
                      INVOICEDATE,
                      DOC_TYPE,
                      INVOICETOTAL,
                      PURCHASES,
                      PAYMENTS,
                      MISC_CREDIT1,
                      MISC_CREDIT2,
                      BUNUMBER,
                      BUNUMBER_RU,
                      REFERENCE_NUMBER,
                      DESCRIPTION, seq_number)
                        SELECT  H.INVOICENUMBER,
                                H.STATEMENTNUMBER,
                                H.INVOICEDATE,
                                H.DOC_TYPE,
                                H.INVOICETOTAL,
                                H.PURCHASES,
                                H.PAYMENTS,
                                H.MISC_CREDIT1,
                                H.MISC_CREDIT2,
                                H.BUNUMBER,
                                H.BUNUMBER_RU,
                                H.REFERENCE_NUMBER,
                                H.DESCRIPTION,
                                EROCKS.SEQ_STATEMENT.NEXTVAL
                        FROM STATEMENT  H
                            WHERE H.STATEMENTNUMBER IN
                                (SELECT STATEMENTNUMBER
                                    FROM STATEMENT_DOMESTIC);
    END STATEMENT_DOMESTIC_TEST;

    Hello,
    could it be, that you are not connected to a database? This is what the error message suggests.
    You cannot compile or execute a stored procedure without a database connection.
    Regards
    Marcus
    BTW: you should also consider to install a newer version of SQL Developer. The current version is 3.2.2

  • Is BC4J a viabl option for database with stored procedure (ref cursor) API?

    I'm about to begin a Web application development project. As foundation, we have a (Oracle) database of certain complexity that have a data access API developed with PL/SQL packages.
    This API is designed to get data through stored procedures/functions that return REF CURSOR.
    Personally I have been investigating about Oracle ADF/JSF, and a number of others J2EE technologies, and at this moment I am doubting if ADF BC are a viable option to my development team.
    I think this because I have noticed that one of the great drawback in ADF BC is the lack of simplicity to get data through stored procedures/functions that returns REF CURSORS.
    I have been looking for documentation and the only thing that I have found are two examples:
    1.- One that really do not work (fails in get data from ref cursor): ADF BC StoredProcedure Sample application.
    2.- And other published by Steve Muench in
    http://radio.weblogs.com/0118231/stories/2003/03/03/gettingAViewObjectsResultRowsFromARefCursor.html. This sample works fine.
    But, the problem with the approach of this last article is the amount (and complexity) of the code necessary to make so basic and recurrent operation as is "obtain data through a stored procedure (ref cursor)".
    Below it is the code that I have constructed to call a function that returns a ref cursor (based on steve's article).
    If this is the only way to make this (historically so basic and simple) task, then it is obvious that BC is not a viable technology to my (or I am in a mistake?), since we have about 50 stored procedures/functions to access the underlying data; that stored procedures/functions are key to development of the new application (and, still more, currently are used to anothers apps ).
    By all this, I would like consult to Oracle's people:
    1.- I really must reject BC as technology to implement this project ?
    2.- It is possible to access stored procedures in a simpler way using BC?
    3.- If the answer to 2 is NOT: in near future, the BC team has plans to give more support to the simple access to stored procedures?
    4.- If the answer to 3 is NOT: what another technology you recommend to construct my data access/business tier and still be able to using the others characteristics of ADF?
    Thank you very much for your guidelines.
    Regards, RL.
    ** And the code!!!
    ** ###   I am forced to do this for each call to a procedure???? ###
    package myrefcursor.model;
    import java.math.BigDecimal;
    import java.sql.CallableStatement;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    import java.sql.SQLException;
    import java.sql.Types;
    import oracle.jbo.JboException;
    import oracle.jbo.domain.NullValue;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.DBTransaction;
    import oracle.jbo.server.ViewObjectImpl;
    import oracle.jbo.server.ViewRowImpl;
    import oracle.jbo.server.ViewRowSetImpl;
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OracleTypes;
    public class TraePolizasViewImpl extends ViewObjectImpl {
        private static final String SQL = "begin ? := PKG_PRUEBA.trae_polizas(?);end;";
        private static final String COUNTSQL = "begin ? := PKG_PRUEBA.count_trae_polizas(?);end;";
        public TraePolizasViewImpl() {
        protected void executeQueryForCollection(Object qc,Object[] params,int numUserParams) {
            BigDecimal rut_contratante = null;
            Object[] theUserParam = null;
            System.out.println(params);
            System.out.println(params[0]);
            if (params != null)
                theUserParam = (Object[]) params[0];
            //if (theUserParam != null && theUserParam.length > 0 )
            if (! (theUserParam[1]   instanceof NullValue) )
                rut_contratante = (BigDecimal)theUserParam[1];
            storeNewResultSet(qc ,retrieveRefCursor(qc, rut_contratante));
            super.executeQueryForCollection(qc, params, numUserParams);
        protected void create() {
          getViewDef().setQuery(null);
          getViewDef().setSelectClause(null);
          setQuery(null);
        protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet rs) {
          rs = getResultSet(qc);
          ViewRowImpl r = createNewRowForCollection(qc);
          try {
            populateAttributeForRow(r,0, nullOrNewNumber(rs.getBigDecimal(1)));
            populateAttributeForRow(r,1, rs.getString(2));
          catch (SQLException s) {
           throw new JboException(s);
          return r;
        protected boolean hasNextForCollection(Object qc) {
          ResultSet rs = getResultSet(qc);
          boolean nextOne = false;
          try {
            nextOne = rs.next();
            if (!nextOne) {
              setFetchCompleteForCollection(qc, true);
              rs.close();
          catch (SQLException s) {
           throw new JboException(s);
          return nextOne;
        protected void releaseUserDataForCollection(Object qc, Object rs) {
           ResultSet userDataRS = getResultSet(qc);
           if (userDataRS != null) {
            try {    userDataRS.close();    }
            catch (SQLException s) { ; }  
          super.releaseUserDataForCollection(qc, rs);
        public long getQueryHitCount(ViewRowSetImpl viewRowSet) {
          return viewRowSet.getRowCount();
        private ResultSet retrieveRefCursor(Object qc, BigDecimal rut_contratante) {
          CallableStatement st = null;
          try {
            st = getDBTransaction().createCallableStatement(SQL, DBTransaction.DEFAULT);
            st.registerOutParameter(1,OracleTypes.CURSOR);
            if (rut_contratante == null)
                st.setNull(2, Types.NUMERIC);
            else
                st.setBigDecimal(2, rut_contratante);
            st.execute();
            ResultSet rs = ((OracleCallableStatement)st).getCursor(1);
            rs.setFetchSize(getFetchSize());
            return rs ;
          catch (SQLException s) {
            throw new JboException(s);
          finally {try {st.close();} catch (SQLException s) {;}}
        private void storeNewResultSet(Object qc, ResultSet rs) {
          ResultSet existingRs = getResultSet(qc);
          if (existingRs != null) {
            try {existingRs.close();} catch (SQLException s) {;}  
          setUserDataForCollection(qc,rs);
          hasNextForCollection(qc); // Prime the pump with the first row.
        private ResultSet getResultSet(Object qc) {
            return (ResultSet)getUserDataForCollection(qc);
        private static Number nullOrNewNumber(BigDecimal b) {
             try {
               return b != null ? new Number(b) : null;
             catch (SQLException s) { ; }
             return null;
        public BigDecimal getprutcontratante() {
            return (BigDecimal)getNamedWhereClauseParam("prutcontratante");
        public void setprutcontratante(BigDecimal value) {
            setNamedWhereClauseParam("prutcontratante", value);
    }

    no?

  • Hi to all... What is a  XML data provider,stored Procedure, personal data

    Hi to all... What is a  XML data provider,stored Procedure, personal data providers in deski.  when we use these data provider in desk top intelligence.. and use of it.
    Please give detail description of the above...
    Thanks for reply..........

    Hi,
    We can create Desktop Intelligence reports using XML Data Provider, Personal Data Files and Stored Procedure.
    Following is some detailed information about these three.
    Xml data provider:
    Xml data provider is used for the integration of external data sources stored in XML format.
    This is similar to HTML.
    Stored Procedure:
    A stored procedure is a set of SQL commands that has been compiled and stored on the database server.
    Once the stored procedure has been "stored", client applications can execute the stored procedure over and over again without sending it to the database server again and without compiling it again.
    Stored procedures improve performance by reducing network traffic and CPU load.
    Personal data files:
    u2022     *.prn files
         A PRN file is a special type of file which contains instructions for a printer, it tells the printer what to print on the page and where as well as which paper tray to use, what the paper size is and a number of other controls.
    u2022     *.asc files
          Between the values of a row any number of carriage returns  or blanks are allowed. In any case it is strongly recommended that the data table be stored in such a way that it can be read and edited easily.
           The values may be stored in any format (integer, floating point, exponential notation) and they must be separated at least by one blank. The class information must be of integer type, the row identifiers are interpreted as strings. The lines can have any length and must not contain any comment.
    u2022     *.csv files
    A CSV file is a specially formatted plain text file which stores spreadsheet or basic database-style information in a very simple format, with one record on each line, and each field within that record separated by a comma.
    Regards,
    Pradnya Kokil

  • Error connecting to stored procedure in crystal report

    Hello
    I'm using crystal reports 2008 with the latest service pack.
    i'm trying to access stored procedure using the mysql jdbc driver 5.17. The crystal report has been designed which works fine with a login that created the stored procedure but when i try to run with another login that will used to run the crystal reports
    The login has access to execute the stored procedure but entered in the crystal report it complains about
    "User does not have access to metadata required to determine stored procedure parameter types. If rights cannot be granted, configure with {noAccessToProcedureBodies=true} to have driver generate parameters that represent INOUT strings irregardless of actual paramter types"

    Hi Sharon
    Thanks for response.
    I have checked that the user has permission to read and write. When i try and execute the stored procedure in the database by login with the user, it runs fine.
    When i try and call the stored procedure from crystal reports it throws that error message.
    regards
    Naresh

  • Can I create a Stored Procedure That access data from tables of another servers?

    I'm developing a procedure and within it I'm trying to access another server and make a select into a table that belongs to this another server. When I compile this procedure I have this error message: " PLS-00904: insufficient privilege to access object BC.CADPAP", where BC.CADPAP is the problematic table.
    How can I use more than one connection into an Oracle Stored Procedure?
    How I can access tables of a server from a Stored Procedure since the moment I'm already connected with another server?
    Can I create a Stored Procedure That access data from tables of another servers?

    You need to have a Database Link between two servers. Then you could do execute that statement without any problem. Try to create a database link with the help of
    CREATE DATABASE LINK command. Refer Document for further details

Maybe you are looking for

  • EMOD - Parse error while using merge fields

    Hello Everyone, We are using EMOD for email campaigns. We have renamed "Contact" object to "Rep Contact". When I insert merge fields on Rep Contact object, I get parse error message... Parse error in file at line 40: Could not find matching '}' for r

  • How to stop message processing based on validation?

    Hello experts, I have a requirement to stop message processing in the graphical mapping based on validation results. Here is the scenario - messages are translated using graphical mapping and sent to the target system. An RFC lookup will be done to E

  • Aol Photo Gallery

    ernie goldstein Posts: 186 Registered: Feb 1, 2005 Re: Safari and Photo Gallery Posted: Nov 12, 2010 9:32 PM in response to: Klaus1 Reply Email Photo gallery working fine when using fire fox But not when using Safari. This all started when Safari cam

  • XML Publisher Desktop and Enterprise...?

    Hello, Apologies if I missed some obvious documentation or whatever... But.. I don't really understand how XML Publisher Enterprise and XML Publisher Desktop fit together. Does Desktop require Enterprise? Are they more complimentary, or is Desktop mo

  • Washing Machine FAIL

    I just dropped my iPod 4g in the washing machine and I left it in rice for a couple weeks. Now the touch screen works and the sound dose too, but the backlight wont work at all. If you get a glare off of the screen you can see the homepage. I dont ha