CDC without Primary Key

Hi,
Can we implement Change Data Capture in Oracle 10g without having Primary Key at the source level.
With Regards,
Katta

Hi;
Can we implement Change Data Capture in Oracle 10g without having Primary Key at the source level.AFAIK yes; Please see
http://docs.oracle.com/cd/B13789_01/server.101/b10736/cdc.htm#i1025409
http://en.wikipedia.org/wiki/Change_data_capture
Regard
Helios

Similar Messages

  • In the case without primary key

    Hi experts,
    In the case without primary key, we can define a primary key?
    In the case
    Source: SQL Server 2000
    Target: Oracle 11.2.0.3
    When both the source and target does not have primary key.
    Thank you
    Edited by: 891982 on 21 ก.ค. 2555, 18:41 น.

    GGSCI (win-ms) 48> stats msdp
    Sending STATS request to EXTRACT MSDP ...
    Start of Statistics at 2012-07-21 12:40:28.
    Output to E:\destgg\dirdat\dt:
    Extracting from dbo.City to dbo.test:
    *** Total statistics since 2012-07-21 12:36:30 ***
    Total inserts 2.00
    Total updates 0.00
    Total deletes 0.00
    Total discards 0.00
    Total operations 2.00
    and
    GGSCI (win-ms) 48> stats msdp
    Sending STATS request to EXTRACT MSDP ...
    Start of Statistics at 2012-07-21 12:40:28.
    Output to E:\destgg\dirdat\dt:
    Extracting from dbo.City to example.test:
    *** Total statistics since 2012-07-21 12:36:30 ***
    Total inserts 2.00
    Total updates 0.00
    Total deletes 0.00
    Total discards 0.00
    Total operations 2.00
    Thank you

  • Hibernate without primary key?

    i need to use hibernate for the table which do not have primary key. I found many explanation about there should not any table without primary key.
    plz let me know for this case-
    user table with unique pk userId
    group table with unique pk groupId
    and one more mapping table for them group-user table which will contain both of the primary keys. there should not have pk for that group-user table. but, with userId and groupId, the rows from that tables are unique.
    I just wanna show a sample for this kind of case. plz let me know is there anyway to solve it?

    Read chapter 7.3 of the Hibernate Reference Documentation.
    For future Hibernate questions, please checkout http://forums.hibernate.org
    This has definitately nothing to do with JDBC, but with lack of effort to gently read documentations/manuals.

  • Does ADF Business Components  work well with tables without primary Key?

    We have tables using unique index without primary key. Can ADF Business Components relate business objects based on the unique index columns of the tables?

    Hi,
    Regarding my question about the XML syntax for custom properties:
    It turned out to be another problem in the Entity object definition that caused the JDeveloper error. Other entities let me add the custom property without problems. However should anybody ever need that XML syntax, here's how you add a custom property to an entity definition in the XML code:
      <Attribute
        Name="Id"
        IsNotNull="true"
        Precision="10"
        Scale="0"
        ColumnName="ID"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        SQLType="NUMERIC"
        TableName="TABLE"
        PrimaryKey="true">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="22"/>
        </DesignTime>
        <Properties>
          <CustomProperties>
            <Property
              Name="SequenceName"
              Value="SEQ1"/>
          </CustomProperties>
        </Properties>   
      </Attribute>Best regards,
    Bart Kummel
    Edited by: Bart Kummel on Sep 8, 2009 1:14 PM

  • How to speed up fast refresh of materialized view without primary key

    Thought I'd share this info, as I couldn't find anything on here to help me diagnose the issue:
    I had a materialized view that was taking longer to perform a fast refresh than it took to perform a complete refresh. My mview had no primary key, as the base table had no primary key.
    I created a trace file for the session and saw references to a column M_ROW$$ in my mview. Nowhere in the data dictionary could I find a reference to the m_row$$ column in my mview, but apparently it exists and is created automatically. After creating the index below, the fast refresh took 6 minutes to add 500k rows to the materialized view. (versus 4+ hours without the index) When I looked in the trace file, I noticed that for each row in the mview log, it first tries to update the mview with an UPDATE statement, then it performs an insert of the new data. Seems like it should be able to determine whether to perform an update or insert based on the DMLTYPE$$ column of the mview log. What was killing my performance was the UPDATE phase. Since I had no primary key on the mview, and no index on the m_row$$ column, the UPDATE phase was performing a full table scan of my mview for every row in the mview log. I was expecting it to be smart enough to only perform inserts, as the only transactions against the base table were inserts.
    In summary: If you have a materialized view without a primary key, create an index on the m_row$$ column of the mview, even though no such column displays in the data dictionary.
    ex:
    CREATE MATERIALIZED VIEW mv_minidrr ...
    CREATE INDEX pk_mv_minidrr ON mv_minidrr(m_row$$) ...

    Well, there indeed is a column called M_ROW$$
    Your MLOG$_EMP is nothing but the materialized view log on the base table.
    SQL> create  materialized view log on emp with rowid ;
    Materialized view log created.
    SQL> create materialized view emp_mview refresh fast on demand with rowid as select * from emp ;
    Materialized view created.
    SQL> desc mlog$_emp
    Name                                                  Null?    Type
    M_ROW$$                                                        VARCHAR2(255)
    SNAPTIME$$                                                     DATE
    DMLTYPE$$                                                      VARCHAR2(1)
    OLD_NEW$$                                                      VARCHAR2(1)
    CHANGE_VECTOR$$                                                RAW(255)
    SQL> select table_name, column_name from user_tab_columns where column_name = 'M_ROW$$' ;
    TABLE_NAME                     COLUMN_NAME
    MLOG$_EMP                      M_ROW$$
    1 row selected.
    SQL>

  • Creating a snapshot without primary keys

    Hi,
    I would like to create a snapshot for a table that does not have a primary key. I've read the thread
    "Re: creating snapshots without a primary key??"
    from Mar 24, 2003, which seems to indicate that this is allowed if the snapshot is not updatable. However, even when I disable the "Updatable?" option, I still get the following error:
    WTG-20502 Packaging Wizard Failed. 500
    CONS-10032: Publication item: WTGPI_10012 cannot
    be updatable, primary keys for xyz.abc not found.
    BTW, the Oracle9i Lite Developer's Guide for Windows 32 is really thin in this area. In particular, the description of the Updatable feature is the following:
    This check box defines the snapshot to be created
    as updatable.
    That description has a lot of unmet potential.
    Thanks,
    Tim

    Hello,
    If you create a snapshot that has no primary key, you have to check the option "complete refresh".
    Oracle uses the primary key to track changes for the "partial refresh" option (only send changes back and forth).
    -Antti Virkkunen, www.vilant.com

  • Create a materized view without primary key constraint on the base table?

    Hi
    I tried to create a materized view but I got this error:
    SQL> CREATE MATERIALIZED VIEW TABLE1_MV REFRESH FAST
    START WITH
    to_date('04-25-2009 03:00:13','MM-dd-yyyy hh24:mi:ss')
    NEXT
    sysdate + 1
    AS
    select * from TABLE1@remote_db
    SQL> /
    CREATE MATERIALIZED VIEW TABLE1_MV REFRESH FAST
    ERROR at line 1:
    ORA-12014: table 'TABLE1' does not contain a primary key constraint.
    TABLE1 in remote_db doesn't have a primary key constraint. Is there anyway that I can create a materized view on a base table which doesn't have a primary key constraint?
    Thanks
    Liz

    Hi,
    Thanks for your helpful info. I created a materialized view in the source db with rowid:
    SQL> CREATE MATERIALIZED VIEW log on TABLE1 with rowid;
    Materialized view log created.
    Then I created a MV on the target DB:
    CREATE MATERIALIZED VIEW my_schema.TABLE1_MV
    REFRESH FAST
    with rowid
    START WITH
    to_date('04-25-2009 03:00:13','MM-dd-yyyy hh24:mi:ss')
    NEXT
    sysdate + 1
    AS
    select * from TABLE1@remote_db
    SQL> /
    CREATE MATERIALIZED VIEW my_schema.TABLE1_MV
    ERROR at line 1:
    ORA-12018: following error encountered during code generation for
    "my_schema"."TABLE1_MV"
    ORA-00942: table or view does not exist
    TABLE1 exists in remote_db:
    SQL> select count(*) from TABLE1@remote_db;
    COUNT(*)
    9034459
    Any clue what is wrong?
    Thanks
    Liz

  • Creating a New Row Using an ADF Iterator Binding without primary key value

    I dropped a Create action onto a DataAction which forwards to a UIX entry page which contains an enabled Commit button. Part of the primary key value is held in a session bean and it is also current in another view on the model side, but I am unable to access this value to set the EntityImpl primary key attribute.
    Upon submission the following error message is returned from the model:
    ORA-01400: cannot insert NULL into ("GTR"."EMPLOYMENT"."ACCOUNT")
    I would like to accomplish this with databinding and not create a custom create method on the application model. Is there a way to update the binding value for the new row in cache before the submission? Any advice would be welcome.

    I should add that I want the user to enter every attribute value, except for the account number. It must be possible to create a new row and have the account number supplied to the bindings another way.

  • Identity without Primary Key or with....which is the difference

    Guys, one question: which is the main difference between using Identity and using either Identity and Primary_Key? It looks a stupid question (and maybe it is) but...maybe is not so stupid.

    Primary Key is a logical implemention which creates behind the scene  unique clustered index (physical implementation)
    BTW, if you use an INDENTITY property and do not have PK on this you may end up with duplicates , ans also someone my reseed the values...
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence
    Using identity you may end up with duplicates??!!

  • CMP without Primary key

    Hi
    # i have java.lang.Object in Prim-key-class tag...
    # return type of ejbCreate and ejbPostCreate is Object
    # there is only 1 field to persisted
    Bottom line...
    There is no primary key field in my enity
    So when i delpy the ear The err is
    No Direct database field for primary key
    any Suggestions....
    Raja Shekhar

    Hi
    # i have java.lang.Object in Prim-key-class tag...
    # return type of ejbCreate and ejbPostCreate is Object
    # there is only 1 field to persisted
    Bottom line...
    There is no primary key field in my enity
    So when i delpy the ear The err is
    No Direct database field for primary key
    any Suggestions....
    Raja Shekhar

  • Merging data without primary key

    hiii,
    I have 2 internal tables "it_final1" and "It_final_new" and i want to join both tables.
    both have same fields like BUKRS,GJAHR,SAKNR.
    for IT_FINAL1 i am using "BAPI_GL_GETGLACCPERIODBALANCES" FM to get data.
    now i need to merge this.
    Please explain ...
    i am using below logic for that.
    LOOP AT IT_FINAL_NEW .
      IF sy-SUBRC = 0.
        MOVE-CORRESPONDING IT_FINAL_NEW to IT_FINAL_DIS.
      ENDIF.
    read table it_final1 with key bukrs = it_final_new-bukrs
                                                 gjahr = it_final_new-gjahr.
    move-corresponding it_final1 to it_final_dis.
    APPEND IT_FINAL_DIS.
    ENDLOOP.

    Hi,
    Please try the following,
    *Looping at final_new which has all fields except gjahr
    LOOP AT IT_FINAL_NEW .
    *move wa to destination wa
    MOVE-CORRESPONDING IT_FINAL_NEW to IT_FINAL_DIS.
    *read internal table having balance value using common field
    READ TABLE IT_FINAL1 WITH KEY BUKRS =  IT_FINAL_NEW-BUKRS INTO WA.
    if sy-subrc = 0.
    *assign balance value to final destination balance field
    IT_FINAL_DIS-balance = wa-balance.
    *append the it
    APPEND IT_FINAL_DIS.
    *now u got the values from 2 internal tables
    endif.
    ENDLOOP.
    Hope this solves your problem.
    Regards,
    Meera

  • Mapping ejb and database - primary key problem

    I'm trying to map some ejb's to an existing database. Unfortunately, when I load the db schema into deploytool, the table I'm interested in is not available because it doesn't have any primary key defined.
    Is it impossible to map an ejb to a db table without primary key ?
    Is it a sun-specific feature, or can I expect the same behaviour from other application servers vendors ?
    Thanks for the help.

    Hi Maxime,
    In J2EE RI 1.4, you can't map beans to tables w/o primary keys. I don't know, how other other products treat this issue.
    Regards,
    -- markus.

  • Fast Refresh using two non-primary key tables

    Hi,
    I have a materialized view based on two tables with an outer join clause. Both the tables do not have a primary key so I had created materialized view log with row-id on each of them but still I am not able to bring out the fast refresh option for the materialized view. My question is can I have a fast refresh option for materialized view built from two tables without primary keys and having an outer join clause????. If possible please send me some sample scripts for quicker understanding.
    Thanks and Regards,
    Sudhakar

    I was able to create a fast-refreshable MV, on tables without any PK. Unfortunately, I can't complete all the steps since my setup is a multi-master advanced replication (which ABSOLUTELY requires the tables to have PK's). Here are anyway the steps I took. Note that ORA102 is my (definition) master site, and MVDB is my MV site. The tables were created under user HR, and my master group is called "hr_repg". Here are my steps:
    HR on ora102 >create table countries_no_pk as select * from countries;
    Table created.
    HR on ora102 >create table regions_no_pk as select * from regions;
    Table created.
    HR on ora102 >create materialized view log on countries_no_pk with rowid;
    Materialized view log created.
    HR on ora102 >create materialized view log on regions_no_pk with rowid;
    Materialized view log created.
    REPADMIN on ora102 >exec dbms_repcat.suspend_master_activity('hr_repg')
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:02.68
    REPADMIN on ora102 >BEGIN
    2 DBMS_REPCAT.CREATE_MASTER_REPOBJECT (
    3 gname => 'hr_repg',
    4 type => 'TABLE',
    5 oname => 'countries_no_pk',
    6 sname => 'hr',
    7 use_existing_object => TRUE,
    8 copy_rows => FALSE);
    9 END;
    10 /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:05.19
    REPADMIN on ora102 >set timing off
    REPADMIN on ora102 >BEGIN
    2 DBMS_REPCAT.CREATE_MASTER_REPOBJECT (
    3 gname => 'hr_repg',
    4 type => 'TABLE',
    5 oname => 'regions_no_pk',
    6 sname => 'hr',
    7 use_existing_object => TRUE,
    8 copy_rows => FALSE);
    9 END;
    10 /
    PL/SQL procedure successfully completed.
    (note that you ABSOLUTELY need the rowid's in your select statement for an MV with joins):
    MVIEWADMIN on mvdb >CREATE MATERIALIZED VIEW hr.complex_mv refresh fast as
    2 select c.rowid "C_ROW_ID", r.rowid "R_ROW_ID", c.COUNTRY_ID, c.COUNTRY_NAME,
    3 c.REGION_ID, r.REGION_NAME from hr.regions_no_pk@ora102 r, hr.countries_no_pk@ora102 c
    4 where c.region_id = r.region_id (+);
    Materialized view created.
    MVIEWADMIN on mvdb >BEGIN
    2 DBMS_REPCAT.CREATE_MVIEW_REPOBJECT (
    3 gname => 'hr_repg',
    4 sname => 'hr',
    5 oname => 'complex_mv',
    6 type => 'SNAPSHOT',
    7 min_communication => TRUE);
    8 END;
    9 /
    PL/SQL procedure successfully completed.
    REPADMIN on ora102 >BEGIN
    2 DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT (
    3 sname => 'hr',
    4 oname => 'countries_no_pk',
    5 type => 'TABLE',
    6 min_communication => TRUE);
    7 END;
    8 /
    PL/SQL procedure successfully completed.
    (wait when the entries in DBA_REPCATLOG is empty)
    REPADMIN on ora102 >exec dbms_repcat.resume_master_activity('hr_repg')
    Hope that can help you. If that doesn't work, tell us where it bombs.
    Daniel

  • Primary Key / Foreign Key relationship

    Hi Folks,
    I have a MASTER_TABLE which has master values . This table has two fields, STATUS & STATUS_TEXT,  Key field is STATUS.
    This is a check table for another table INSTANCE_TABLE which also has field STATUS; this is not a key field though.
    The requirement is: If I  attempt to delete a STATUS value from MASTER_TABLE, it should not allow me if there is any record in INSTANCE_TABLE which has the same STATUS value. Is there a way to establish such a relationship between the two tables?
    Thank you for the help!
    Sid

    Hi Friend,
    Only through table Maintaince only it can be acheived , by table relatio it can not be  .
    because as you know the  non primary key cannot be be  check table field  .means
    In Mater table STATUS is primary key so you are  making it as check table field to  Insance table  STATUS Field.
    But  in Instance table is not a primary key so , without primary key you will not be able to  do the foriegn key relation to the master table ,so that  it will not be check table becs of that they check will not happen for your  scenario  . to acheieve this you need to either make your STATUS field in Instance table also as primary key and  do the foerign key relationship with  Master table  .
    Or else  write an event in the table maintainance  .
    Regards,

  • Defining Primary Keys

    How do you define Primary Key with multiple columns (say two) where the values of the first column such as extract date is not unique and the values of the second column such as sequence number is unique. The combined value of the two columns will be unique. For example
    Extract Date Seq Number
    20070701 001
    20070702 002
    20070703 003
    If you can please send my the syntax of the table definition.
    Thanks.

    Should I define the Primary Key clause at the column level definition or at the table level definition.
    Column Level Definition:
    EXTRACT_DATE CHAR(8) PRIMARY KEY
    SEQUENCE_NUMBER CHAR (5) PRIMARY KEY
    This may define the two columns as UNIQUE. If I define without PRIMARY KEY clause and SEQUENCE_NUMBER with UNIQUE constraint. Later as you suggested using the ALTER Table statement to define the Primary key.

Maybe you are looking for

  • To get a jpg or any image

    Hello, Can any one help me in telling how to get a jpg or any image in a JFrame and laos one more thing can I change the cup icon to my own icon is it possible if so can you give me a small example or method to do it. Regards, Sreedhar

  • Can´t get my Internet connection to work

    I´m trying to connect through AOL on a MacBook using an ethernet broadband connection. Unfortunately my AOL Connect software doesn´t detect my broadband modem. The modem and the ethernet cabel both work fine when connected to my desktop pc. I´ve been

  • HT1414 RESTORING IPHONE IN RECOVERY MODE

    HOW DO I RESTORE MY PHONE IN RECOVERY MODE.... THERE IS SOMETHING YOU DO BY HOLDING HOME AND OFF BUTTON AT THE SAME TIME?

  • V.V.Urgent

    Hi, My Object is I want Equipment data Send From SAP R/3 to SAP XI. When ever a Change,Create of Equipment Generated By Using IE01,IE02 Transactions it generatres a event  comes to  table "ZABC" creating a new record. I want to post the last record D

  • Has anyone gotten to the prepaid option 2 work on purpose??

    getting one soon dont want a 2yr. & u can just use a debit card?