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]

Similar Messages

  • 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

  • Query two tables in two different databases.

    Hello,
    I have to query two tables say 'a' in database "D1"and 'b' in database "D2".I am using sql developer and it is accepting only querying for repecting databases.
    i.e if i would like to access b from the sql script of D1 .Please guide me in this regard.
    thank you.

    Create a database link in DB "a" pointing to DB "b" then use the db link in your script.
    Message was edited by:
    skutz

  • Joining tables from two different databases

    Hi,
    I am trying to join W_DAY_D from 1 database to another 2 database to the fact table . The datatype for CALENDER _DTis (DATE) from W_DAY_D  and the Create date from fact table is TIMESTAMP . I changed the the datatype in the phyiscal layer for CREATE DATE from the fact table to DATE and joined it with W_DAY_D (Calender_DT = create_date) Thought the rpd showed me no errors while saving it . But when I try adding the column in the report it throws me error
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46008] Internal error: File server\Utility\Server\DataType\SUKeyCompare.cpp, line 772. (HY000)

    I tried this ealier but it throws me an Invaild expression error. In the Physical Foreign key join
    "ABC"."test"."dbo"."W_DAY_D_Alias"."CALENDAR_DT" = CAST("CT"."EAST"."dbo"."Fact-TEST"."Input date " as DATE)

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

  • 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 to integrate different tables structures from different databases?

    Hi
    I'm new to oracle ..kindly help me with the below issue...
    I have same set of inter-related attributes (a,b,c,d) in two different databases A and B.
    The structure of tables in both the database are different but they carry same attributes in same relation.
    I have to integrate these attributes into single db object such that any update to base tables updates my object.How can i do this and what object will be helpful?
    Thanks

    Arun Rajesh wrote:
    Hi
    I'm new to oracle ..kindly help me with the below issue...
    I have same set of inter-related attributes (a,b,c,d) in two different databases A and B.
    The structure of tables in both the database are different but they carry same attributes in same relation.
    I have to integrate these attributes into single db object such that any update to base tables updates my object.How can i do this and what object will be helpful?
    ThanksWelcome to Forum!!!
    Please elaborate your question.
    Arun Rajesh wrote:
    I have same set of inter-related attributes (a,b,c,d) in two different databases A and B.1. What are the ATTRIBUTES?
    Arun Rajesh wrote:
    The structure of tables in both the database are different but they carry same attributes in same relation.2. Post the Table Structures.
    Arun Rajesh wrote:
    I have to integrate these attributes into single db object such that any update to base tables updates my object.How can i do this and what object will be helpful?3. What is the end result that you desire? A sample output shall help in our understanding.
    PS:- Please go through this to understand SQL and PL/SQL FAQ.
    Regards,
    P.

  • Stock transfer between locations involving two different excise duty

    Hi,
    While doing delivery confirmation under O4H1 transaction, I'm facing below error:
    E OB 048
    ED status from valuation type does not match ED status handling type TA UNTAX
    I'm trying stock transfer between locations involving two different excise duty
    statuses.
    -Yati

    >
    YatiAnand wrote:
    > Hi,
    >
    > While doing delivery confirmation under O4H1 transaction, I'm facing below error:
    > E OB 048
    > ED status from valuation type does not match ED status handling type TA UNTAX
    >
    > I'm trying stock transfer between locations involving two different excise duty
    > statuses.
    >
    >
    > -Yati
    Hi Yati,
    The Handling type on your STO and the Valuation type (valuation status) determined at discharge are differing.
    SO your Handling type on STO seems to be a Taxed one and the valuation you are trying to discharge is UT.
    Try using a handling type which is Untaxed but make sure its consistent with rest of the tables.

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

  • Possible solution to avoid deadlock when two inserts happen on same table from two different machines.

    Possible solution to avoid deadlock when two inserts happen on same table from two different machines.
    Below are the details from deadlock trace.
    Deadlock encountered .... Printing deadlock information
    Wait-for graph
    NULL
    Node:1
    KEY: 8:72057594811318272 (ffffffffffff) CleanCnt:3 Mode:RangeS-S Flags: 0x1
    Grant List 2:
    Owner:0x00000013F494A980 Mode: RangeS-S Flg:0x40 Ref:0 Life:02000000 SPID:376 ECID:0 XactLockInfo: 0x000000055014F400
    SPID: 376 ECID: 0 Statement Type: INSERT Line #: 70
    Input Buf: RPC Event: Proc [Database Id = 8 Object Id = 89923542]
    Requested by:
    ResType:LockOwner Stype:'OR'Xdes:0x0000002AA53383B0 Mode: RangeI-N SPID:238 BatchID:0 ECID:0 TaskProxy:(0x00000027669B4538) Value:0x10d8d500 Cost:(0/38828)
    NULL
    Node:2
    KEY: 8:72057594811318272 (ffffffffffff) CleanCnt:3 Mode:RangeS-S Flags: 0x1
    Grant List 2:
    Owner:0x0000000B3486A780 Mode: RangeS-S Flg:0x40 Ref:0 Life:02000000 SPID:238 ECID:0 XactLockInfo: 0x0000002AA53383F0
    SPID: 238 ECID: 0 Statement Type: INSERT Line #: 70
    Input Buf: RPC Event: Proc [Database Id = 8 Object Id = 89923542]
    Requested by:
    ResType:LockOwner Stype:'OR'Xdes:0x000000055014F3C0 Mode: RangeI-N SPID:376 BatchID:0 ECID:0 TaskProxy:(0x000000080426E538) Value:0x30614e80 Cost:(0/41748)
    NULL
    Victim Resource Owner:
    ResType:LockOwner Stype:'OR'Xdes:0x0000002AA53383B0 Mode: RangeI-N SPID:238 BatchID:0 ECID:0 TaskProxy:(0x00000027669B4538) Value:0x10d8d500 Cost:(0/38828)
    deadlock-list
    deadlock victim=process5daddc8
    process-list
    process id=process5daddc8 taskpriority=0 logused=38828 waitresource=KEY: 8:72057594811318272 (ffffffffffff) waittime=2444 ownerId=2994026815 transactionname=user_transaction lasttranstarted=2014-07-25T12:46:57.347 XDES=0x2aa53383b0 lockMode=RangeI-N schedulerid=43 kpid=14156 status=suspended spid=238 sbid=0 ecid=0 priority=0 trancount=2 lastbatchstarted=2014-07-25T12:46:57.463 lastbatchcompleted=2014-07-25T12:46:57.463 clientapp=pa hostname=pa02 hostpid=1596 loginname=myuser isolationlevel=serializable (4) xactid=2994026815 currentdb=8 lockTimeout=4294967295 clientoption1=671088672 clientoption2=128056
    executionStack
    frame procname=mydb.dbo.SaveBill line=70 stmtstart=6148 stmtend=8060 sqlhandle=0x03000800d61f5c056bd3860170a300000100000000000000
    INSERT INTO [dbo].[Prod1] .....
    inputbuf
    Proc [Database Id = 8 Object Id = 89923542]
    process id=process5d84988 taskpriority=0 logused=41748 waitresource=KEY: 8:72057594811318272 (ffffffffffff) waittime=2444 ownerId=2994024748 transactionname=user_transaction lasttranstarted=2014-07-25T12:46:57.320 XDES=0x55014f3c0 lockMode=RangeI-N schedulerid=39 kpid=14292 status=suspended spid=376 sbid=0 ecid=0 priority=0 trancount=2 lastbatchstarted=2014-07-25T12:46:57.440 lastbatchcompleted=2014-07-25T12:46:57.440 clientapp=pa hostname=pa01 hostpid=1548 loginname=myuser isolationlevel=serializable (4) xactid=2994024748 currentdb=8 lockTimeout=4294967295 clientoption1=671088672 clientoption2=128056
    executionStack
    frame procname=pa.dbo.SaveBill line=70 stmtstart=6148 stmtend=8060 sqlhandle=0x03000800d61f5c056bd3860170a300000100000000000000
    INSERT INTO [dbo].[Prod1]....
    inputbuf
    Proc [Database Id = 8 Object Id = 89923542]
    resource-list
    keylock hobtid=72057594811318272 dbid=8 objectname=pa.dbo.prod1 indexname=PK_a id=lock1608ee1380 mode=RangeS-S associatedObjectId=72057594811318272
    owner-list
    owner id=process5d84988 mode=RangeS-S
    waiter-list
    waiter id=process5daddc8 mode=RangeI-N requestType=convert
    keylock hobtid=72057594811318272 dbid=8 objectname=pa.dbo.prod1 indexname=PK_a id=lock1608ee1380 mode=RangeS-S associatedObjectId=72057594811318272
    owner-list
    owner id=process5daddc8 mode=RangeS-S
    waiter-list
    waiter id=process5d84988 mode=RangeI-N requestType=convert

    Don't know. Perhaps these can help. I scanned the second link but didn't see much about Ending Deadlocks. I'd say the Fourth link probably has better information than the first three links. But maybe read them all just in case the Fourth is missing something
    one of the first three have.
    Deadlocking
    Detecting and Ending Deadlocks
    Minimizing Deadlocks
    Handling Deadlocks in SQL Server
    Google search for "SQL Deadlock"
    La vida loca

  • Joining two tables in two different schema

    Hi All,
    I have a requirement to join two tables in two different schema. How to join these two tables in view object.
    Many thanks in advance.
    Regards
    Kaushik Gopalakrishnan

    1) If these tables are in one and same database instance, then you can join them by specifying the fully-qualified table names (inlcuding the schema name), for example:
    SELECT ...
    FROM schema_A.table1 T1, schema_B.table2 T2
    WHERE T2.parent_code = T1.code
         AND ...2) If the tables are in different database instances, then you can create a database link in one of the databases and access the table from the other database via the DB link, for example:
    SELECT ...
    FROM schema_A.table1 T1, schema_B.table2@mydblink T2
    WHERE T2.parent_code = T1.code
         AND ...3) If the tables are in different database instances and there is no option for DB links, then you cannot join the tables in an ADF ViewObject.
    Dimitar

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

  • 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

  • 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

  • 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

  • Please wait while windows re-configures iTunes ....

    This is the sort of box on the XP desktop that will strike fear into your heart, especially the day after Patch Tuesday. It doesn't seem to have caused any problems but then I haven't really had time to check (And I don't use IE). If you're suddenly

  • Sorry, something went wrong error when adding a calculated column

    Hi I tried add a column via calculation, and it seems to not be correct because I keep getting a syntax error.. Can anyone tell me why or where I went wrong? This is a dropdown box when a certain CIRCUIT TYPE is selected it would out put a calculatio

  • Use of sums in other formulas

    Post Author: skootsu CA Forum: Formula Hello all.  I'm dealing with a huge report request that is to be output to excel.  It pulls from a inventory transaction table with tons of records.  I have  grouped by transaction type then summed and counted. 

  • I Tunes is not syncing my TV shows when checked.

    When i am in ITunes everything syncs fine - Songs, Books, Films etc..but when i click on a TV show i want to sync over ITunes knows i want to sync due to the TV Programmes section of the bar moving up. But when i hit sync it doesnt transfer it over.

  • Transferring Books/other items

    will I be able to transfer books from my kindle app or other pictures/videos from my iPad to an IPad 2!??