Identical tables - synchronous capture

i have an enterprise edition DB (11.2.0.3) that needs to be kept in sync with a standard edition DB (11.2.0.3). About twenty tables need replicating - they are not volatile, so the general daily traffic will not be high.
I need the tables on both DBs to be IDENTICAL - rows will be updated and not just inserted/deleted.
This raises a question about how the DESTINATION table is to be populated. Do replicated tables have to have primary keys ? And if they don't, how do updates work - what is the procedure that maps the ROWIDs from the source DB to the destination DB ?
johnnie

Hi Johnnie,
To keep the replicated tables in sync, there should be primary key define on source and target DB.
In the absence of the PKs , a substitute key needs to be defined using SET_KEY_COLUMNS procedure of DBMS_APPLY_ADM. A substitute key is a column or set of columns that Oracle can use to identify uniquely rows in the table. This will enable APPLY to identify the row and apply the changes When using SET_KEY_COLUMNS be sure to list ALL of the key columns, in order, in the column list. Do not specify each column in a separate call to SET_KEY_COLUMNS
EXECUTE DBMS_APPLY_ADM.SET_KEY_COLUMNS('<owner>.<table_name>','<col1>,<col2>,....');
EXEC DBMS_APPLY_ADM.START_APPLY('<applyname>');
Thanks,
Reena

