If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > import for tables using insert_update

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-09-09, 16:58
savethytrees savethytrees is offline
Registered User
 
Join Date: Dec 2006
Posts: 25
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
Reply With Quote
  #2 (permalink)  
Old 04-09-09, 17:14
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
Reply With Quote
  #3 (permalink)  
Old 04-10-09, 09:34
savethytrees savethytrees is offline
Registered User
 
Join Date: Dec 2006
Posts: 25
No I wont know which rows will be updated.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On