40EA1: Transaction handling for mySQL

Hello out there,
it seems that I cannot handle transactions with mySQL connections anymore.
In older versions I could do something like this:
/*sqldev:stmt*/begin;
select * from dt_log;
delete from dt_log where log_tsn=13068;
/*sqldev:stmt*/rollback;
Now these /*sqldev:stmt*/ hints do not work properly anymore. The first one seems to work. But the second one gives an error like this:
SELECT command denied to user 'tsn'@'pc259.vu2k.vertriebsunion.de' for table 'all_tab_cols'
Now, is this intended and if so, is there a way to use transactions on mySQL?
Regards,
dhalek

This issue is solved in 4.0EA3.

Similar Messages

  • Any help about CREDIT CARD handling for E-commerce

    I want to create a JSP page that would
    1)Get credit card information
    2)Validate the credit card number
    3)handle the transaction
    Who will be the volunteer to give me detail about all of this process.
    The implementation of CREDIT CARD TRANSACTION handling for E-commerce applications.
    Any help??????
    I am looking for you people.

    You know, I find it frightening to think that somebody out there in E-Business Webland is going to be taking my credit card number for some purchase ...
    ... and the programmer who threw the website together had to come to this forum and ask, "How do I do that, details please?"
    No offense, of course ... <:-(

  • Exception handling for all the insert statements in the proc

    CREATE PROCEDURE TEST (
    @IncrStartDate DATE
    ,@IncrEndDate DATE
    ,@SourceRowCount INT OUTPUT
    ,@TargetRowCount INT OUTPUT
    ,@ErrorNumber INT OUTPUT
    ,@ErrorMessage VARCHAR(4000) OUTPUT
    ,@InsertCase INT --INSERT CASE INPUT
    WITH
    EXEC AS CALLER AS
    BEGIN --Main Begin
    SET NOCOUNT ON
    BEGIN TRY
    DECLARE @SuccessNumber INT = 0
    ,@SuccessMessage VARCHAR(100) = 'SUCCESS'
    ,@BenchMarkLoadFlag CHAR(1)
    ,@BenchmarkFlow INT
    ,@MonthYearStart DATE
    ,@MonthYearEnd DATE
    ,@StartDate DATE
    ,@EndDate DATE
    /* Setting the default values of output parameters to 0.*/
    SET @SourceRowCount = 0
    SET @TargetRowCount = 0
    /*Setting the Start and end date for looping */
    SET @MonthYearStart = @IncrStartDate;
    SET @MonthYearEnd = @IncrEndDate;
    /* Setting the @InsertCase will ensure case wise insertion as this sp will load data in different tables
    @InsertCase =0 means data will be inserted in the target TAB1
    @InsertCase =1 means data will be inserted in the target TAB2
    @InsertCase =2 means data will be inserted in the target TAB3
    @InsertCase =3 means data will be inserted in the target TAB4
    @InsertCase =4 means data will be inserted in the target TAB5
    @InsertCase =5 means data will be inserted in the target TAB6
    if @InsertCase =0
    WHILE (@MonthYearStart <= @MonthYearEnd)
    BEGIN
    SET @StartDate = @MonthYearStart;
    SET @EndDate = @MonthYearEnd;
    /* Delete from target where date range given from input parameter*/
    DELETE FROM TAB1
    WHERE [MONTH] BETWEEN MONTH(@StartDate) AND MONTH(@EndDate)
    AND [YEAR] BETWEEN year(@StartDate) and year(@EndDate)
    /*Insert data in target-TAB1 */
    BEGIN TRANSACTION
    INSERT INTO TAB1
    A,B,C
    SELECT
    A,BC
    FROM XYZ
    COMMIT TRANSACTION
    SET @MonthYearStart = DATEADD(MONTH, 1, @MonthYearStart)
    SELECT @TargetRowCount = @TargetRowCount + @@ROWCOUNT;
    END -- End of whileloop
    END TRY
    BEGIN CATCH
    IF @@TRANCOUNT>0
    ROLLBACK TRANSACTION
    SELECT @ErrorNumber = ERROR_NUMBER() ,@ErrorMessage = ERROR_MESSAGE();
    END CATCH
    END--End of Main Begin
    I have the above proc inserting data based on parameters  where in @InsertCase  is used for case wise execution.
     I have written the whole proc with exception handling using try catch block.
    I have just added one insert statement here for 1 case  now I need to add further insert  cases
    INSERT INTO TAB4
                    A,B,C
    SELECT
                                    A,BC
    FROM XYZ
    INSERT INTO TAB3
                    A,B,C
    SELECT
                                    A,BC
    FROM XYZ
    INSERT INTO TAB2
                    A,B,C
    SELECT
                                    A,BC
    FROM XYZ
    I will be using following to insert further insert statements 
    if @InsertCase =1 
    I just needed to know where will be my next insert statement should be fitting int his code so that i cover exception handling for all the code
    Mudassar

    Hi Erland & Mudassar, I have attempted to recreate Mudassar's original problem..here is my TABLE script;
    USE [MSDNTSQL]
    GO
    /****** Object: Table [dbo].[TAB1] Script Date: 2/5/2014 7:47:48 AM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[TAB1](
    [COL1] [nvarchar](1) NULL,
    [COL2] [nvarchar](1) NULL,
    [COL3] [nvarchar](1) NULL,
    [START_MONTH] [int] NULL,
    [END_MONTH] [int] NULL,
    [START_YEAR] [int] NULL,
    [END_YEAR] [int] NULL
    ) ON [PRIMARY]
    GO
    Then here is a CREATE script for the SPROC..;
    USE [MSDNTSQL]
    GO
    /****** Object: StoredProcedure [dbo].[TryCatchTransactions1] Script Date: 2/5/2014 7:51:33 AM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE PROCEDURE [dbo].[TryCatchTransactions1] (
    @IncrStartDate DATE
    ,@IncrEndDate DATE
    ,@SourceRowCount INT OUTPUT
    ,@TargetRowCount INT OUTPUT
    ,@ErrorNumber INT OUTPUT
    ,@ErrorMessage VARCHAR(4000) OUTPUT
    ,@InsertCase INT --INSERT CASE INPUT
    WITH
    EXEC AS CALLER AS
    BEGIN --Main Begin
    SET NOCOUNT ON
    BEGIN TRY
    DECLARE @SuccessNumber INT = 0
    ,@SuccessMessage VARCHAR(100) = 'SUCCESS'
    ,@BenchMarkLoadFlag CHAR(1)
    ,@BenchmarkFlow INT
    ,@MonthYearStart DATE
    ,@MonthYearEnd DATE
    ,@StartDate DATE
    ,@EndDate DATE
    /* Setting the default values of output parameters to 0.*/
    SET @SourceRowCount = 0
    SET @TargetRowCount = 0
    /*Setting the Start and end date for looping */
    SET @MonthYearStart = @IncrStartDate;
    SET @MonthYearEnd = @IncrEndDate;
    /* Setting the @InsertCase will ensure case wise insertion as this sp will load data in different tables
    @InsertCase =0 means data will be inserted in the target TAB1
    @InsertCase =1 means data will be inserted in the target TAB2
    @InsertCase =2 means data will be inserted in the target TAB3
    @InsertCase =3 means data will be inserted in the target TAB4
    @InsertCase =4 means data will be inserted in the target TAB5
    @InsertCase =5 means data will be inserted in the target TAB6
    IF @InsertCase =0
    WHILE (@MonthYearStart <= @MonthYearEnd)
    BEGIN
    SET @StartDate = @MonthYearStart;
    SET @EndDate = @MonthYearEnd;
    /* Delete from target where date range given from input parameter*/
    DELETE FROM TAB1
    WHERE START_MONTH BETWEEN MONTH(@StartDate) AND MONTH(@EndDate)
    AND START_YEAR BETWEEN year(@StartDate) and YEAR(@EndDate)
    /*Insert data in target-TAB1 */
    BEGIN TRANSACTION
    INSERT INTO TAB1 (COL1,COL2,COL3)
    VALUES ('Z','X','Y')
    SELECT COL1, COL2, COL3
    FROM TAB1
    COMMIT TRANSACTION
    SET @MonthYearStart = DATEADD(MONTH, 1, @MonthYearStart)
    SELECT @TargetRowCount = @TargetRowCount + @@ROWCOUNT;
    END -- End of whileloop
    END TRY
    BEGIN CATCH
    IF @@TRANCOUNT > 0
    ROLLBACK TRANSACTION
    SELECT @ErrorNumber = ERROR_NUMBER() ,@ErrorMessage = ERROR_MESSAGE();
    END CATCH
    PRINT @SUCCESSMESSAGE
    END--End of Main Begin
    GO
    I am just trying to help --danny rosales
    UML, then code

  • "Message Rejection Handler" for the file/ftp adapter using fault policy

    Hi guys,
    We are trying to implement "Message Rejection Handler" for the file/ftp adapter using following fault policy configuration.
    Fault Policy:
    `````````````
    <?xml version='1.0' encoding='UTF-8'?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <faultPolicy version="2.0.1" id="ProcessNameGenericPolicy"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:remoteFault">
    <condition>
    <action ref="ora-retry"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:bindingFault">
    <condition>
    <action ref="ora-rethrow-fault"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="ora-retry">
    <retry>
    <retryCount>3</retryCount>
    <retryInterval>1</retryInterval>
    <retryFailureAction ref="ora-rethrow-fault"/>
    </retry>
    </Action>
    <Action id="ora-rethrow-fault">
    <rethrowFault/>
    </Action>
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    </faultPolicy>
    <faultPolicy version="2.0.1" id="ProcessNameHumanInterventionPolicy"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults"
    name="medns:mediatorFault">
    <condition>
    <test>contains($fault.mediatorErrorCode, "TYPE_TRANSIENT")</test>
    <action ref="ora-retry-with-intervention"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:remoteFault">
    <condition>
    <action ref="ora-retry-with-intervention"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    name="bpelx:bindingFault">
    <condition>
    <action ref="ora-rethrow-fault"/>
    <!--<action ref="ora-retry-with-intervention"/>-->
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="ora-retry-with-intervention">
    <retry>
    <retryCount>3</retryCount>
    <retryInterval>1</retryInterval>
    <retryFailureAction ref="ora-human-intervention"/>
    </retry>
    </Action>
    <Action id="ora-retry">
    <retry>
    <retryCount>3</retryCount>
    <retryInterval>1</retryInterval>
    <retryFailureAction ref="ora-rethrow-fault"/>
    </retry>
    </Action>
    <Action id="ora-rethrow-fault">
    <rethrowFault/>
    </Action>
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    </faultPolicy>
    <faultPolicy version="2.0.1" id="RejectedMessages">
    <Conditions> <!-- All the fault conditions are defined here -->
    <faultName xmlns:rjm="http://schemas.oracle.com/sca/rejectedmessages" name="rjm:PartnerLinkName">
    <!-- local part of fault name should be the service name-->
    <condition>
    <action ref="writeToFile"/> <!-- action to be taken, refer to Actions section for the details of the action -->
    </condition>
    </faultName>
    </Conditions>
    <Actions> <!-- All the actions are defined here -->
    <Action id="writeToFile">
    <fileAction>
    <location>Server/Loc/path</location>
    <fileName>Rejected_AJBFile_%ID%_%TIMESTAMP%.xml</fileName>
    </fileAction>
    </Action>
    </Actions>
    </faultPolicy>
    </faultPolicies>
    Fault Binding:
    ``````````````
    <?xml version='1.0' encoding='UTF-8'?>
    <faultPolicyBindings version="2.0.1"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <composite faultPolicy="ProcessNameGenericPolicy"/>
    <service faultPolicy="RejectedMessages">
    <name>PartnerLinkName</name>
    </service>
    <reference faultPolicy="RejectedMessages">
    <name>PartnerLinkName</name>
    </reference>
    </faultPolicyBindings>
    We have SyncFileRead partner link.
    The expectation is: when the message read by SyncFileRead partner link is rejected,
    that rejected message should come to particular directory in the server.
    Could you please help us fixing this.
    TIA.

    HI..
    Have a look at this blog :
    3) Error: HTTP_RESP_STATUS_CODE_NOT_OK 401 Unauthorized
    Description: The request requires user authentication
    Possible Tips:
    u2022 Check XIAPPLUSER is having this Role -SAP_XI_APPL_SERV_USER
    u2022 If the error is in XI Adapter, then your port entry should J2EE port 5<System no>
    u2022 If the error is in Adapter Engine
    u2013then have a look into SAP note- 821026, Delete the Adapter Engine cache in transaction SXI_CACHE Goto --> Cache.
    u2022 May be wrong password for user XIISUSER
    u2022 May be wrong password for user XIAFUSER
    u2013 for this Check the Exchange Profile and transaction SU01, try to reset the password -Restart the J2EE Engine to activate changes in the Exchange Profile After doing this, you can restart the message
    Http* Errors in XI
    Thanks,
    Pooja

  • HTTP handler for starting an external service cannot be read

    Hi,
    When i execute the work item from Business Work place and also from the UWL in Enterprise portal of the task TS21300098 for HR Process Requisition workflow.
    In the Error is says
    HTTP handler for starting an external service cannot be read
    Message no. SWK045
    Diagnosis
    This work item is a link to a HTTP service. To start the service, a launch handler must be known to the SAP System.
    However, the system could not find a launch handler.
    System Response
    The workflow system cannot start execution of the work item.
    Procedure
    Contact your workflow administrator:
    In Customizing you must maintain a launch handler for HTTP-supported dialog services.
    I have checked the config under WF_HANDCUST transaction and made the launch Handler settings generated automatically.
    But still the problem occurs.
    Any Suggesions and help?
    Thanks & Regards
    Sumanth

    hi Guys,
    I have got the same issue. This blog helped me with tcode WF_HANDCUST. I have generated the url
    http://waspgh.kcc.com:8083/sap/bc/webflow/wshandler-->Click on Generate URL and click on distribution.
    Immediately u will get click on Test url . Click Test url . Then It is not successful. It stopped at 
    http://waspgh.kcc.com:8083/sap/bc/webflow
    Getting http page error. So use tcode sicf >sap>bc-->webflow service and activate it.
    Then test the connection. It will be successfull.
    http://waspgh.kcc.com:8083/sap/bc/webflow/wshandler?ping=true&sap-client=400
    Handler test
    Test successful
    Thanks,
    Shankar

  • Assign Transaction Code for Report Painter generated program

    I am trying to assign a transaction code for report painter generated program... I assigned the transaction code in Development for the generated program but the program name changes in every system and I get a runtime error...
    Can you please guide me on how to handle this problem

    http://dap-consulting.com/yahoo_site_admin/assets/docs/Report_Painter_Reports.47142031.pdf
    Found my answer in the above link

  • Transaction Handling - JDBC Receiver Adapter - Multiple SP Calls

    Hello,
    I have the following scenario:
    I send an XML-SQL structure with multiple statment elements (each of them calling a different stored procedure). A stored procedure raises an error back to the JDBC Receiver Adapter in case of error.
    Is it possible to have transaction handling in the JDBC Receiver to ensure:
    - Commit only after ALL stored procedures where succesful (no error risen during calls)
    - Rollback of ALL already called stored procedures in case an error has been risen
    How can I implement these requirements in the JDBC Receiver Adapter?

    One more comment, I have found the following info for JDBC Drivers:
    <i> "JDBC driver's default is to autocommit, meaning that the result of every SQL statement is permanent as soon as it is executed. This is why the course hasn't had to be concerned with transactions so far, and is perfectly acceptable in many cases."</i>
    So I think that each SP-Call is automatically commited in case autocommit on JDBC Driver Level is set to "true". Does anyone know where I can change these settings? Directly on JDBC Receiver Adapter or do I have to go to Visual Admin for those changes?

  • Reg: Is it possible in weblogic 5.1 or 6 to get Transaction suport for MQseries & Oracle

              Hi
              I would like to know whether weblogic 5.1 or 6 provides support in a single transaction,
              transaction support for both oracle and MQseires, if so where can i find suitable
              documentation on this topic
              with regards
              Priya
              

    The answer is definitely yes, starting in WLS 6.0, with
              some two reasonable limitations.
              There are limitations are the following:
              1. It must be on the server side. The registration of the XAResource
              can't happen in a client. It must happen in a startup class
              or EJB or servlet, etc. You can start it from a client (invoke
              an EJB or servlet) but the resource work must be
              on the server side.
              2. MQSeries can't be included if it is being used to drive a
              Message Driven Bean. Because the message is passed
              from MQ Series to WLS outside of a transaction, after
              which WLS will start a transaction (if so configured) and
              pass it to the MDB, the MQ Series message is not part
              of the transaction. The JavaSoft specs don't handle this case.
              For WLS JMS, this works because we have defined such
              an interface and implemented it. At least one other vendor
              understands the importance of having this feature and is
              interested in implementing it (it's not IBM).
              So to do what you want, it is necessary to:
              1. Use the XAResource version of the JDBC driver for Oracle.
              WLS is smart enough to look at the driver and see if it
              implements the XAResource interface and automatically
              register it as a resource. This has been documented
              in this newsgroup already or see
              http://e-docs/wls/docs60/adminguide/jdbc.html#1075694.
              2. Register the XAResource interface for MQSeries programmatically
              in the application. The code to do this has been posted
              at the BEA developer site for a few months in an article
              entitled "Using JTA Transactions to envelope WLS JMS and
              IBM MQSeries" (could I be more explicit), located at
              http://developer.bea.com/docs/jmsjta.jsp. It references
              another document that has more code, describing how to
              plug in a "foreign" (non-WLS) JMS provider, of which MQSeries
              is one, in a non-transaction manner (you need to do that
              first and then just add the resource registration) - see
              http://developer.bea.com/docs/jmsproviders.jsp.
              All of the necessary code is included in the documents (including
              how to download and install the Java libraries for MQSeries).
              Several people have told me that they have been able to
              use this as a starting place for their applications.
              You might also want to look at the JMS FAQ at
              http://developer.bea.com/docs/jmsfaq.jsp.
              In 6.1, support is added for importing foreign transactions.
              That means that in 6.0, WLS can drive a transaction with
              WLS JMS, Oracle, and MQ series, with WLS being the
              driving force. In WLS 6.1, a non-WLS transaction manager can
              drive a transaction that includes (transactionally infects)
              WLS resources (like WLS JMS).
              There are no white papers that I know of in this area and I haven't
              tested it myself (the goal is to have someone try out
              having WebSphere drive a transaction with WLS resources, soon).
              "Priya" <[email protected]> wrote in message news:[email protected]...
              >
              > Hi
              >
              > I would like to know whether weblogic 5.1 or 6 provides support in a single transaction,
              > transaction support for both oracle and MQseires, if so where can i find suitable
              > documentation on this topic
              >
              > with regards
              > Priya
              

  • Removing the entity object commit from transaction handler

    Hi,
    The business reuirement of the OAFWK page developed by us is as explained below:
    The basic functionality is of updating the attributes of items attached to the change order.
    The UI components displayed in the page(Item attribute changes region) are built based on the properties of the item attributes as LOV,poplist,textbox etc..
    The dynamic VO mapped to these UI components is based on a standard entity object.
    User operation:Select any attribute group and click on Go button.The Item attributes of the attribute group are displayed.Enter values in the Item Attributes and click on Apply button of the region.(changes made in the attributes related to the attribute group are committed to the database using
    &lt;Root AM&gt;.getTransaction.commit()).
    Now we have two such regions in the same page.
    On top of the page the item attributes of _{color:#800000}&lt;Item Type X&gt;{color}_ are displayed.
    Down the page, the item attributes of {color:#0000ff}&lt;_Item Type Y_&gt;{color} are displayed.
    In few special cases i.e for few item attributes, on click of Apply button for {color:#0000ff}_Item Y_{color} , the attributes of {color:#800000}I_tem X_{color} are to be updated by calling a PLSQL API.When Apply button in the Item attributes of _{color:#0000ff}Item Type Y{color}_ is clicked,the execution of controllers is :
    1.Controllers of Item attribute changes region of {color:#800000}&lt;Item Type X&gt; {color}The dynamic VO is built for the item attributes of Item Type X
    2.Controllers of the Item attribute changes region of {color:#0000ff}Item Type Y{color} The dynamic VO is built for the item attributes of Item Type Y.In the last controller of the hierarchy, the PLSQL API call is included(by invoking the method in AM) to update few attribute values of {color:#800000}Item Type X and finally &lt;Root AM&gt;.getTransaction().commit().
    Problem : The updated values by PLSQL API for {color:#800000}_Item Type X_{color} are not reflected in the database but indeed the values entered by user for {color:#800000}_Item Type X_{color} in the top of the page are committed(The Apply button for {color:#800000}_Item Type X_{color} is not clicked).
    _&gt;&gt;Please note that the dynamic VOs of both the Item Types are built on the same standard Entity Object_
    I am struggling to know the reason why the values updated by PLSQL API are overwrittem by the values in the entity object even though the PLSQL API is called in the last controller of execution.Please let me know if there is any OAFWK constraint.
    I tried the approach of removing the commit of the dynamic VO built in the region of {color:#800000}_Item Type X&gt;_ {color}{color:#000000}I fetched the entity implementation of the dynamic VO row and used removeandRetain(),revert().But this approach failed.I am referring to the jdevdoc for the built-in methods.
    {color}
    Now the requirement is the latest values updated by API (for {color:#800000}_Item Type X_{color}) should be committed in the database but not the values updated by the entity object for {color:#800000}_Item Type X_ {color}{color:#000000}in the item attributes region{color}.
    There should a single commit for the entire transaction of the page.
    Is there any chance to remove the commit of item attributes of {color:#800000}_Item X_{color} alone from the transaction handler?There are few methods in oracle.jbo.server.EntityImpl class such as doRemoveFromTransactionManager().But these methods are either protected or private.So classes of other packages cannot access them.
    So pelase suggest me if there is a workaround for this scenario.
    Thanks and Regards,
    Kiran
    Edited by: Kiran.A on Sep 20, 2008 3:34 AM

    Hi Sumit,
    Yes I agree on that front that updating the same record through PLSQL and EO is not the right approach.
    But the business requirement is as such and we do not have any workaround for this.
    Please let me know if there is any way to avoid the EO commit by removing from transaction listener.
    Regards,
    Kiran

  • Transaction Handling in webservice based partnerlink

    What is the transaction handling mechanism for parnerlink which calls webservice (not native BPEL/ESB)?
    REgards
    priyadarshi

    It is SDO using I think
    It should be not SOAP action, because it is not support transactions

  • Trouble Setting Up DML Handler for Journaling

    Hi Pat,
    I am trying to setup a simple DML handler for journaling of a table and cannot get it to work. Configuration is as follows:
    Source table
    Target table - updated via basic replication setup, this works fine.
    Target table journal - This table looks just like the original with additional columns for meta data about the transaction (i.e. trans_time, trans_type, trans_id..etc). Note: Did not use nested table technology.
    The problem is in compiling the user procedure for the DML handler we get an error on the INSERT part of the code:
    PL/SQL: ORA-00932: inconsistent datatypes: expected NUMBER got -
    The code is listed below and the error points to the usage of the lcr.GET_VALUE package regardless of the column.
    Can you tell me if this is a correct usage of that package/procedure? Can you provide any better examples of DML handlers,preferbly for journaling? I understand from another thread you may have a new set of doc coming out. Maybe that can help me?
    I have a WORD doc w/pics that can better articulate the situation if it will help. Any direction is truely appreciated.
    Best Regards,
    Tom
    P.S. Is Oracle consulting spun up on this technology? We are not adverse to having profesional help to reduce our spinup time.
    CREATE OR REPLACE PROCEDURE contact_point_journal_dml(in_any IN SYS.ANYDATA)
    IS
    lcr SYS.LCR$_ROW_RECORD;
    rc PLS_INTEGER;
    BEGIN
    -- Access the LCR
    rc := in_any.GETOBJECT(lcr);
    -- Insert information in the LCR into the contact_point_journal table
    INSERT INTO strmuser.contact_point_journal
    VALUES
    (lcr.GET_VALUE('NEW', 'CONTACT_POINT_ID'),
    lcr.GET_VALUE('NEW', 'EFFECTIVE_DT'),
    lcr.GET_VALUE('NEW', 'VERSION'),
    lcr.GET_VALUE('NEW', 'CREATED_BY'),
    lcr.GET_VALUE('NEW', 'CREATED_TS'),
    lcr.GET_VALUE('NEW', 'CONTACT_CODE_ID'),
    lcr.GET_VALUE('NEW', 'ADDRESS1'),
    lcr.GET_VALUE('NEW', 'ADDRESS2'),
    lcr.GET_VALUE('NEW', 'ADDRESS3'),
    lcr.GET_VALUE('NEW', 'ADDRESS4'),
    lcr.GET_VALUE('NEW', 'CITY'),
    lcr.GET_VALUE('NEW', 'COUNTY'),
    lcr.GET_VALUE('NEW', 'STATE_PROVINCE_CODE_ID'),
    lcr.GET_VALUE('NEW', 'POSTAL_CODE'),
    lcr.GET_VALUE('NEW', 'COUNTRY_CODE_ID'),
    lcr.GET_VALUE('NEW', 'GEO_CODE'),
    lcr.GET_VALUE('NEW', 'OTHER_CONTACT_POINT_VALUE'),
    lcr.GET_VALUE('NEW', 'EXPIRATION_DT'),
    lcr.GET_VALUE('NEW', 'LAST_MODIFIED_BY'),
    lcr.GET_VALUE('NEW', 'LAST_MODIFIED_TS'),
    SYSDATE,
    lcr.GET_COMMAND_TYPE(),
    lcr.GET_TRANSACTION_ID(),
    lcr.GET_SCN(),
    lcr.GET_SOURCE_DATABASE_NAME(),
    lcr.GET_OBJECT_OWNER(),
    lcr.GET_OBJECT_NAME(),
    '1',
    'A'
    -- Apply row LCR
    -- Command type code may be '03' instead of 'insert' ???
    -- Is the syntax correct for SET statement ???
    lcr.SET_COMMAND_TYPE('INSERT');
    lcr.EXECUTE(true);
    END;

    Hi Tom,
    The GET_VALUE method of an LCR$ROW_RECORD returns a SYS.ANYDATA type.
    You need to specify one of the static access functions to get the value of the correct type.
    Here is your dml_handler with the modifications:
    CREATE OR REPLACE PROCEDURE contact_point_journal_dml(in_any IN SYS.ANYDATA)
    IS
    lcr SYS.LCR$_ROW_RECORD;
    rc PLS_INTEGER;
    BEGIN
    -- Access the LCR
    rc := in_any.GETOBJECT(lcr);
    -- Insert information in the LCR into the contact_point_journal table
    INSERT INTO strmuser.contact_point_journal
    VALUES
    (lcr.GET_VALUE('NEW', 'CONTACT_POINT_ID').AccessNumber(),
    lcr.GET_VALUE('NEW', 'EFFECTIVE_DT').AccessDate(),
    lcr.GET_VALUE('NEW', 'VERSION').AccessNumber(),
    lcr.GET_VALUE('NEW', 'CREATED_BY').AccessVarchar2(),
    lcr.GET_VALUE('NEW', 'CREATED_TS').AccessTimestamp(),
    lcr.GET_VALUE('NEW', 'CONTACT_CODE_ID').AccessNumber(),
    lcr.GET_VALUE('NEW', 'ADDRESS1').AccessVarchar2(),
    lcr.GET_VALUE('NEW', 'ADDRESS2').AccessVarchar2(),
    lcr.GET_VALUE('NEW', 'ADDRESS3').AccessVarchar2(),
    lcr.GET_VALUE('NEW', 'ADDRESS4').AccessVarchar2(),
    lcr.GET_VALUE('NEW', 'CITY').AccessVarchar2(),
    lcr.GET_VALUE('NEW', 'COUNTY').AccessVarchar2(),
    lcr.GET_VALUE('NEW', 'STATE_PROVINCE_CODE_ID').AccessNumber(),
    lcr.GET_VALUE('NEW', 'POSTAL_CODE').AccessVarchar2(),
    lcr.GET_VALUE('NEW', 'COUNTRY_CODE_ID').AccessNumber(),
    lcr.GET_VALUE('NEW', 'GEO_CODE').AccessVarchar2(),
    lcr.GET_VALUE('NEW', 'OTHER_CONTACT_POINT_VALUE').AccessVarchar2(),
    lcr.GET_VALUE('NEW', 'EXPIRATION_DT').AccessDate(),
    lcr.GET_VALUE('NEW', 'LAST_MODIFIED_BY').AccessVarchar2(),
    lcr.GET_VALUE('NEW', 'LAST_MODIFIED_TS').AccessTimestamp(),
    SYSDATE,
    lcr.GET_COMMAND_TYPE(),
    lcr.GET_TRANSACTION_ID(),
    lcr.GET_SCN(),
    lcr.GET_SOURCE_DATABASE_NAME(),
    lcr.GET_OBJECT_OWNER(),
    lcr.GET_OBJECT_NAME(),
    '1',
    'A'
    -- Apply row LCR, too
    lcr.EXECUTE(true);
    END;

  • Transaction Handling across Procedures

    In the ODI Best Practice Guide for Data Warehouses I came across the following (page 100):
    "ODI procedures include an advanced mechanism for transaction handling across multiple steps or even multiple procedures."
    It states that transaction handling can occur across multiple procedures. I could not get this to work.
    I created a procedure with just one step that inserts into a table. In the step I have set the Transaction dropdown to Transaction 0 and the Commit dropdown to No Commit. However, when I execute the procedure the insert is committed as we terminate the session.
    Any ideas how this commit can be prevented?

    ok, I figured out that parameters to the JDBC driver can be specified at the properties tab of the data server.
    So I presume this will be autocommit = false or sth. similar
    I still have to try this out.

  • Error Handling for Outbound IDOC - COSMAS (Cost Center Master)

    Hi,
    I need to trigger a mail to SAP inbox whenever a outbound idoc fails for any reason.
    I know how to do it for inbound or outbound transaction data, but not sure how to do error handling for outbound master data.
    Could one of you help me understand the same.
    Thanks in Advance,
    Vinoth

    Hey Vinoth,
    Do you want decide the recipient of the mail dynamically? am asking because if you give the USER NAME in the partner profile and when ever a IDOC fails a mail will automatically reach the user inbox automatically
    let me know if i answered ur question.
    Thanks,
    Santhosh

  • Transaction handling in XI

    hi guys;
    What I am trying to look is  XI tries to insert data in database and some error happens while inserting data so how xi rolls back the trasaction and how can we write a logic to send a email about this error to any  person.

    Mudit,
    <i>how can we write a logic to send a email about this error to any person.</i>
    You can create Alerts, which will trap all errors occuring in your process and send an email to the necessary person.
    To create alerts , this blog can help you out,
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    From SP14 onwards, activation of end to end monitoring is not needed for Alerting. Refer to this note 870232 for this info.
    If you are blow SP14, then also check this blog,
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
    To send an EMAIL, assign an EMAIL ID to the corresponding user in the transaction SU01 and then set up SCOT and you can send emails when the ALERT is triggered.
    <i>some error happens while inserting data so how xi rolls back the trasaction</i> Internally , you can set the TRANSCATON handling of XI. Mostly, this transcation handling for errors dyuring insertion is handled by the Database itself.
    Regards,
    Bhavesh

  • Osb 11g transaction handling

    Hi,
    I have a problem with transaction handling in OSB 11g. When I add a report action, error messages disappear.
    The process is the following:
    jms-queue -> proxy-service ->business-service ->EBS webservice.
    In the proxy-service I add an error-handler at node-level. In this error-handler I log the error-message in the server log. In the regular process there is a request and response-pipeline.
    When I add a message on the queue and when the response from EBS is negative, the message is placed on a errorqueue. That's ok.
    When I add a report-action to the error-handler and then I put another message on the queue, the message is disappeared. It is not on the error-queue and not on the normal queue. When I look in the database there is an extra row added.
    I use the default datasource(wlsbjmsrpDataSource).
    I found for example this blog: http://biemond.blogspot.nl/2010/11/global-transactions-and-quality-of.html ; but I can't find an example with writing to a database and a rollback to an errorqueue. The report-action needs it's own transaction.
    In the weblogic console -> datasources -> transaction I unchecked "Keep Connection After Local Transaction" but that didn't work.
    What kind of options is possible?
    Herman

    I cant believe i was answered by the famous Anuj!.
    You were correct. The weird thing, is that in publish actions the QoS is not propagated onto the target of that Publish per se.
    We say this, becouse the Local PS has the Transaction Required = True, ergo the QoS is Exactly Once all along its message flow. It also propagates in the service callout´s and Route Node´s. Thats why we, trying to avoid redundance, didnt specified it in the publish action.
    Thank you very much.
    Regards.
    Mario.

Maybe you are looking for

  • File manager for lumia

    Is there a file manager app for Lumia like file manager app in Symbian? i really miss all the freedom provided by Symbian ecosystem. Are you guys planning on making one? Solved! Go to Solution.

  • Not sure if this is the right product for my needs! Can someone help me out

    Im a graphic designer who lives an hour away from my permanent employer. To help cut down on travel expenses and to get through the horrible winters we have I want to be able to access my work computer from home. Specifically be able to access files

  • Duplicate one channel of audio FCPX

    Im editing a wedding were a videographer used a wireless mic on the groom, How do i duplicate that wireless audio channel so i can hear it in both speakers? FCPX vs 10.0.9. thank you

  • Backup of stored procedure

    Hi All, How to take the back up of a stored proceudure along with the privileges associated with it? DB version:11.1.0.7 OS:AIX 6.1

  • Freeze/Hanging/Slow Backups

    I noticed since having the iPhone 3G, Backups in iTunes takes 5 mins, contacts freeze and if you make a call then text someone when ended, it runs slowly. Found the fix is to restore the firmware in iTunes. It downloads a copy of the firmware, and al