Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006
    Posts
    25

    Unanswered: import for tables using insert_update

    Hi,
    I need to import a few tables from one database to the other. But I would ideally like to use the insert_update option since almost 90% of the rows are already in the tables. So i want them to be just updated if they are changd. But my problem is that most of these tables dont have either a primary key or a unique key. There is no way for DB2 to knowwhich rows to check for updates.

    1) Is it a necessitiy to have a primary key?
    2) Is there any other way to replicate the databases?

    HADR is not a solution since we need both databases.
    i guess even db2 replication needs primary keys.
    My main objective is to replicate one DB to another which will be used during day time. So in the night I need to replicate.

    DB2 v8.2 on AIX 5.3

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by savethytrees
    There is no way for DB2 to knowwhich rows to check for updates.

    1) Is it a necessitiy to have a primary key?
    2) Is there any other way to replicate the databases?
    Is there a way for _you_ to know which rows to update? If yes, use this knowledge to create a primary key. If not, add an artificial primary key column.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Dec 2006
    Posts
    25
    No I wont know which rows will be updated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •