Stored Procs

I am trying to migrate a SQL Server 7.0 database to Oracle. There is a stored procedure in SQL Server, that needs to be migrated. I edited the stored procedure in the SQL Server 7.0 Source Model tried creating the Oracle Model, but it still gives me and error.. "failed to parse procedure text - CustOrderHist: Parse error at line 14 column 19. Encountered: <EOF>"
Could anyone help me out on this ? Where can I find an error reference manual on the Migration Workbench ?
Thanks,
Sandeep

Are you migrating the database using the Migration Tool?
If so have you managed to capture the stored procedure and therefore see the oracle code that it is trying to migrate in.It would therefore be a good idea to post the code onto this group.
If you have not managed to capture the procedure then you might be running MSQL specific code that is not ANSII standard and not picked up by the migration tool.Either way the MSQL code for the stored procedure will be helpful in this case.
Michael

Similar Messages

  • If statement in stored proc

    hi
    i have stored proc like this
    ALTER PROCEDURE [dbo].[p_member]
    @MemberID INT = NULL,
    @ID INT = NULL,
    @Type varchar(20) = NULL
    AS
    IF NOT EXISTS (SELECT Memberid FROM Member mcd  JOIN Pro p WITH(NOLOCK)
                   on mcd.ProgramID = p.ProgramID WHERE ((mcd.MemberID = @MemberID) OR (mcd.ID = @ID and p.CD = @Type)))
    BEGIN
               select 'CAN''T BE FOUND'
    END
    i am not sure what i am doing in if statement, its not working.my logic should be like 
    check if atleast on or the other is available ..ie memberid or id+type, if nto i need to print  message.
    thanks

    What do you get for the following:
    DECLARE @MemberID INT = 444,
    @ID INT = NULL,
    @Type varchar(20) = NULL;
    IF NOT EXISTS (SELECT Memberid FROM Member mcd JOIN Pro p WITH(NOLOCK)
    on mcd.ProgramID = p.ProgramID WHERE ((mcd.MemberID = @MemberID) OR (mcd.ID = @ID and p.CD = @Type)))
    BEGIN
    select 'CAN''T BE FOUND'
    END
    ELSE SELECT 'FOUND'
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • ** How to use TO_DATE function in Stored Proc. for JDBC in ABAP-XSL mapping

    Hi friends,
    I use ABAP-XSL mapping to insert records in Oracle table. My Sender is File and receiver is JDBC. We use Oracle 10g database. All fields in table are VARCHAR2 except one field; this is having type 'DATE'.
    I use Stored procedure to update the records in table. I have converted my string into date using the Oracle TO_DATE function. But, when I use this format, it throws an error in the Receiver CC. (But, the message is processed successfully in SXMB_MONI).
    The input format I formed like below:
    <X_EMP_START_DT hasQuot="No" isInput="1" type="DATE">
    Value in Payload is like below.
    <X_EMP_START_DT hasQuot="No" isInput="1" type="DATE">TO_DATE('18-11-1991','DD-MM-YYYY')</X_EMP_START_DT>
    Error in CC comes as below:
    Error processing request in sax parser: Error when executing statement for table/stored proc. 'SP_EMP_DETAILS' (structure 'STATEMENT'): java.lang.NumberFormatException: For input string: "TO_DATE('18"
    Friends, I have tried, but unable to find the correct solution to insert.
    Kindly help me to solve this issue.
    Kind Regards,
    Jegathees P.
    (But, the same is working fine if we use direct method in ABAP-XSL ie. not thru Stored Procedure)

    Hi Sinha,
    Thanks for your reply.
    I used the syntax
    <xsl:call-template name="date:format-date">
       <xsl:with-param name="date-time" select="string" />
       <xsl:with-param name="pattern" select="string" />
    </xsl:call-template>
    in my Abap XSL.  But, its not working correctly. The problem is 'href' function to import "date.xsl" in my XSLT is not able to do that. The system throws an error. Moreover, it is not able to write the command 'extension-element-prefixes' in my <xsl:stylesheet namespace>
    May be I am not able to understand how to use this.
    Anyway, I solved this problem by handling date conversion inside Oracle Stored Procedure. Now, its working fine.
    Thank you.

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

  • How to generate a report in pdf from a stored proc

    Hi, i need guidance on how to generate a report in pdf from an oracle stored proc.
    The environment is oracle 10gas + 10gdb.
    On a specific event, a PL/SQL stored procedure is called to do some processing and at the end of the processing to generate report which has to be sent to the printer (and optionally previewed by the user).
    Can anyone assist me with this?

    Hi ,
    One 'simple' way is by using the DBMS_SCHEDULER db package and the procedure CREATE_JOB(....) using as job_type the value 'EXECUTABLE'...
    Read for further info in 'PL/SQL Packages and Types Reference'.
    If you have access to OEM ... you can configure this there using wizard.....
    Other way is to use the External Procedure call capabiblity of Oracle DB Server...:
    http://www.oracle.com/pls/db102/ranked?word=external+procedure+call&remark=federated_search
    My greetings,
    Sim

  • Crystal Report using Stored Proc in JSP problem

    Hello,
    I am running a simple report using a stored proc(oracle). It runs fine when I run the report through Crystal. But when I tried running it using JSP it gives me this exception -
    com.crystaldecisions.report.web.viewer.CrystalRepo rtViewer
    Error formatting page : Unexpected Query Engine error
    Can some one pls advise why I am not able to run this report through JSP?
    My other reports with simple sql runs fine in my JSP.
    Here is my stored proc --
    PACKAGE BODY MY_TEST
    AS
    PROCEDURE getrecordset
    p_cursor OUT cursor_type
    IS
    BEGIN
    OPEN p_cursor FOR
    SELECT
    FROM
    DSR_CLASS_SET;
    END;
    END MY_TEST;

    Thanks for your comments.
    If I run the same query, report runs fine. So I guess it should also able to run this stored proc.
    Here is the detailed error ---
    Category:     com.crystaldecisions.reports.reportengineinterface
    Message:          failed to process getPage request
    Location:     
    Thrown:
    com.crystaldecisions.reports.reportengineinterface.EngineException: Error formatting page : Unexpected Query Engine error
         at com.crystaldecisions.reports.reportengineinterface.Engine.getPage(Unknown Source)
         at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.getPage(Unknown Source)
         at com.crystaldecisions.report.web.viewer.ReportAgent.a(Unknown Source)
         at com.crystaldecisions.report.web.viewer.CrystalReportViewer.goto(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source)
         at jsp_servlet._crystal.__test._jspService(__test.java:225)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:446)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Caused by: com.crystaldecisions.reports.formatter.formatter.c: Unexpected Query Engine error
         at com.crystaldecisions.reports.formatter.formatter.objectformatter.bf.<init>(Unknown Source)
         at com.crystaldecisions.reports.formatter.formatter.objectformatter.bf.a(Unknown Source)
         at com.crystaldecisions.reports.formatter.formatter.d.j.<init>(Unknown Source)
         at com.crystaldecisions.reports.formatter.formatter.d.j.if(Unknown Source)
         ... 19 more
    Caused by: com.crystaldecisions.reports.dataengine.k: Unexpected Query Engine error
         at com.crystaldecisions.reports.dataengine.ap.case(Unknown Source)
         at com.crystaldecisions.reports.dataengine.ap.jO(Unknown Source)
         at com.crystaldecisions.reports.dataengine.ap.aC(Unknown Source)
         at com.crystaldecisions.reports.dataengine.ap.aD(Unknown Source)
         at com.crystaldecisions.reports.dataengine.ap.case(Unknown Source)
         at com.crystaldecisions.reports.dataengine.au.a(Unknown Source)
         at com.crystaldecisions.reports.dataengine.a0.a(Unknown Source)
         at com.crystaldecisions.reports.dataengine.a0.aa(Unknown Source)
         at com.crystaldecisions.reports.dataengine.a0.<init>(Unknown Source)
         at com.crystaldecisions.reports.dataengine.a0.<init>(Unknown Source)
         at com.crystaldecisions.reports.dataengine.a0.a(Unknown Source)
         ... 23 more
    Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.d: Unexpected Query Engine error
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         ... 34 more
    Caused by: com.crystaldecisions.reports.queryengine.al: Unexpected Query Engine error
         at com.crystaldecisions.reports.queryengine.driver.l.if(Unknown Source)
         at com.crystaldecisions.reports.queryengine.ao.dZ(Unknown Source)
         at com.crystaldecisions.reports.queryengine.ao.f(Unknown Source)
         at com.crystaldecisions.reports.queryengine.ao.dK(Unknown Source)
         at com.crystaldecisions.reports.queryengine.b0.dB(Unknown Source)
         at com.crystaldecisions.reports.queryengine.bz.a6(Unknown Source)
         ... 35 more
    Any guess why I get this?

  • Error creating Crystal Report using Stored Proc Universe

    Hi,
    I have created a stored procedure Universe, using the new feature available in XI R3.
    This connects to an Oracle database, executing a PL/SQL procedure returning ref cursor.
    I have created a WebI report using this Universe, which works fine and functions as expected.
    So there are no problems with either my Oracle stored proc or the Universe.
    However, I would like to create a Crystal report (2008) using the same Universe.
    I can create the report ok - using the SP Universe.
    When I attempt to refresh the data I get an error:
    Failed to retrieve data from the database.
    Details: ORA-06550: line 1, column 7:
    PLS-00103: Encountered the symbol "." when expecting one of the following:
    begin case declare etc etc
    .................................My Procedure ...................
    CREATE OR REPLACE PROCEDURE BIADM.Bo_Test_Report_R
    (Deposit_Cursor IN OUT SYS_REFCURSOR)
    IS
    BEGIN
    OPEN Deposit_Cursor FOR
    SELECT DISTINCT foracid "A/C"
    , acct_name "A/C Name", acct_opn_date "OP/Date", schm_code "SchmCode"
    FROM gam@finrpt
    WHERE acct_cls_flg ='N'
    AND foracid ='2252020145001';
    --AND cust_id ='CB2020145'
    END Bo_Test_Report_R;
    Please Give me solution as early as possible.
    Masud Iqubal

    Moved to Universe Design forum.

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

  • 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

  • Unable to pass the values to stored proc using presentation variable in OBI

    Hi All,
    Need your help regarding in resolving an issue in OBIEE 10.1.3.4.1
    There is an OBIEE requirement whereby two prompts need to be defined.
    1.     Textbox prompt
    2.     Drop-down prompt
    The dropdown values should be populated using textbox prompt. So, we have used presentation variable in textbox prompt and passing the same to select query of drop-down.
    Until this step, the report works just fine.
    Now, the value in both textbox and drop-down needs to be passed to stored proc.
    While trying to pass the values by using the presentation variable, the following error comes-up saying
    Session variable has no value definition.
    Note:Although the corresponding session variable has been set to default value,still the error appears.
    Please advise.
    Regards,
    Prasad

    "Session variable has no value definition" I'm assuming typo error and it should be presentation variable.
    Set default value for presentation variable that may work

  • Stored Proc running twice using DBMS_Scheduler

    Hello all,
    I have a vb front end that calls a main stored proc which submits scheduler jobs to execute several stored procs asynchronously. Everything is working, except the part that the several stored procs are running twice. In the troubleshooting, I have eliminated the front end from being the culprit and the stored procs themselves. Essentially, when I call the stored proc using dbms_scheduler.create_job, it runs twice, even manually. I am about at wits end trying to figure out why: Using Oracle 11gR2
    I started off setting up the programs
    begin
    --create program
    dbms_scheduler.create_program
    ( program_name => 'prog_name'
    ,program_type => 'STORED_PROCEDURE'
    ,program_action => 'usp_sub_proc_1'
    ,number_of_arguments => 8
    ,enabled => FALSE
    dbms_scheduler.DEFINE_PROGRAM_ARGUMENT
    ( program_name=> 'prog_name'
    ,argument_position=>1
    ,argument_name => 'name'
    ,argument_type=>'VARCHAR2'
    /*the remaining 7 arguments are in code but not display for space reasons*/
    dbms_scheduler.enable('prog_name');
    end;Then the main stored proc executes this code:
    declare v_job_name varchar2(100);
        v_1 varchar(50) := 'All';
        v_2 varchar(50) := 'All';
        v_3 varchar(50) := 'All';
        v_4 varchar(50) := 'All';
        v_5 varchar(50) := 'TEST';
        i_6 integer := 1;
        v_7 varchar(50) := 'TEST_NE';
        ts_8 timestamp := current_timestamp;
    begin
        v_job_name := 'uj_dmo_1';
    dbms_scheduler.create_job (v_job_name
                                            ,program_name => 'prog_name'
                                            ,job_class => 'UCLASS_1'
                                            ,auto_drop => TRUE
    --set parameters
    dbms_scheduler.set_job_argument_value(v_job_name,1, v_1);
    dbms_scheduler.set_job_argument_value(v_job_name,2, v_2);
    dbms_scheduler.set_job_argument_value(v_job_name,3, v_3);
    dbms_scheduler.set_job_argument_value(v_job_name,4, v_4);
    dbms_scheduler.set_job_argument_value(v_job_name,5, v_5);
    dbms_scheduler.set_job_argument_value(v_job_name,6, to_char(i_6));
    dbms_scheduler.set_job_argument_value(v_job_name,7, v_7);
    dbms_scheduler.set_job_argument_value(v_job_name ,8, to_char(ts_8));
    --enable job
    dbms_scheduler.enable(v_job_name);
    --execute job
    dbms_scheduler.run_job(job_name => v_job_name , use_current_session => FALSE);
    end;
    ...And this is where I get the double execution of the job, but I am just not seeing it in my syntax, dba_scheduler_jobs, logging, etc. Any help is greatly appreciated, thanks!!

    Well apparently I will not win any Captain Obvious awards;
    With 34MCA2K2's response with "what doesn't work" for some reason turned the light on. After some more testing here is what I found.
    This code works as expected :
    Exhibit A
    begin
    dbms_scheduler.create_job (job_name =>'TESTER'
                                   ,job_type => 'PLSQL_BLOCK'
                                   ,job_action => 'declare test1 integer := 1; begin test1 := test1 + 5; end;'
                                   ,auto_drop => True
       /*dbms_scheduler.enable('TESTER');   */
       dbms_scheduler.run_job(job_name => 'TESTER', use_current_session =>FALSE);   
    end;As does this:
    Exhibit B
    begin
    dbms_scheduler.create_job (job_name =>'TESTER'
                                   ,job_type => 'PLSQL_BLOCK'
                                   ,job_action => 'declare test1 integer := 1; begin test1 := test1 + 5; end;'
                                   ,auto_drop => True
       dbms_scheduler.enable('TESTER');  
      /*dbms_scheduler.run_job(job_name => 'TESTER', use_current_session =>FALSE);    */
    end;Exhibit A will create the job and is visible in the schedulerjobs view, and the RUN_JOB will execute it even when not enabled, but the pl/sql will not drop the job.
    Exhibit B will create the job and once enabled, executes the job and then drops from schedulerjobs view.
    Therefore, my desired results for running the jobs once asynchronously and dropping immediately is....
    begin
        v_job_name := 'uj_dmo_1';
    dbms_scheduler.create_job (v_job_name
                                            ,program_name => 'prog_name'
                                            ,job_class => 'UCLASS_1'
                                            ,auto_drop => TRUE
    --set parameters
    dbms_scheduler.set_job_argument_value(v_job_name,1, v_1);
    dbms_scheduler.set_job_argument_value(v_job_name,2, v_2);
    dbms_scheduler.set_job_argument_value(v_job_name,3, v_3);
    dbms_scheduler.set_job_argument_value(v_job_name,4, v_4);
    dbms_scheduler.set_job_argument_value(v_job_name,5, v_5);
    dbms_scheduler.set_job_argument_value(v_job_name,6, to_char(i_6));
    dbms_scheduler.set_job_argument_value(v_job_name,7, v_7);
    dbms_scheduler.set_job_argument_value(v_job_name ,8, to_char(ts_8));
    /*enable job*/
    dbms_scheduler.enable(v_job_name);
    /*execute job (Do not execute the code below, it will lead to multiple executions)
    dbms_scheduler.run_job(job_name => v_job_name , use_current_session => FALSE); */
    end;

  • Value of a variable in my stored proc

    I have a cursor in my Stored Proc. which passes data to a variable "sRowcount" to store how many rows returned from the Cursor. In My Access app. I need to call the stored proc and pass the value of the last row returned.
    e.g.sRowcount=1,sRowcount=2,sRowcount=3,sRowcount=4,sRowcount=5,sRowcount=6. In my Access app, I need to call the stored proc. and get value of last row count sRowcount=6 and pass to somewhere else.
    Thanks

    YESSSS . Thanks you very much Kglad it wotk i put all in a function inside the filmstrip function Tload(theUrl){etc ect}and in the root i call it like this filmstrip.Tload(theUrl);   and it works
    code in the root var link1:Array = new Array();
    var LINK:String;
    var url:String;
    var whoOn:Number;
    whoOn=0;
    var x:XML = new XML();
    x.ignoreWhite = true;
    x.onLoad = function(success) {
    var photos:Array = this.firstChild.childNodes;
    for (i=0; i<photos.length; i++) {
    _root.link1.push(photos[i].attributes.link1);
    url=link1[whoOn];
    theUrl=url;
    filmstrip.Tload(theUrl);//<<--HERE
    x.load("category.xml");
    var cbListener:Object = new Object();
    cbListener.change = function(event_obj:Object) {
    trace(select.selectedItem.label);
    if (select.selectedItem.label == "Last updated") {
    whoOn=0;
    } else if (select.selectedItem.label == "Special") {
    whoOn=1;
    url=link1[whoOn];
    theUrl=url;
    filmstrip.Tload(theUrl);//<<-----HERE
    select.addEventListener("change",cbListener);

  • How to trigger a report based on a event/stored proc or sql dts completion

    Post Author: Crystaldev
    CA Forum: Publishing
    I want to run/trigger a crystal report based on file existence or based on a stored proc/sql dts/a value present in a sql table. The way I want to do is schedule a crystal report in crystal enterprise and then run the report based on a event like file existence or based on a sql dts completion or a value existence in a sql table. We are using crystal reports v10.
    I am not sure how we can do this, any help is appreciated. Thanks.

    Hi
    When you click on View Data, at bottom click on Edit button
    It will prompt a connection details tab wherein you can view and modify the connections
    Nik

  • Error committing transaction in Stored Proc call - prev solns not working

    Hi All,
    Our process invokes a DB adapter to fetch the response from the table for our request via Stored Procedure call but facing the below issue. Its a synchronous process. Stored Procedure is present inside the Package and we are calling the Stored procedure using that Package.
    What we did is created a DB datasource of XA type and tried to call the Stored Proc but it was giving a problem “ORA-24777: use of non-migratable database link not allowed” and hence according to this thread Using DB links in Stored proc call in DB adapter 11G SOA we have modified the datasource as non-XA type.
    While we do that, we could see that Stored Proc is called and the response is present in the reply payload inside the flow trace. But the instance is getting faulted and the error is “Error committing transaction:; nested exception is: javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the GlobalTransactionsProtocol attribute to LoggingLastResource (recommended) or EmulateTwoPhaseCommit for the Data Source.”
    We have tried the properties of global transaction support as one phase commit, emulate two phase commit and logging last resource but error remains the same.
    Database from which we are getting the response is of version "Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production". Will the database link error arises even if we connect to Oracle Database?
    Please could you advise me solutions to resolve this issue.
    Thanks in advance.

    You are using Non-XA because it means (among all others) that the commit issue can be handle by the DB as well.
    The Emulate Two Phase property imitating the XA transaction in that way, that it allows you to manage a local db transaction.
    You can stay with XA connection, but then you will have to use "AUTONOMOUS_TRANSACTION pragma" in your procedure.
    Enter the following link to find good explanation about all of your questions:
    http://docs.oracle.com/cd/E15523_01/integration.1111/e10231/adptr_db.htm#BGBIHCIJ
    Arik

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

  • Error executing DB2 stored proc

    Hi,
    We are trying to execute a Stored Proc in Mainframe DB2. We've prepared a PreparedStatement. The problem the stored proc works fine in some cases, but in some it fails even thouhg the data passed is same. Even the whole JVM crashes and there is no log in error.log file.
    Do you have any idea as to what might be the problem. We are using IBM WebSpehere5.0 and DB2v7.0
    Regards,
    Rohit

    For starters you should be using CallableStatement and not PreparedStatement.
    And if the VM goes down and no errors are thrown anywhere than it's time to talk to the vendor or consult the docs because that is beyond the scope of help you could be given here.

Maybe you are looking for

  • How do I convert an audio mp3 file to a text file?

    How do I convert an audio mp3 file to a text file?

  • How to get a date on different pages?

    Hey everyone, I am working on a daily planner for the office and have a script that automatically generates the dates but I don´t know how to get each of the dates on a different page. I'd really appreciate if anyone could help me get each date gener

  • Importing 9.2 to 10.2

    Hi All, I'm trying to import a full dump from 9.2 to 10.2 for days now and cannot figure out what the problem is. 10.2 is on a different server but also windows 2003 SP2. NLS_LANG of both machines are the same for client and server: AMERICAN_AMERICA.

  • DataTime type shows as Timestamp(6) in BAM Database Table

    Hi, I am new in BAM, Am facing an issue with BAM Data Object. I have two DateTime fields in DataObject. But when I look in BAM database Table,the field data type is stored as TIMESTAMP(6). I want both the elements in DateTime format. Is there any rea

  • Apps won't launch, just bounce once.  help please!

    Out of the blue (I haven't downloaded anything recently or done anything out of the normal) several apps (safari, iTunes and a few others) won't launch. They bounce once and nothing. I've repaired disk permissions and tried launching under another us