PERL and STORED PROC

Hi can anyone help and post a perl example of calling a stored proc from perl?
for example
TYPE CharRECORD IS RECORD (Test TestTable.TestField%TYPE );
TYPE TestCtype IS REF CURSOR Return CharRECORD ;
PROCEDURE SP_TEST (TestC IN OUT TestCtype )
As
Begin
Open TestC for Select TestField from
TestTable;
End;
Where TestField is varchar2 (60)
null

RTFM
perldoc DBD::Oracle has some samples.
Basically what you do is
$sth=$dbh->prepare("begin
PL/SQL code;
END");
$sth->execute();
Regards
Yngvi

Similar Messages

  • Perl and stored proc question

    Hello,
    I have used ASP w/ many SQL Server stored procs before and many Oracle stored procs with Java before, but I have yet to embark on calling stored procs from Perl.
    My current insert has been like this:
    my $dbh = DBIConnect->connect;     
    my $query1;
    $query1 = "INSERT into DEFAULT_PROJECT (NAME, EMAIL, LOCATION,PHONE,MGRNAME,MGREMAIL,"
        ."PROJNAME,PROJ_LOC,SPON_DEPT,SPON_BUS,PROJ_TYPE)
    ."values (?,?,?,?,?,?,?,?,?,?,?);"But am looking to replicate an equivalent call to an SP. ok, I've created my multi-table insert in SQL Plus, in PL/SQL, and it's just fine, no errors.
    Now I need to make the call.
    I've seen a few different things, including the use of DBIx like
    DBIx::ProcedureCall qw(sysdate);
    I've also seen something like
      $csr =  $dbh->prepare(q{
        BEGIN
          DEFPROJ_FORM_INSERTION;
        END;
       $csr->execute;I'm a bit confused having tried to shake down the CPAN board for a while with little luck.
    Anyone out there know how that call might look or go, given the supplied parameters and stored proc. name?
    I'd assume I'd be assigning the parameterized values much like I am now.
    Can any Perl/Oracle users out there shed any light on this?
    Thanks!

    alright, so I could not get that to work, but just to validate the insert statement I tried to alter it from an SP to a normal dynamic insert SQL statement.
    I get an Oracle error citing
    errERROR: Could not execute SQL! Error: ORA-00911: invalid character (DBD ERROR: OCIStmtExecute)
    DBI ERROR: ORA-00911: invalid character (DBD ERROR: OCIStmtExecute),Maybe I'm overlooking something simple. Anyone see anything out of place that pertains to the SQL statement?
    I think I have input it in a rather manageable, and easy to read block below:
    INSERT ALL
    INTO DEFAULT_PROJECT_USER
    (DEFPROJ_ID,DEFPROJ_ID_LTR,NAME,EMAIL,LOCATION,PHONE,MGRNAME,MGREMAIL,PROJNAME,PROJ_LOC, SPON_DEPT,SPON_BUS,PROJ_TYPE,REG_LEGAL,NETCRED_LOSS, EXPENSE_REDUC_CKB, STRAT_GOALS,AUDIT_COMPL,REV_GEN,CACS,CUSTOMIT,CUST_IMPACT,CALL_MGT,CALL_TRACK,
    CITILINK,DESKTOP,DIALER,DRI,ENGINEER,IMAGING,IPDT,MAINFR,MISC_OTHER,MORTSERV,MORTWEB,NON_MORTSERV,ORIG_PLAT,QUAL_MAP,DATAWARE_REPTS,SERV_APP_VDR,SOUTHBEND,WEB_SVCG,PROBLEM_RESOLVE,EXIST_PROC,BUS_OBJECTIVE,
    PENDING_PROJ,IMPACT_AREAS,REGULATORY_COMPLY,COMPLY_DEADLINE,SUB_DATE,EXPENSE_REDUCTION_TEXT,PRIORITY_RATING,ADDL_COMMENTS,PROJ_TYPE_OTHER,OTHER_EXPL_IT)
    values (defproj_user_seq.nextval,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,to_date(?,'YYYY-MM-DD HH:MI:SS'),SYSDATE,?,?,?,?,?)
    INTO DEFAULT_PROJECT_PROJMGR
    (DEFPROJ_ID,PROJ_MGR,STATUS,IT_PROJ_TYPE,IT_PROJNUMBER,FUNC_SPECS,FUNC_SPECS_DT,FUNC_SPECS_APPR_DT,BRD_APPROVED,BRD_APPROVED_DT,UAT_STARTDT,UAT_ENDDT,TESTER,RELEASE_DT, TARGETED_RELEASE_DT,BENEFIT_AMT,BENEFIT_CMTS,IT_LEVEL,IT_HOURS,FTES_SAVED,NUM_FTES,PROJQUE1,PROJQUE2,ACTUALCBA)
    VALUES (defproj_user_seq.nextval,NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL,NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL,NULL,NULL)
    INTO DEFAULT_PROJECT_QA
    (DEFPROJ_ID,TERM,DEFINITION,BUS_NEED,CUST_IMPACT,CONTACT_NAME,IMPACT,IMPACT_PROCESS,IMPACT_DESC,PROCESS_LOC,PROJ_SCHED,PROJ_JUSTIF,IMPL_DATE,PROJ_EXPL,
    PROJ_TYPE,PROJ_JUST_MIT,PROJ_OWNER,PROJ_DATE_STATUS)
    VALUES (defproj_user_seq.nextval,NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL,NULL, NULL,NULL,NULL)
    SELECT object_name AS DEFPROJ_ID_LTR FROM all_objects where rownum <= 1;what could be leading to an invalid character? The error doesn't show which line.
    Thanks, but NEVER MIND...I found it - it's stupid perl! As opposed to a good language (Java).
    It balks at the extra semicolon, unlike Java would.
    Oh, and why am I using Perl you ask? Other than the "yeah, good question response", it's a long story, but suffice to say they don't allow for our UNIX server to be used with Java, just Perl. : (
    I do use Java a good amount here, but sometimes we're bound to crap on another planet where it just isn't an option for the server on which we use Java!
    Maybe someday! : )
    Message was edited by:
    user515689

  • Session id and Stored Proc

    How to store session id in a variable and use that in a stored proc as input param.
    I have a Stored proc in oracle which uses one input param, i want to pass session id to this proc..
    I have created a procedure from odi, and called SP from it..placed this ODI proc in a package...bt dnt knw how to pass session id as input param..

    Hi Andy,
    You can create a varaible using substitution API for this,
    select <%=odiRef.getSession("SESS_NO")%> from dual
    And in the successive call SP pass the variable like #VAR_NAME
    Thanks,
    G

  • ORA-03113 with pool and stored proc

    We are experiencing a strange error when calling a stored procedure using a
    connection pool (WLS 5.1 SP10, Oracle 8). Everything works fine until the
    stored procedure raises a user-defined exception. When the connection is
    used again, we get the 03113 error. It appears that the connection is OK
    due to the testConnsOnReserve not returning an error, but on the next stored
    procedure call, the error happens. The database guys have no answers. Does
    anyone have a clue?
    Here is an ouput log showing what happens (this was done with a pool with
    only one connection):
    Got the exception for no BPI Record
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
    :7, :8); end;
    SQLException: SQLState() vendor code(20003)
    java.sql.SQLException: ORA-20003: Error at step- Select..,procedure
    p_getBPITrckIdForDataTblPk No BPI Record Found...
    ORA-01403: no data found
    ORA-06512: at "CIFPROC.PKG_UTIL", line 381
    ORA-06512: at "CIFPROC.PKG_BPI", line 901
    ORA-06512: at line 1
    at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
    Compiled Code)
    at weblogic.jdbcbase.oci.Statement.execute(Statement.java, Compiled
    Code)
    at
    weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
    Compiled Code)
    at com.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
    .java, Compiled Code)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    Release test worked!
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    Obtain the connection again
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Reserve test worked!
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Calling stored proc and get comm error
    Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
    :7, :8); end;
    SQLException: SQLState() vendor code(3113)
    java.sql.SQLException: ORA-03113: end-of-file on communication channel
    at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
    Compiled Code)
    at weblogic.jdbcbase.oci.Statement.execute(Statement.java, Compiled
    Code)
    at
    weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
    Compiled Code)
    at com.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
    .java, Compiled Code)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    Release test fails!
    Parsing: select count(*) from dual
    SQLException: SQLState() vendor code(3114)
    java.sql.SQLException: ORA-03114: not connected to ORACLE
    at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    at weblogic.jdbcbase.oci.Statement.execute(Statement.java, Compiled
    Code)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java,
    Compiled Code)
    at
    weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    at
    weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    at
    weblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
    Compiled Code)
    at weblogic.jdbcbase.pool.Connection.close(Connection.java, Compiled
    Code)
    at
    com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.ja
    va, Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
    .java, Compiled Code)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    Regenerating connection
    DriverManager.getDriver("jdbc20:weblogic:oracle:DCIF")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    trying
    driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d1
    fcf]
    getDriver returning
    driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d1
    fcf]
    weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
    Connecting to database using: bmgr/********@DCIF at 0
    SQLException: SQLState() vendor code(1012)
    java.sql.SQLException: ORA-01012: not logged on - (bmgr/********@DCIF)
    at
    weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
    at
    weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Connection
    EnvFactory.java:153)
    at
    weblogic.jdbc.common.internal.ConnectionEnvFactory.refreshResource(Connectio
    nEnvFactory.java:207)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.refresh(ConnectionEnv.java:677)
    at
    weblogic.common.internal.ResourceAllocator.resetThisOne(ResourceAllocator.ja
    va, Compiled Code)
    at
    weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    at
    weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    at
    weblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
    Compiled Code)
    at weblogic.jdbcbase.pool.Connection.close(Connection.java, Compiled
    Code)
    at
    com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.ja
    va, Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
    .java, Compiled Code)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
    Connecting to database using: bmgr/********@DCIF at 0
    Connected to database at: 160
    Parsing: select length(SYSDATE) from dual
    Executing: select length(SYSDATE) from dual
    Parsing: select VALUE from V$NLS_PARAMETERS where
    PARAMETER='NLS_NUMERIC_CHARACTERS'
    Executing: select VALUE from V$NLS_PARAMETERS where
    PARAMETER='NLS_NUMERIC_CHARACTERS'
    Done logging in at: 170
    Connection: using OCI API: OCI8
    Done with connection regen
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Parsing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
    :7, :8); end;
    Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
    :7, :8); end;
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Parsing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
    Executing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
    7]
    Parsing: select count(*) from dual

    Well, this seems to do the trick. We'll keep testing, but the errors have
    now disappeared for all instances of this problem.
    Thanks for the help!
    JDB
    "John Bauer" <[email protected]> wrote in message
    news:[email protected]...
    We'll try this, but it seems to be connection-oriented. If we have a pool
    of 5 connections, and an exception happens, only that connection seems tobe
    affected. The other connections in the pool work fine, and the proc works
    for those connections.
    "Joseph Weinstein" <[email protected]> wrote in message
    news:[email protected]...
    Hi.
    The issue is likely related to our caching of PreparedStatements
    for performance. If some DBMS failure occurs which could invalidate
    a PreparedStatement/cursor such that it could never be re-used,
    even after clearParameters) are called etc, then this case might
    occur. Please take the attached jar file, and add it to the
    weblogic.classpath ahead of the standard weblogic stuff, by
    editing your startWebLogic script. This will turn off caching, and
    should make the problem go away. Let me know...
    Joe
    John Bauer wrote:
    Here is our configuration.
    weblogic.jdbc.connectionPool.CifPool=\
    url=jdbc20:weblogic:oracle:QCIF,\
    driver=weblogic.jdbc20.oci.Driver,\
    loginDelaySecs=1,\
    initialCapacity=5,\
    maxCapacity=20,\
    capacityIncrement=2,\
    allowShrinking=true,\
    shrinkPeriodMins=30,\
    testTable=dual,\
    testConnsOnRelease=true,\
    props=user=BMGR;password=djr0t$
    We are using OCI 8.1.6
    "Maria Salzberger" <[email protected]> wrote in message
    news:[email protected]...
    Hi John,
    I have researched about this - but could not find a known issue
    which
    may
    be
    related to this.
    Which JDBC driver are you using?
    Kind Regards
    Maria Salzberger
    Developer Relations Engineer
    BEA Customer Support
    John Bauer schrieb in Nachricht <[email protected]>...
    We are experiencing a strange error when calling a stored procedure
    using
    a
    connection pool (WLS 5.1 SP10, Oracle 8). Everything works fine
    until
    the
    stored procedure raises a user-defined exception. When the
    connection is
    used again, we get the 03113 error. It appears that the connectionis OK
    due to the testConnsOnReserve not returning an error, but on the
    next
    stored
    procedure call, the error happens. The database guys have no
    answers.
    Does
    anyone have a clue?
    Here is an ouput log showing what happens (this was done with a
    pool
    with
    only one connection):
    Got the exception for no BPI Record
    getConnection returningdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,
    :5,
    :6,
    :7, :8); end;
    SQLException: SQLState() vendor code(20003)
    java.sql.SQLException: ORA-20003: Error at step- Select..,procedure
    p_getBPITrckIdForDataTblPk No BPI Record Found...
    ORA-01403: no data found
    ORA-06512: at "CIFPROC.PKG_UTIL", line 381
    ORA-06512: at "CIFPROC.PKG_BPI", line 901
    ORA-06512: at line 1
    at
    weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    atweblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
    Compiled Code)
    at weblogic.jdbcbase.oci.Statement.execute(Statement.java,Compiled
    Code)
    at
    weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
    Compiled Code)
    atcom.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
    j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
    s
    .java, Compiled Code)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
    a
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
    t
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    Release test worked!
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    Obtain the connection again
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    tryingdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Reserve test worked!
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Calling stored proc and get comm error
    Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,
    :5,
    :6,
    :7, :8); end;
    SQLException: SQLState() vendor code(3113)
    java.sql.SQLException: ORA-03113: end-of-file on communication
    channel
    atweblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    atweblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
    Compiled Code)
    at weblogic.jdbcbase.oci.Statement.execute(Statement.java,Compiled
    Code)
    at
    weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
    Compiled Code)
    atcom.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
    j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
    s
    .java, Compiled Code)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
    a
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
    t
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    Release test fails!
    Parsing: select count(*) from dual
    SQLException: SQLState() vendor code(3114)
    java.sql.SQLException: ORA-03114: not connected to ORACLE
    atweblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    at weblogic.jdbcbase.oci.Statement.execute(Statement.java,Compiled
    Code)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java,
    Compiled Code)
    atweblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    atweblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    atweblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
    Compiled Code)
    at weblogic.jdbcbase.pool.Connection.close(Connection.java,Compiled
    Code)
    at
    com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.j
    a
    va, Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
    j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
    s
    .java, Compiled Code)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
    a
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
    t
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    Regenerating connection
    DriverManager.getDriver("jdbc20:weblogic:oracle:DCIF")
    tryingdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    trying
    driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d
    1
    fcf]
    getDriver returning
    driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d
    1
    fcf]
    weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
    Connecting to database using: bmgr/********@DCIF at 0
    SQLException: SQLState() vendor code(1012)
    java.sql.SQLException: ORA-01012: not logged on -
    (bmgr/********@DCIF)
    atweblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
    atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Connectio
    n
    EnvFactory.java:153)
    at
    weblogic.jdbc.common.internal.ConnectionEnvFactory.refreshResource(Connecti
    o
    nEnvFactory.java:207)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.refresh(ConnectionEnv.java:677)
    atweblogic.common.internal.ResourceAllocator.resetThisOne(ResourceAllocator.j
    a
    va, Compiled Code)
    at
    weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    atweblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
    Compiled Code)
    atweblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
    Compiled Code)
    at weblogic.jdbcbase.pool.Connection.close(Connection.java,Compiled
    Code)
    at
    com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.j
    a
    va, Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
    Compiled Code)
    at
    com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
    j
    ava, Compiled Code)
    at
    com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
    s
    .java, Compiled Code)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
    a
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
    p
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
    t
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
    atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
    Connecting to database using: bmgr/********@DCIF at 0
    Connected to database at: 160
    Parsing: select length(SYSDATE) from dual
    Executing: select length(SYSDATE) from dual
    Parsing: select VALUE from V$NLS_PARAMETERS where
    PARAMETER='NLS_NUMERIC_CHARACTERS'
    Executing: select VALUE from V$NLS_PARAMETERS where
    PARAMETER='NLS_NUMERIC_CHARACTERS'
    Done logging in at: 170
    Connection: using OCI API: OCI8
    Done with connection regen
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    tryingdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Parsing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,
    :5,
    :6,
    :7, :8); end;
    Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,:5,
    :6,
    :7, :8); end;
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    getConnection returning
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Parsing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
    Executing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
    Parsing: select count(*) from dual
    Executing: select count(*) from dual
    DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
    trying
    driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
    c
    7]
    Parsing: select count(*) from dual
    B.E.A. is now hiring! (12/14/01) If interested send a resume to
    [email protected]
    DIRECTOR OF PRODUCT PLANS AND STRATEGY San Francisco,
    CA
    E-SALES BUSINESS DEVELOPMENT REPRESENTATIVE Dallas, TX
    SOFTWARE ENGINEER (DBA) Liberty Corner,NJ
    SENIOR WEB DEVELOPER San Jose, CA
    SOFTWARE ENGINEER (ALL LEVELS), CARY, NORTHCAROLINA San Jose, CA
    SR. PRODUCT MANAGER Bellevue, WA
    SR. WEB DESIGNER San Jose, CA
    Channel Marketing Manager - EMEA Region London, GBR
    DIRECTOR OF MARKETING STRATEGY, APPLICATION SERVERS San Jose, CA
    SENIOR SOFTWARE ENGINEER (PLATFORM) San Jose, CA
    E-COMMERCE INTEGRATION ARCHITECT San Jose, CA
    QUALITY ASSURANCE ENGINEER Redmond, WA
    Services Development Manager (Business Development Manager - Services)Paris, FRA; Munich, DEU
    SENIOR SOFTWARE ENGINEER (PLATFORM) Redmond, WA
    E-Marketing Programs Specialist EMEA London, GBR
    BUSINESS DEVELOPMENT DIRECTOR - E COMMERCE INTEGRATION San Jose, CA
    MANAGER, E-SALES Plano, TX

  • Migrate tables and stored proc from SQLServer 2005 Express to Oracle10G

    How to migrate tables and stored procedures from SQLServer 2005 Express to Oracle10G using SQLDeveloper? thank you very much

    Using Oracle SQL Developer Migration Workbench
    http://www.oracle.com/technology/tech/migration/workbench/index_sqldev_omwb.html

  • Getting error while invoking relational physical DS for sybase stored proc

    *com.bea.dsp.das.exception.DASException: com.bea.dsp.wrappers.rdb.exceptions.RDBWrapperException: {bea-err}RDBW0004: Error executing SQL query: [BEA][Sybase JDBC Driver][Sybase]SELECT INTO command not allowed within multi-statement transaction+.*
    I have created a physical DS function using "relational" in the wizard and connecting to sybase ASE stored procedure that is in unchained mode. I had configured the JDBC pool using BEA sybase non-XA 12.x driver.
    When i run the physical DS (or logical DS), i get the above error. The sybase srever(and stored proc) is hosted by an external system and right now i do not have access/contacts to change anything.
    After hours spent googling, it appears that the fix may possibly be setting "set chained off" before calling the stored proc. To achieve that, i tried the below two methods but nothing seems to work:
    - In the JDBC URL, set property via ?chained=off (also tried false instead of "off")
    - In Admin console/JDBC connection pool configuration/initSQL tried "SQL SET CHAINED OFF" and "SET CHAINED OFF"
    My ODSI version is 10gR3
    Oracle Workshop for WebLogic
    Version: 10.3
    Build id: 1137967
    I tried using java physical DS and get the same error. I wrote a test stored proc in my local PC sybase ASE and it runs fine. But i connected as "sa".
    I would like to exhaust all possible options from my side before making the long process of getting something changed in the external sybase DB like setting the proc mode to "anymode".
    Please help.
    Thank you.

    mikereiche wrote:
    Did the test stored proc use "SELECT INTO"?Yes. But it did not do much(code below)
    >
    Was the test stored proc tagged the same as the one that fails (chained/unchained?)Yes. "sp_procxmode" confirms that the test stored proc is in "unchained" transaction mode.
    >
    Can you get jdbc code that successfully calls the stored proc using the datasource?Yes, my colleague was trying the jdbc code and i was trying in the workshop with relational. She has left for the day so will post tomorrow. Please note that this is only for the test stored proc. The java jdbc also gets the same error for the "real" stored proc.
    >
    BTW - if you used "SET CHAINED OFF" as initSql, unless you have a table named SET, the sql will fail and the datasource will not be created. So that casts some doubt on whether the other setting "SQL SET CHAINED OFF" was applied.
    Also - the connections are reset to default when they are returned to the connection pool, so I think "SQL SET CHAINED OFF" should be used as the "Test Table Name" and Test On Reserve should be checked.Tried it now, but it does not work. I'm getting the same error.
    test stored proc:
    create procedure dbo.getCustomerMulti @cid_inp varchar(40)
    as
    begin
    select dbo.Customer.FirstName, dbo.Customer.cid, dbo.Customer.LastName, dbo.Customer.DateCreated, dbo.Customer.id into #temp from dbo.Customer
    select dbo.Customer.FirstName, dbo.Customer.cid, dbo.Customer.LastName, dbo.Customer.DateCreated, dbo.Customer.id from dbo.Customer where cid LIKE @cid_inp + '%'
    end
    Thank you.

  • MS SQL Server 7 - Performance of Prepared Statements and Stored Procedures

    Hello All,
    Our team is currently tuning an application running on WL 5.1 SP 10 with a MS
    SQL Server 7 DB that it accesses via the WebLogic jConnect drivers. The application
    uses Prepared Statements for all types of database operations (selects, updates,
    inserts, etc.) and we have noticed that a great deal of the DB host's resources
    are consumed by the parsing of these statements. Our thought was to convert many
    of these Prepared Statements to Stored Procedures with the idea that the parsing
    overhead would be eliminated. In spite of all this, I have read that because
    of the way that the jConnect drivers are implemented for MS SQL Server, Prepared
    Statments are actually SLOWER than straight SQL because of the way that parameter
    values are converted. Does this also apply to Stored Procedures??? If anyone
    can give me an answer, it would be greatly appreciated.
    Thanks in advance!

    Joseph Weinstein <[email protected]> wrote:
    >
    >
    Matt wrote:
    Hello All,
    Our team is currently tuning an application running on WL 5.1 SP 10with a MS
    SQL Server 7 DB that it accesses via the WebLogic jConnect drivers.The application
    uses Prepared Statements for all types of database operations (selects,updates,
    inserts, etc.) and we have noticed that a great deal of the DB host'sresources
    are consumed by the parsing of these statements. Our thought was toconvert many
    of these Prepared Statements to Stored Procedures with the idea thatthe parsing
    overhead would be eliminated. In spite of all this, I have read thatbecause
    of the way that the jConnect drivers are implemented for MS SQL Server,Prepared
    Statments are actually SLOWER than straight SQL because of the waythat parameter
    values are converted. Does this also apply to Stored Procedures???If anyone
    can give me an answer, it would be greatly appreciated.
    Thanks in advance!Hi. Stored procedures may help, but you can also try MS's new free type-4
    driver,
    which does use DBMS optimizations to make PreparedStatements run faster.
    Joe
    Thanks Joe! I also wanted to know if setting the statement cache (assuming that
    this feature is available in WL 5.1 SP 10) will give a boost for both Prepared Statements
    and stored procs called via Callable Statements. Pretty much all of the Prepared
    Statements that we are replacing are executed from entity bean transactions.
    Thanks again

  • Replacing null values in optional prompts and passing to stored proc

    Hi,
    I want to create a stored procedure with OPTIONAL prompts. When user does not pass a value for that parameter, I want to set the value for that parameter by selecting from a column in table then I WANT to use that paramvalue in sql within cursor of stored proc. How do I do that?
    In short, I want to do the following Here is the psuedocode:
    Create or replace procedure test (param IN varchar2 DEFAULT NULL)
    As
    var_param varchar(20);
    select param into var_param from dual;
    If param is null then select custid from table1 else var_param
    OPen ref_cursor for
    Select xyz from table2
    where fyy = var_para
    Can someone let me know the syntax on how to do this in stored proc?
    Regards,
    hena
    Edited by: 904385 on Dec 25, 2011 7:04 AM

    Hi,
    Merry Christmas, and welcome to the forum!
    Here's one way to do what you requested:
    CREATE OR REPLACE PROCEDURE     test
    (    param     IN     VARCHAR2     DEFAULT     NULL
    AS
        ref_cursor     SYS_REFCURSOR;
        var_param     VARCHAR2 (20)     := param;
    BEGIN
        IF  var_param  IS NULL
        THEN
         SELECT     custid
         INTO     var_param
         FROM     table1
    --     WHERE     ...     -- Unless table1 has only 1 row
        END IF;
        OPEN  ref_cursor
        FOR   SELECT  xyz
           FROM       table2
           WHERE       fyy     = var_param;
    END     test;Whatever you're trying to do, this is probably niot the simplest or most efficient way to do it.

  • Stored Proc and dates

    Hi All,
    Fairly new at this, and a little confused with dates and date formats.
    I run the following:
    alter session set nls_date_format = 'dd/mm/yyyy'
    If I select sysdate from dual:
    02/11/2008 --> so this is correct.
    Now what I can't figure out is why I get different results if I use an sql statement VS a stored proc.
    If I run this sql update statement:
    UPDATE MAPPER.CONV_CNSTNTS
    SET CN_VALUE = TO_DATE('12/05/2007','MM/DD/YYYY')
    WHERE CN_TYPE = 'CONV'
    AND CN_REFRNCE = 'CONVDATE';
    When I select this data it shows: 12/05/2007
    This works perfect.
    Now if I take the exact same statement and put it in a stored proc i get a different result:
    create or replace procedure proc_test_date as
    begin
    UPDATE MAPPER.CONV_CNSTNTS
    SET CN_VALUE = TO_DATE('12/05/2007','MM/DD/YYYY')
    WHERE CN_TYPE = 'CONV'
    AND CN_REFRNCE = 'CONVDATE';
    COMMIT;
    end;
    When I select this data it shows: 05-DEC-07
    Why is there a difference here? Is there a difference in the NLS settings that are used when you run an sql statement vs a stored proc?
    Thanks for your help in advance.

    Thank you for the quick response.
    Glad I am on the right track ... NLS settings are painful :)
    So I ran: alter session set nls_date_format = 'Month DD, YYYY';
    Ran my proc and then the select.
    Still the date shows up as: 05-DEC-07
    I looked at the nls_parameters
    select * from v$nls_parameters
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     Month DD, YYYY
    NLS_DATE_LANGUAGE ENGLISH
    I am using Oracle SQL Developer. I made sure these were set as well:
    Tool >> Preferences >> Database >> NLS Parameters
    Date Format --> MM/DD/YYYY
    Seems that I am missing something ...

  • Stored Proc output being truncated with latest ojdbc14 and classes12.jar

    Hello,
    I downloaded the latest ojdbc14.jar from Oracle website and used it with my Java program. I noticed a peculiar behavior. If my stored proc is returning a VARCHAR with large number of characters, the output is being truncated. This worked fine with the older ojdbc14.jar (and the older classes12.jar). It does not work properly with the new ojdbc14 and classes12.jar. Is there something that I am missing here?
    My Oracle Server version is - Oracle Database 10g Enterprise Edition Release 10.2.0.1.0.
    Below is the sample stored proc and the Java file to execute the same.
    Am I missing something here?
    CREATE OR REPLACE PROCEDURE TestOracleDriver (returnVal OUT VARCHAR2) IS
    BEGIN
    returnVal := '';
    FOR tmpVar in 1..2000
    Loop
              returnVal := returnVal || to_char(tmpVar) || ',';          
    END LOOP;
    END;
    import java.sql.*;
    import java.util.*;
    import java.util.Hashtable;
    import oracle.jdbc.driver.OracleTypes;
    public class OracleDriverTest
         public static void main(String argv[]) throws Exception
              Connection c = null;
              try
                   Driver dr = new oracle.jdbc.OracleDriver();
                   Properties props = new Properties();
                   props.put("user", "scott");
                   props.put("password", "tiger");
                   c = dr.connect("jdbc:oracle:thin:@SERVER_NAME:PORT:SID", props);
                   System.out.println("GOT A PLAIN CON" );
                   System.out.println("The driver is " + c.getMetaData().getDriverVersion() );
                   System.out.println("The DBMS is " + c.getMetaData().getDatabaseProductVersion() );
                   execute(c);
              catch (Exception e)
              e.printStackTrace();
              finally { try {c.close();} catch (Exception ign){} }
         private static String execute(Connection connection )
                   String procName = "TestOracleDriver";
                   CallableStatement cstmt=null;
                   ResultSet rs = null;
                   String returnedData = null;
                   try
                        cstmt = connection.prepareCall("{call " + procName+" (?)}");
                        cstmt.registerOutParameter(1,OracleTypes.VARCHAR);
                        cstmt.execute();
                        returnedData = cstmt.getString(1);
                        System.out.println("ProcTest ::execute --> Returned data is \n"+ returnedData);
                        return returnedData;
              catch (Exception e) {
                   System.out.println("ProcTest ::execute -->Error while executing "+procName);
                   e.printStackTrace();
                   return null;
              finally
                   try
                        connection.close();
                   catch (Exception e1)
                        System.out.println("ProcTest ::execute -->Error while closing connection ");
                             e1.printStackTrace();
                   }//end of catch
         }//end of finally
    }//End of execute method
    Regards,
    Hari
    Message was edited by:
    user553601
    Message was edited by:
    user553601

    Hari,
    If you think it is a bug, you can report it to Oracle Support via the MetaLink Web site.
    Good Luck,
    Avi.

  • BizTalk Stored Proce-passing XML as one of the Input parameter and String as another parameter

    I have a requirement in BizTalk that
    - I will receive XML from Source and i need to submit this XML data and two other string parameters in  SQL storeprocedure  as a parameters and submit data
    Ex: My_SP(myID Integer INPUT,myXML xml Input,mystring OUT)
    Could you please help me how call storeprocedure and submit multiple parameters in BizTalk.

    you can execute stored procedure by generating schemas from WCF-SQL Adapter.
    for passing parameters you will have to do the mapping to the Generated schema for Stored proc.
    I would suggest to do this in Message Assignment shape, there you can easily assign all the parameters.
    Integer and String parameters can be assigned from normal variables and XML parameter can be inserted as suggested by Abhishek-
    xmldoc=requestMsg;
    varOuterstring=xmldoc.Outerxml.Tostring();
    Please refer the below article.
    https://www.packtpub.com/books/content/new-soa-capabilities-biztalk-server-2009-wcf-sql-server-adapter
    http://msdn.microsoft.com/en-us/library/dd787968.aspx
    Thanks,
    Prashant
    Please mark this post accordingly if it answers your query or is helpful.

  • How to hide stored proc and tables schema

    hi,(sqlserver 2005 and sqlserer 2008 r2 express)
                I have to give my database to some body he has his own server, i do not want him to see my stored porcs code and/or name , and tables schema.
               I have used encryption to that,
    but i think , there is some code available on internet , which can be used to get the code from stored procs,
    please tel me how i can i accomplish the task.
    yours sincerely

    However, this works perfectly if the user is the owner of the database. Look
    that …
    • Create a new SQL login "login1"
    • Create a user named “login1” in master database
    • Grant CREATE DATABASE to login1
    • While impersonating login1, create a database called “dbteste”
    • Revoke CREATE DATABASE permission from login1
    • Revoke VIEW ANY DATABASE permission from PUBLIC
    • Register this server as login1
    • From the “login1” session, expand database tree. Now, you should see
    master, tempdb, dbteste
    • Grant VIEW ANY DATABASE to PUBLIC
    • From the “login1” session, you should see all the databases
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to migrate stored procs accessing columns "LEFT" and "RIGHT"

    Hello!
    I have to migrate a SYBASE11-Database to Oracle 8.1.7.
    How can I migrate Stored Procs that access tables that contain columns 'LEFT' and 'RIGHT'?
    OMWB reports a parse error "encountered: ,". If ommit the words 'left' or 'right' or if I write 'left()' or 'right()', it works. But I have to use these columns and we cannot change the database model.
    It doesn't work with quoted column names like this: "LEFT" or "RIGHT".
    I use OWMB 1.3.1.0.0. Anybody any ideas? Thanks in advance.
    Yours, Heiko Kaschube

    This is a simple matter to fix.
    As the words LEFT and RIGHT are treated as reserved words by the stored procedure parser, they cannot be used successfully as column names within Oracle PL/SQL.
    In order to get the stored procedure to parse, you can append an underscore to all references to LEFT and RIGHT e.g.
    left_
    then right click on the stored procedure name and select 'parse procedure' from the drop-down menu. The procedure will now parse and the generated PL/SQL can be viewed within the Oracle model menu tab.
    It will now be necessary to remove all the underscores previously appended to the words 'left' and 'right' from the PL/SQL version of the stored procedure in question. Again, this can be done within the Migration Workbench.
    Hope this helps.

  • Oracle Packages/Stored Proc and VB

    Hello,
    I have a new assignment that I have to start at the client site ASAP. The client wants all the Sql in Oracle Stored Procs/Packages and VB being the front end. I am used to embedding my sql statements in my VB apps and connecting through ADO's but the client does not want embedded sql statements. My question is this, when I make a connection, in accessing the cursor, do I have to loop through the cursor and store the data in an ADO recordset or do I have to connect to the cursor and manipulate the data directly? Please give example.
    The DB is Oracle 9i
    Thanks

    You are doing the right thing, there are examples of how to process result sets from stored procedures, including ASP/ADO at Asktom here

  • Stored proc to pull data from INV/OM/ASCP and load into a user interface

    i'm trying to pull the data from inv, om and ascp into a user interface ? help me write a stored proc to write 3 procedures, with 3 custom tables for the 3 diff source systems i.e., OM/INV/ASCP and also provide these 3 programs in the request set so that when request set is run, it runs the programs one after the other.
    -please help me with a simple step by step process in doing so ?
    Thanks in advance !!
    Edited by: 1003397 on May 20, 2013 3:59 PM

    i'm trying to pull the data from inv, om and ascp into a user interface ? help me write a stored proc to write 3 procedures, with 3 custom tables for the 3 diff source systems i.e., OM/INV/ASCP and also provide these 3 programs in the request set so that when request set is run, it runs the programs one after the other.
    -please help me with a simple step by step process in doing so ?
    Thanks in advance !!
    Edited by: 1003397 on May 20, 2013 3:59 PM

Maybe you are looking for

  • Populating HTML Page with fields from a Report

    Greetings all, I think I have finally figured out how to format my question about customizing reports I am using the Sample Applicaiton and I created a simple report (PAGE 20) using the DEMO_CUSTOMER table. The simple report shows the CUSTOMER_ID, CU

  • I can no longer deauthorize my pc

    Hello , I'm trying to no avail to deauthorize my pc so i can play my music. iTunes says i can no longer deauthorize this computer for i've exceeded my allotment until may 29thof this year.

  • How to create a dynamic textarea in AS2

    I am trying to create a dynamic textArea in AS2.  Here is what I have so far: import mx.controls.TextArea; var myTextArea:TextArea = new TextArea(); myTextArea.setSize(320, 240); myTextArea.move(10, 10); addChild(myTextArea); I have the textarea comp

  • Memberrange error on Financial Reports

    Hi there, We have an ASO cube and the outline is as follows : Time Period ......Year Total .......Otr1 .......Jan .......Feb Scenario ........Actual ........YTD Actual with MDX formula (CASE WHEN [Time Period].CurrentMember IS [Time Period] THEN ([Ye

  • Blob delete and reuse

    Hi All, I am successfully able to delete just the blob file from a record but after this operation, I am not able to upload new file to the same record. Wanted to know if this is possible and if so how. I am using this query for deleting blob: update