How to handle transactions when two different databases are involved.

consider two tables namely Table-A and Table-B part of two different databases namely ORACLE and MYSQL.
Now the project requirement is updating the Table-A(ORACLE) and Table-B (MYSQL) as one transaction. i.e. either update both the tables or rollback both the tables.
Now my question is how could i handle this situation using JDBC(Type-4) driver.Because i think at a time only one JDBC driver can be loaded into the JVM.

NareshAnkuskani wrote:
Now my question is how could i handle this situation using JDBC(Type-4) driver.Because i think at a time only one JDBC driver can be loaded into the JVM.No, that is not true.
But anyway, you need to use distributed (XA) transactions. i believe that the latest version (5.0) of mysql actually has support for XA transactions. you need to use a to setup a distributed transaction and attach the connections for the two databases to that transaction. then it should function as you desire.

Similar Messages

  • How to create Analysis from two different subject areas with diff models

    Hello,
    I have problem with create analysis from two different areas with two different models (Model Star and Snowflakes) build in BI Admin tools.
    First Model A = Subject Area A have one fact tables (with measures) and three dimensions tables (Model Star)
    Second Model B = Subject Area B have one fact table (no measures) and five dimensions tables (Model Snowflakes).
    I'm looking solutions how I can give good results. In this case I can't use UNION, INTERSECT etc., because this models haven't the same number column and data type?
    whether it is possible to do in OBIEE?
    Please help me
    Kind regard
    robix

    Hi
    One thing to understand is that if your are imagining having two Subject Areas (SAs) displayed and then dragging columns from each into your Request without any preparation, then no, that can't be done. You would need to do a join in the BMM layer and expose the column from the second Subject Area in the presentation layer.
    But if you indeed interested in UNION (or intersect) queries, then do this:
    Build your first query in the first SA in the usual manner. Note the number of columns and the data types of each column.
    Now at the bottom of the Criteria workspace, there is a button called "Combine with similar request." Click it.
    Select your second SA. You will note that the outlines of the columns in your first query appear. This is to remind you that the number of columns in this second query must be the same as in the first. It also shows the data type of each column for the same reason.
    Once you select your columns and your filters, click on result. (Oh, you will also need to decide what kind of combination you want -- click on the dropdown.) The result will be a new Request that has data from both SAs in the query and combined in the manner you select (union, intersect, etc.)
    That should give you a start.
    http://obiee101.blogspot.in/2010/08/obiee-combine-with-similar-request.html -- Read this link this is good one to understand with screen shots. -- OBIEE 10g
    http://oraclebiee11g.blogspot.in/2011/01/querying-across-multiple-subject-areas.html -- OBIEE 11g
    Award Points it is useful.
    Thanks
    satya

  • How to add two different database connections on Model

    Hi,
    In my application, I need to create View Objects on different databases. So I need to add two different database connections on the Model.
    But it seems like Model can be connected to only one database. I tried adding another project to add the second db connection. But after I created a read-only View Object in the second project, it didn't generate corresponding data control in the Data Controls panel.
    Could anyone help me on this?
    Thanks!

    Do you mean adding the second project folder in ViewController->Project Properties->Libraries and Classpath?Yes, either that or: ViewController -> Project Properties -> Dependencies
    And I didn't see the first Model project in the ViewController classpath. Otherwise it wouldn't work. The first model project IS in 'classpath'. Here's how:
    ViewController -> Project Properties -> Dependencies
    I tried this and recreated the View Object. Still didn't generate the datacontrol. No idea why you had to recreate the VO.
    Is your VO in an application module inside the SECOND project?
    After you are sure that everything is in the ViewController's classpath, just try restarting JDeveloper.
    This is very basic. has to work.

  • How to process reports with two different date fields

    Morning all,
    This question is somewhat similar to what I asked few days back. I created two different reports for two different departments (Credit Control and Free of Charge Control).
    These two reports pull data from two different date fields and has different status check ups.
    Few days back my director requested me if he can have both reports in one report. That is when I asked question from all of you regarding two reports.
    Anyhow, that was created by implementing two sub reports however, the director asked me to combine the two different reports into one in such a way that the output records should be added up with each other hence one single report with all combined data of Credit Control and Free of Charges (not two sub reports in one report).
    The problem here which I am getting is that, both reports uses two different date fields. I can live with two different statuses as that can be easily done within formula/RT however how to create a report with Report Selection Formula condition which looks in both date fields and produces results accordingly?
    I have tried this by not putting any condition in report selection formula and ran the report, it produced total results from past 6 years.
    Any ideas how to produce combined report which has two different date fields?
    Many thanks in advance
    Regards
    Jehanzeb
    What I

    Charliy,
    No the both dates are from two different databases, tables and fields. The Credit date field is from KLAB database under max table where as the FOC date field is from SAE database under maxmast table. Klab date is under credit2 table where as foc date is under order header table.
    So its more like this:
    Klab->Max-Credit2--->Credit_date
    Sae->Maxmast->Order_header---Date entered.
    two dates totally different tables, dbs
    however, I will try your idea too and see if that works.
    Regards
    Jehanzeb

  • Synch Between Tables in Two different Databases

    Synch between Two Tables in two different Databases.
    I have two identical tables, table T1 in Database D1 and table T1 in Database D2. User can insert/update/delete/select from both of these tables in respective databases. Being said that how can keep them in Synch? Any thing added/modified/deleted should reflect in other. We like this to be Real-Time.
    We are thinking of creating a cross (two way) DB link between them and then update/insert/delete both the tables when changing one. Any suggestions?
    Thanks

    One of my colleagues used snapshot in their previous projects, but he told me that the performance of it wind down while the records in tables increase. I have no idea about the exact situation, but I'm believing we'd think twice about it.
    eilison
    [email protected]

  • How to use 'UNION' between two different databaseservers

    Hello,
    Could someone help me out. I am trying to find out if and how to use 'UNION' between two different databaseservers.
    We have 2 different queries, each queries on a different database; one MySQL the other MSSQL.
    Could someone tell me how to use 'UNION' between thes 2 queries?
    Thanks in advance,
    Samir Benalla

    Hello
    You may use openrowset statement, (OPENROWSET (Transact-SQL))., but before you use this, you must configure your server
    sample:
    SELECT a.*
    FROM OPENROWSET('SQLNCLI', 'Server=Seattle1;Trusted_Connection=yes;',
         'SELECT GroupName, Name, DepartmentID
          FROM AdventureWorks2012.HumanResources.Department
          ORDER BY GroupName, Name') AS a
    UNION
         SELECT GroupName, Name, DepartmentID
          FROM AdventureWorks2012.HumanResources.Department
          ORDER BY GroupName, Name
    With this you can define a connection using native client to server Seattle1, and execute a query there, The results will be spooled on your server.
    Connectionstring
    Server=[SERVER_NAME];datasource=[YOUR DATABASE NAME];user_id=sa;password=sapassword'
    if you use FQDN on your Query, than the datasource parameter in connection string can be letf out.
    Regards
    János.
    take care of performance, it can be very slow,

  • Can I use two different database with DBSystemLoginModule?

    Finally I can login with Database user id by DBSystemLoginModule on Embedded oc4j server.
    But I confused between [b]jazn-data.xml and system-jazn-data.xml.
    Which xml do I have to edit for jdbcUrl and jdbcDriver?
    Now I would like to use two different database(such as only sid is different).
    In this case I want to show specific database name as realm name.
    What should I do?
    When I use DBSystemLoginModule, I edit JdbcUrl in system-jazn-data.xml.
    So can I pass the parameter for sid programmatically?
    And also I tried to run my application with other database with DBSystemLoginModule on Embedded oc4j server.
    I changed few things(jdbcUrl at system-jazn-data.xml,jazn-data.xml in embedded-oc4j-server/config and database connection for BusinessComponents at Project Properties of Model/ViewController.
    But I got some error.
    Did I miss something?
    ----< my error messgae >------
    500 Internal Server Error
    JBO-30003: The application pool (customer.model.datamodel.CMAppModuleLocal) failed to checkout an application module due to the following exception:oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null     at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)     Message was edited by:
    Message was edited by:
    sdcsdc

    I think I understand now, you are modifing the custom login modules configuration within the system-jazn-data.xml file. This is a bit dangerous! Didn't you register the login module in your orion-application.xml? For example, this is the way I do it:
    <web-module id="customProv-web" path="customProv-web.war" />
    <persistence path="persistence" />
    <!--data-sources path="./data-sources.xml"/-->
    <security-role-mapping name="sr_developer">
    <group name="developers" />
    </security-role-mapping>
    <security-role-mapping name="sr_manager">
    <group name="managers" />
    </security-role-mapping>
    <jazn provider="XML">
    <property name="custom.loginmodule.provider" value="true"/>
    <property name="role.mapping.dynamic" value="true"/>
    <property name="role.compare.ignorecase" value="true"/>
    </jazn>
    <!-- Configuring a Login Module in an Application EAR file. -->
    <jazn-loginconfig>
    <application>
    <name>customProv</name>
    <login-modules>
    <login-module>
    <class>oracle.security.jazn.login.module.db.DBTableOraDataSourceLoginModule</class>
    <control-flag>required</control-flag>
    <options>
    <option>
    <name>data_source_name</name>
    <value>jdbc/OracleDS2</value>
    </option>
    <option>
    <name>roles_fk_column</name>
    <value>userName</value>
    </option>
    <option>
    <name>table</name>
    <value>userinfo</value>
    </option>
    <option>
    <name>groupMembershipTableName</name>
    <value>groupinfo</value>
    </option>
    <option>
    <name>groupMembershipGroupFieldName</name>
    <value>role</value>
    </option>
    <option>
    <name>usernameField</name>
    <value>userName</value>
    </option>
    <option>
    <name>user_pk_column</name>
    <value>username</value>
    </option>
    <option>
    <name>passwordField</name>
    <value>passWord</value>
    </option>
    </options>
    </login-module>
    </login-modules>
    </application>
    </jazn-loginconfig>
    <log>
    <file path="application.log" />
    </log>
    <namespace-access>
    <read-access>
    <namespace-resource root="">
    <security-role-mapping name="<jndi-user-role>">
    <group name="administrators" />
    </security-role-mapping>
    </namespace-resource>
    </read-access>
    <write-access>
    <namespace-resource root="">
    <security-role-mapping name="<jndi-user-role>">
    <group name="administrators" />
    </security-role-mapping>
    </namespace-resource>
    </write-access>
    </namespace-access>
    </orion-application>

  • Connecting to two different database instances from a swing application.

    Hi All,
    I am developing a swing application which needs to interact with two different database instances of two different weblogic servers.
    More eloborately,
    I have some data in DB_Instance1 running on[b] Weblogic_Server1 and I need to insert the same data into DB_instance2 running on Weblogic_server2. Is it possible. Could some explain me how to do that..
    Thanks in advance...
    Sreekanth.

    Hi Rick,
    Try logging onto both Server first. You'll have to use either 2 separate ODBC DSN's or 2 separate OLE DB connections. Set them both for Trusted Authentication, you'll have to configure that on the Server also.Then try your query.
    If that doesn't work then you'll have to create a Stored Procedure or View that can link the 2 Server side.
    Thank you
    Don

  • How does one set up two different iTunes accounts on the same computer so that they do not merge into one?

    How does one set up two different iTunes accounts on the same computer so that they do not merge into one?

    mparker402 wrote:
    So, when the other iTunes account needs to be used, I should log out of Windows and have the other user log in under a different Windows account, correct?  
    M Parker, 
    Yes, since you are trying to keep things separate, that is exactly what you would do.

  • APEX Application accessing data from two different databases

    Hi All,
    Currently as we all know that APEX Application resides in database and is connected to the schema of that database.
    I want APEX Application to be running and accessing data from two different databases. Elaborating my question,
    Currently, my APEX Production Application is connected with XXXX Schema of DB1 Database(Where APEX Resides). Now I want to add some pages into this APEX Application for REPORT Purpose, But I want to connect this REPORT APEX Pages to get data from Different Schema YYYY for Database DB2.
    Is it possible to configure this scenario?
    The reason for doing this is to avoid the REPORT related (adhoc queries) resource utilization effect on Production DB1 Database.
    Thanks
    Nil

    1. If you do the joining of two or more tables in DB1 then all data is pulled over to DB1 and then the join is executed: so more data over the databaselink and more work for DB1. Better keep the joining stuff where the data resides and just pull exactly that data over that you need.
    2. Don't know about your different block sizes. Seems a nice question for one of the other forums (DBA or SQL).
    3. I mean create synonyms on DB1 for reports VIEWS in DB2.
    Hope all is clear!

  • How do you set up two different ipads on one computer ?

    I purchased a new ipad for my wife and want to get her started but we both use one imac as our desktop system.  How do you set up two different uses on one computer.
    Thanks,
    Dave

    Other options not covered in the article:
    1) You can plug both in under the same computer username and same iTunes Apple ID and give each device it's own name. You should be able to manage them as separate devices with different media, apps and screen layouts. All of your media would be in a common pool, though.
    2) Under one computer username, you can login and logout of two different iTunes Apple IDs. This option is cleaner with two computer usernames but it can be done with one.

  • How to host one application using different database connection on OAS?

    Hi,
    Jdeveloper - 10.1.3.4
    Application - ADF/BC
    Oracle Application Server - 10.1.3
    Above our the specifications for our application,
    We have two database schemas different for development and production therfore we have different databse connections for the two,
    we have one application which is in production and enhacements on the same application are done by the development team.
    Since we have two different schemas for developement and prduction we use different database connections for the application on development and production.
    The problem is our Model and View Controller project are same, only the database connection file changes that's why we are able to host only on application at a time on our OAS. This is probably because the URL generated by OAS for developemnt and prodyction application is same.
    Is there a way we can host two instances of the same application with two different database connections on the a single OAS.
    Thanks & Regards,
    Raksha

    Use different deployment profiles each with a different context root for your application?
    See: http://one-size-doesnt-fit-all.blogspot.com/2009/02/configuring-separate-dev-test-prod-urls.html

  • Compare performance of two different databases...idea of a report to us?

    Dear Colleagues,
    We would like to compare the performance of two different databases running with SAP. We don't want to start with Loadrunner. We are looking more for some ABAP program which generates a lot of load on the database and then would just run the program on both databases. Any idea for a good report? We thought about sgen, but we think this is taking more into account the application server instead of the database.
    Regards,
    alexander

    Hello,
    If you are not willing to use tools like HP Loadrunner or IBM Rational performance testing
    SGEN could be an option. It is quite intensively using the DB. It will be hard to find a report that only perform DB access.
    SGEN at least allows to test read (REPOSRC, DYNPSOURCE...) & write (REPOLOAD, DYNPLOAD...). If the DBs are on the same servers as the SAP system and both servers has the same power it can be a good way to test.
    Best regards

  • Comparing Tables In Two Different Databases

    Hi,
    As part of our project, we need to perform table comparisons in two different databases. I am currently looking for various options to accomplish this.
    One of them is doing minus operation between these two tables.
    Also, i have looked at the data compare option in toad utility.
    Please suggest me any other options that makes my job easy.
    Thanks in advance,
    Sue

    Then just adapt the select that is there
    SELECT stid , c1, c2, c3                      
       FROM
      ( SELECT a.*,
             1 src1,
             to_number(null) src2        
       FROM  a   
       UNION ALL
       SELECT b.*,
             to_number(null) src1,
             2  src2        
        FROM b
       GROUP BY stid , c1, c2, c3
       HAVING count(src1)  count(src2)
       order by stid;Best regards
    Mohamed Houri

  • Running same backup script on two different Databases

    Hello All,
    I am running same backup script on two different Databases.
    But output is different.
    Please give me your feedback.
    1) Database 1:
    OS: AIX
    DB: 10.1.0.4.0
    Script:
    export ORACLE_SID=sid1
    cd $ORACLE_HOME/bin
    ./rman nocatalog << EOF
    connect target
    ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE disk;
    configure controlfile autobackup on;
    backup as compressed backupset database plus archivelog delete input;
    delete noprompt obsolete;
    exit
    EOF
    6 Files created:
    -rw-r----- 1 oracle dba 4140032 Jun 19 00:00 uvhlvjs8_1_1
    -rw-r----- 1 oracle dba 38029824 Jun 19 00:00 backup_uuhlvjs8_1_1
    -rw-r----- 1 oracle dba 781287424 Jun 19 00:20 v1hlvjsk_1_1
    -rw-r----- 1 oracle dba 578027520 Jun 19 00:23 backup_v0hlvjsk_1_1
    -rw-r----- 1 oracle dba 1222656 Jun 19 00:23 backup_v2hlvl7r_1_1
    -rw-r----- 1 oracle dba 4259840 Jun 19 00:23 c-1052429639-20060619-00
    -rw-r----- 1 oracle dba 4177920 Jun 19 00:23 SNAPCF_ATHENA.F
    2. Databse 2:
    OS: Linux (SLES 8)
    DB: 10.1.0.5.0
    Log Archive Filename Format: %t_%s_%r.dbf
    2 files created:
    1_17804_535674251.dbf 1_17837_535674251.dbf SID_2chlmrrl_1_1.1
    1_17805_535674251.dbf 1_17838_535674251.dbf SID_2dhlms8c_1_1.1
    I am also getting dbf file every one hour as below:
    1_17868_535674251.dbf
    DN

    waiting for reply