Similar Messages

  • Initial load failing between identical tables. DEFGEN skewed and fixable?

    Initial load failing between identical tables. DEFGEN skewed and fixable?
    Error seen:
    2013-01-28 15:23:46 WARNING OGG-00869 [SQL error 0 (0x0)][HP][ODBC/MX Driver] DATETIME FIELD OVERFLOW. Incorrect Format or Data. Row: 1 Column: 11.
    Then compared the discard record against a select * on the key column.
    Mapping problem with insert record (target format)...
    **** Comparing Discard contents to Select * display
    ABCHID = 3431100001357760616974974003012 = 3431100001357760616974974003012
    *!!! ABCHSTEPCD = 909129785 <> 9 ???*
    ABCHCREATEDDATE = 2013-01-09 13:43:36 = 2013-01-09 13:43:36
    ABCHMODIFIEDDATE = 2013-01-09 13:43:36 =2013-01-09 13:43:36
    ABCHNRTPUSHED = 0 = 0
    ABCHPRISMRESULTISEVALUATED = 0 = 0
    SABCHPSEUDOTERM = 005340 = 005340
    ABCHTERMID = TERM05 = TERM05
    ABCHTXNSEQNUM = 300911112224 = 300911112224
    ABCHTIMERQSTRECVFROMACQR = 1357799914310 = 1357799914310
    *!!! ABCTHDATE = 1357-61-24 00:43:34 <> 2013-01-09 13:43:34*
    ABCHABCDATETIME = 2013-01-09 13:43:34.310000 = 2013-01-09 13:43:34.310000
    ABCHACCOUNTABCBER =123ABC = 123ABC
    ABCHMESSAGETYPECODE = 1210 = 1210
    ABCHPROCCDETRANTYPE = 00 = 00
    ABCHPROCCDEFROMACCT = 00 = 00
    ABCHPROCCDETOACCT = 00 = 00
    ABCHRESPONSECODE = 00 = 00
    …. <snipped>
    Defgen comes out same when run against either table.
    Also have copied over and tried both outputs from DEFGEN.
    +- Defgen version 2.0, Encoding ISO-8859-1
    * Definitions created/modified 2013-01-28 15:00
    * Field descriptions for each column entry:
    * 1 Name
    * 2 Data Type
    * 3 External Length
    * 4 Fetch Offset
    * 5 Scale
    * 6 Level
    * 7 Null
    * 8 Bump if Odd
    * 9 Internal Length
    * 10 Binary Length
    * 11 Table Length
    * 12 Most Significant DT
    * 13 Least Significant DT
    * 14 High Precision
    * 15 Low Precision
    * 16 Elementary Item
    * 17 Occurs
    * 18 Key Column
    * 19 Sub Data Type
    Database type: SQLMX
    Character set ID: ISO-8859-1
    National character set ID: UTF-16
    Locale: en_EN_US
    Case sensitivity: 14 14 14 14 14 14 14 14 14 14 14 14 11 14 14 14
    Definition for table RT.ABC
    Record length: 1311
    Syskey: 0
    Columns: 106
    ABCHID 64 34 0 0 0 0 0 34 34 34 0 0 32 32 1 0 1 3
    ABCHSTEPCD 132 4 39 0 0 0 0 4 4 4 0 0 0 0 1 0 0 0
    ABCHCREATEDDATE 192 19 46 0 0 0 0 19 19 19 0 5 0 0 1 0 0 0
    ABCHMODIFIEDDATE 192 19 68 0 0 0 0 19 19 19 0 5 0 0 1 0 0 0
    ABCHNRTPUSHED 130 2 90 0 0 0 0 2 2 2 0 0 0 0 1 0 0 0
    ABCHPRISMRESULTISEVALUATED 130 2 95 0 0 0 0 2 2 2 0 0 0 0 1 0 0 0
    ABCHPSEUDOTERM 0 8 100 0 0 0 0 8 8 8 0 0 0 0 1 0 0 0
    ABCTERMID 0 16 111 0 0 0 0 16 16 16 0 0 0 0 1 0 0 0
    ABCHTXNSEQNUM 0 12 130 0 0 0 0 12 12 12 0 0 0 0 1 0 0 0
    ABCHTIMERQSTRECVFROMACQR 64 24 145 0 0 0 0 24 24 24 0 0 22 22 1 0 0 3
    ABCTHDATE 192 19 174 0 0 0 0 19 19 19 0 5 0 0 1 0 0 0
    ABCHABCDATETIME 192 26 196 0 0 1 0 26 26 26 0 6 0 0 1 0 0 0
    ABCHACCOUNTABCER 0 19 225 0 0 1 0 19 19 19 0 0 0 0 1 0 0 0
    ABCHMESSAGETYPECODE 0 4 247 0 0 1 0 4 4 4 0 0 0 0 1 0 0 0
    ABCHPROCCDETRANTYPE 0 2 254 0 0 1 0 2 2 2 0 0 0 0 1 0 0 0
    ABCHPROCCDEFROMACCT 0 2 259 0 0 1 0 2 2 2 0 0 0 0 1 0 0 0
    ABCHPROCCDETOACCT 0 2 264 0 0 1 0 2 2 2 0 0 0 0 1 0 0 0
    ABCHRESPONSECODE 0 5 269 0 0 1 0 5 5 5 0 0 0 0 1 0 0 0
    … <snipped>
    The physical table shows a PACKED REC 1078
    And table invoke is:
    -- Definition of table ABC3.RT.ABC
    -- Definition current Mon Jan 28 18:20:02 2013
    ABCHID NUMERIC(32, 0) NO DEFAULT HEADING '' NOT
    NULL NOT DROPPABLE
    , ABCHSTEPCD INT NO DEFAULT HEADING '' NOT NULL NOT
    DROPPABLE
    , ABCHCREATEDDATE TIMESTAMP(0) NO DEFAULT HEADING '' NOT
    NULL NOT DROPPABLE
    , ABCHMODIFIEDDATE TIMESTAMP(0) NO DEFAULT HEADING '' NOT
    NULL NOT DROPPABLE
    , ABCHNRTPUSHED SMALLINT DEFAULT 0 HEADING '' NOT NULL NOT
    DROPPABLE
    , ABCHPRISMRESULTISEVALUATED SMALLINT DEFAULT 0 HEADING '' NOT NULL NOT
    DROPPABLE
    , ABCHPSEUDOTERM CHAR(8) CHARACTER SET ISO88591 COLLATE
    DEFAULT NO DEFAULT HEADING '' NOT NULL NOT DROPPABLE
    , ABCHTERMID CHAR(16) CHARACTER SET ISO88591 COLLATE
    DEFAULT NO DEFAULT HEADING '' NOT NULL NOT DROPPABLE
    , ABCHTXNSEQNUM CHAR(12) CHARACTER SET ISO88591 COLLATE
    DEFAULT NO DEFAULT HEADING '' NOT NULL NOT DROPPABLE
    , ABCHTIMERQSTRECVFROMACQR NUMERIC(22, 0) NO DEFAULT HEADING '' NOT
    NULL NOT DROPPABLE
    , ABCTHDATE TIMESTAMP(0) NO DEFAULT HEADING '' NOT
    NULL NOT DROPPABLE
    , ABCHABCDATETIME TIMESTAMP(6) DEFAULT NULL HEADING ''
    , ABCHACCOUNTNABCBER CHAR(19) CHARACTER SET ISO88591 COLLATE
    DEFAULT DEFAULT NULL HEADING ''
    , ABCHMESSAGETYPECODE CHAR(4) CHARACTER SET ISO88591 COLLATE
    DEFAULT DEFAULT NULL HEADING ''
    , ABCHPROCCDETRANTYPE CHAR(2) CHARACTER SET ISO88591 COLLATE
    DEFAULT DEFAULT NULL HEADING ''
    , ABCHPROCCDEFROMACCT CHAR(2) CHARACTER SET ISO88591 COLLATE
    DEFAULT DEFAULT NULL HEADING ''
    , ABCHPROCCDETOACCT CHAR(2) CHARACTER SET ISO88591 COLLATE
    DEFAULT DEFAULT NULL HEADING ''
    , ABCHRESPONSECODE CHAR(5) CHARACTER SET ISO88591 COLLATE
    DEFAULT DEFAULT NULL HEADING ''
    …. Snipped
    I suspect that the fields having subtype 3 just before the garbled columns is a clue, but not sure what to replace with or adjust.
    Any and all help mighty appreciated.

    Worthwhile suggestion, just having difficulty applying.
    I will tinker with it more. But still open to more suggestions.
    =-=-=-=-
    Oracle GoldenGate Delivery for SQL/MX
    Version 11.2.1.0.1 14305084
    NonStop H06 on Jul 11 2012 14:11:30
    Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
    Starting at 2013-01-31 15:19:35
    Operating System Version:
    NONSTOP_KERNEL
    Version 12, Release J06
    Node: abc3
    Machine: NSE-AB
    Process id: 67895711
    Description:
    ** Running with the following parameters **
    2013-01-31 15:19:40 INFO OGG-03035 Operating system character set identified as ISO-8859-1. Locale: en_US_POSIX, LC_ALL:.
    Comment
    Comment
    REPLICAT lodrepx
    ASSUMETARGETDEFS
    Source Context :
    SourceModule : [er.init]
    SourceID : [home/ecloud/sqlmx_mlr14305084/src/app/er/init.cpp]
    SourceFunction : [get_infile_params]
    SourceLine : [2418]
    2013-01-31 15:19:40 ERROR OGG-00184 ASSUMETARGETDEFS is not supported for SQL/MX ODBC replicat.
    2013-01-31 15:19:45 ERROR OGG-01668 PROCESS ABENDING.

  • Table that captures change history of Ownership of Tranport Requests.

    Hello Folks,
                        I have been trying to locate a table that captures change in ownership of requests. I've tried Transport organizer transactions SE01 (extended view), tables E070 and E071 and SE03 but without success. Is there a table which captures change history of ownership?
    Regards,
    Prashant

    Hello Krishna,
                          This option would only work when table logging is enabled. Not otherwise. To give you a gist of my problem, one of the users from the client side created a request (authorization side is in a mess so business users also have access in Dev systems with lots of auths). He later instructed one of out functional consultants to tranfer the request from his name to the functional consultant's name. The request was later released and moved to Production system. Now the user from the client side denies that he ever created a request. (Audit issue now) and its going to snowball.
    Is there a solution.
    Regards,
    Prashant

  • How to compare the data of two identical tables

    My requirement is to compare two identical tables(eg., t1 and t2) and display the column, which value got changed, old value and its new value.
    For eg:
    T1:
    StudId C1 C2 C3
    1 40 50 90
    2 30 80 100
    3 20 10 11
    T2:
    StudId C1 C2 C3
    1 100 60 90
    2 30 90 100
    3 20 60 80
    output should be:
    StudId Column prevvalue changedvalue
    1 C1 40 100
    1 C2 50 60
    2 C2 80 90
    3 C2 10 60
    3 C3 11 80
    Please help me to how to achieve using oracle pl/sql. It is bit urgent

    No need of PL/SQL, you can do it in SQL as shown
    SQL> create table t1
      2  (
      3  studentId number,
      4  c1 number,
      5  c2 number,
      6  c3 number
      7  );
    Table created
    SQL> insert into t1 values (1,40,50,90);
    1 row inserted
    SQL> insert into t1 values (2,30,80,100);
    1 row inserted
    SQL> insert into t1 values (3,20,10,11);
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> create table t2
      2  (
      3  studentId number,
      4  c1 number,
      5  c2 number,
      6  c3 number
      7  );
    Table created
    SQL> insert into t2 values (1,100,60,90);
    1 row inserted
    SQL> insert into t2 values (2,30,90,100);
    1 row inserted
    SQL> insert into t2 values (3,20,60,80);
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> select * from t1;
    STUDENTID         C1         C2         C3
             1         40         50         90
             2         30         80        100
             3         20         10         11
    SQL> select * from t2;
    STUDENTID         C1         C2         C3
             1        100         60         90
             2         30         90        100
             3         20         60         80
    SQL> select
      2  t1.studentId StudId,'c1' ColumnName,t1.c1 prevvalue,t2.c1 changedvalue
      3  from t1,t2
      4  where t1.studentId = t2.studentId and
      5  t1.c1 <> t2.c1
      6  union
      7  select
      8  t1.studentId,'c2',t1.c2,t2.c2
      9  from t1,t2
    10  where t1.studentId = t2.studentId and
    11  t1.c2 <> t2.c2
    12  union
    13  select
    14  t1.studentId,'c3',t1.c3,t2.c3
    15  from t1,t2
    16  where t1.studentId = t2.studentId and
    17  t1.c3 <> t2.c3
    18  ;
        STUDID COLUMNNAME  PREVVALUE CHANGEDVALUE
             1 c1                 40          100
             1 c2                 50           60
             2 c2                 80           90
             3 c2                 10           60
             3 c3                 11           80
    SQL>

  • Log based capture vs. synchronous capture

    Hi, Log based capture based on rego logs scan and capture process can re-scan redo/archive logs if db will crash at some point to make sure that all required changes were captured and sent to destination db. What about synchronous capture? Is there any mechanism which can be used to re-discover changes made to database and make sure that those changes will be send to destination db?

    log based capture can be both synchronous and asynchronous. It can read from online redo logs and not from archived ones.

  • Container hanging in mesyhead/mesybody tables - synchronous synchronization

    Hi everyone,
    Can someone help me with our SAP netweaver 2004s.
    After synchronous synchronization with mobile application the synchronization container hangs in the mesyhead and mesybody tables.
    If the device have to be reinstalled it will gain new device ID and the old devices container will hang in the tables forewer.
    Why are the containers remaining in the mesy* tables after synchronous synchronization? arent they supposed to be used during asynchronous sync?
    Can i delete this containers manualy? and how?
    I have tried to delete old and unused device ids from the NWA using Device removal funftion, but it deletes on merep* tables not the mesy* tables.
    Thanks a lot.

    Thank you for the quick answer.
    I have found this notes when searching on the support portal, but they are allready implemented as we are on SP15 - SAPKB70015
    Also there are no dumps in the system.
    Any other thoughts?
    Regards,
    Lukas Loskot

  • How do I read from one table and write to another identical table?

    I am very new to Oracle. I am trying to do something that should be very simple.
    I am trying to read from one table in SQL and then write to another
    Identically formatted table. I keep getting various errors. Could someone please
    post some vey simple code that will work so that I can play around with it?
    Any help would be greatly appreciated.
    Thanks,
    Ron

    Thanks, but I must be missing something.
    I have two tables, SONGLIST and SETLIST.
    The second line by itself works just fine on either table.
    Here is the code I used following your seggestion, along with it's error message.
    Hope you can help. Thanks again...
    INSERT INTO SETLIST
    SELECT TITLE FROM SONGLIST WHERE ROTATION <> 'X'
    ORA-00947: not enough values

  • Hi Reg Table Values Capturing

    Hi All,
        I used Adaptive RFC  and get the data into Table in Webdynpro Java.
       and Now i want How to capture the Particular table Row values like this
    String SPlant = wdContext.nodeTb_Matdata().getTb_MatdataElementAt(3).getSplant();
    but i got the error IndexOutofBoundException.
    Can anyone please help me out.
    Thanks & regards,
    Archana

    Hi All,
         Iam getting only one record from RFC.
         I changed the code as per ur suggestions.
            even though i got the error.
    Rfc_Goodsmovement_Rfid_Input input = new Rfc_Goodsmovement_Rfid_Input();
        wdContext.nodeRfc_Goodsmovement_Rfid_Input().bind(input);
         Zmatrdata table  = new Zmatrdata();
    int size = wdContext.nodeTb_Matdata().size();
    for(int i = 0 ; i < size ; i++){
           table.setMatnr(wdContext.nodeTb_Matdata().getTb_MatdataElementAt    
                                                   (i).getMatnr()); 
           table.setCharg(wdContext.nodeTb_Matdata().getTb_MatdataElementAt 
                                                   (i).getCharg());
           table.setSplant(wdContext.nodeTb_Matdata().getTb_MatdataElementAt
                                                   (i).getSplant());
         input.addTb_Matdata(table);
    wdContext.nodeTb_Matdata().bind(table);
    this is the code which i have written, but its not calling the backend RFC.
    when i give like this  table.setSplant("abc")  its working fine.
    Can anyone please help me out.
    Thank s&Regards,
    Archana

  • Working with 2 identical tables 1.2008   2.2009

    I have 2 separate tables 1 being an archive table(2008) and the other being a current table(2009).  I would like to do some comparisons and forcasting of the data however I have not been successful in linking and defining a selection criteria to pull the 2 data sets together.  The fields in the tables are identical and the only difference being data separation by date range. Any additional tips on the report layout would be appreciated.
    ps...I also have tables for 2000-2007

    You could just do a union of the two (or however many) tables, ie:
    select fielda, fieldb, fieldc from 2008tabledata
    union select fielda, fieldb, fieldc from 2009tabledata
    union select fielda, fieldb, fieldc from 2007tabledata
    That will give you one big table with all your data (you may want to add date criteria in a where clause if it's too big!) that you can then write your report off of to see your time trends, etc.

  • Real Application Tesing Create table(DDL) captures or skips

    Hi,
    We are testing using Oracle Real Application Testing. We were able to capture and replay successfully. However on the capture side the application creates lot of tables during batch load and then drops them. It appears like these create table statements are not getting replayed on replay database.
    Can any help me know if RAT(Real Application Testing) Capture the Create table (DDL) statements and replay's it successfully.
    Thanks,
    Ranga

    Then make sure the parsing schema of that other workspace has create table privilege granted directly to it. Better yet, review the system privileges of the working schema and make sure the broken schema has the same privs. Do not grant privileges using roles.
    Scott

  • How add capture schema level to existing table level capture

    I have setup Oracle Streams 2 databases( oracle 10.2.0.4 windows 2003) 2-way replication. Database A capture 55 tables and database B capture 32 tables from same schema.
    I need add one more database C (oracle 11.1.0.7 rac windows 2003); replicate whole schema level from database A;
    What sould I do?
    Add new schema level capture process on database A?
    Can I drop current capture table level on database A and create schema level capture and use different propagation?
    Please help

    Better use 2 differents captures and 2 differents propagations, specially since on the of the capture is bi-directional.
    When troubles will come, you will be happy of this separation, Also if something special is requested, you will be confortable with the implementation and sure that no side effects on the other capture. But the ease of maintenance, the different FIRST_SCN, will make your life better.
    Remember that a propagation that goes always from A-->B, you can remove the rule set. In this case everything that enter A goes to B.
    So is it better to do
    A -> rules  |-----> B
                 |-----> Cor not proagation rules :
        A ---> B
        A ---> CI vote for the second.

  • What is the Table to Capture line item changes in PO?

    Dear Guru's
    what is the table in which i can find the report of ammendment in the PO at line item level OR is there any Standard SAP report ???
    please help..
    gaurav

    Go through Following Link
    Report on Purchase order header changes and Line item changes.
    Vipin

  • How to exclude table from capture process in 9.2.0.8?

    I have stream replication in Oracle 9.2.0.8 at schema level. In the list of tables I need to exclude one.
    How can I do that?
    Thanks in advance

    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_strm_2.htm#1006471
    Read everything that has the word "RULES" in it and seems to apply.

  • How to create ForeignKey reference to code-first identity tables.

    Hi,
    I'm developing a web application using MVC 5, EntityFramework 6 with a Code-First approach.
    I have successfully created my tables dbo.AspNetRoles, dbo.AspNetUsers... etc, also I have created some custom tables for example a table that must have a relationship between the menus presented and the role of the authenticated user. What I want to add
    to my model is a property like this:
    [ForeignKey]public virtual AspNetRoles Roles { get; set; }
    But of course I have not an AspNetRoles class, because the framework auto generates the tables only in the SQL database, so my question is, I have to manually create this classes? How can I link them to the database tables, I think the issue may be deeper.
    If I can't do this maybe I should go back to SQL manual queries.
    Thanks!

    Hello Morral,
    >> What I want to add to my model is a property like this:
    If you have a separate model to store your own business model, what you have written should be almost ok, however, please take care the [ForeignKey] attribute is usually used to markup a property as an integer property to specify it as a foreign key:
    public virtual int RoleID { get; set; } [ForeignKey("RoleID")] 
    public virtual AspNetRoles Roles { get; set; }
    Or it would generated a combinatorial name.
    >> But of course I have not an AspNetRoles class, because the framework auto generates the tables only in the SQL database, so my question is, I have to manually create this classes?
    From your description, the AspNetRoles class seems to be a system class which is not exposed to user. If so, these classes already exists, you do not need to create them again.
    I notice that you are working with the MVC project, you could also ask this issue to the MVC forum:
    http://forums.asp.net/1146.aspx
    There are MVC experts will help you.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to display xml imported info on 2 identical tables

    I am lost.
    I am importing xml info and display these info on different pages, this includes a dynamic table, which is perfectly displayed on the first page. no problem until here. However, I simply cannot display this table a second time.
    Any idea?
    thanks,

    Usually if you want to display the same data in multiple places in the PDF, you need to set the binding of these fields to be Global. But when you choose Global, you may not be able to select the Binding to a data connection option. They are mutually exclusive.
    But work around I can think of (unless anyone has a better and neat approach) is to keep the table binding to Global and write script to loop thru the data XML and populate the first table (since it is set to Global, it will automatically populate the second table and so on..)..
    Thanks
    Srini

Maybe you are looking for

  • J2EE Struts - Database connection failed - help???:(

    Hello, I have built a little web application and it works without any problems. In the next step I tried to add a database connection but I have already worked on it for at least one day and I could not fix the problem with the database connection. I

  • How to find out value of a shipment in SAP?

    Hello experts, If I want to view the "value" of a delivery document, what are my options?  From what I understand: 1) Go back to Sales Order and find value.  This can be tedious as if SO has 100 items and delivery only has 50, it would be a pain to h

  • I changed the black ink cartridge - does not print

    I changed the black ink cartridge to a refilled one, but as it did't work , changed it to a genuine one.  Now the printer does not print, though it seems to be working, all I get is plank pages.  I unplugged the printer, but it didn't help.  what can

  • ISight not working in MacBook Fix

    Just saw this at MacUpdate "I purchased a new MacBook recently. A few days after its purchase, the internal camera stopped working. Launching iChat or PhotoBooth activated the camera displaying the green light. The Apple System Profiler also showed t

  • HT201210 When trying to restore an i pod touch  - i receive an error after the restore has started

    When trying to restore an i pod touch - I recieve an unknown error (1611).  We have retried the process a few times with the same result.