Maybe you are looking for

  • Cash Sales

    Hi , I am finding a strange situation while creating Cash Sales Order . On saving the sales Order it generates a Sales Order No but says No Delivery created . I have checked all settings of Order type BV , Item category BVN , Delivery type BV and als

  • Report not aggregating correctly. What am I missing?

    I am writing a report in BI Publisher to the date a Voucher was paid, minus the date a Voucher was due, to see how many Vouchers we have paid 1-30 days late, 31-60 and 61-90 days late. I successfully wrote an expression in PS Query to generate the nu

  • Using contents of a String as the name for a variable

    I'm trying to write code that will evaluate the contents of a String variable and then use the contents as the name for an object. For example, my program will create an unknown number of Student objects. I would like to name the Student objects stud

  • Efficiency of Long objects over Integer objects? any ?

    I have a Long object which actually only stores "integer" values and we had coded it that way long before we realised it. Now I am told we need to change the LONG object to INTEGER object to improve Java efficiency. I disagree with that. Note that we

  • How do I remove Mac OS X Update Combined?

    After updating to 10.6.8 I began having problems. One with my NVIDIA driver (9400M). So I installed the current update from the NVIDIA site. That didnt seem to solve the problem. Unable to revert to my former setting I tried to re-install 10.6.8 in a