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 > How to import RI constraints using DB2MOVE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-13-07, 15:45
diwakar123 diwakar123 is offline
Registered User
 
Join Date: Jan 2007
Posts: 33
How to import RI constraints using DB2MOVE

HI, I am migrating the databases from linux to AIX server. When used db2move export/import. it does not re-created the RIs.

I believe it can be achieved using:

Export ddls using db2look and create into target database
db2move import and then create manually RI const.

But looking for if there is any alternate way that I can force db2move to create objects, load and create RIs.

Thanks
Diwakar
Reply With Quote
  #2 (permalink)  
Old 05-13-07, 16:02
diwakar123 diwakar123 is offline
Registered User
 
Join Date: Jan 2007
Posts: 33
and/or Can I use redirected restore when migrating database from linux to aix?

Also, does db2 v8.2 allows to rename the schema for target database. I know v9 has that featured using COPY..

Thanks
Diwakar
Reply With Quote
  #3 (permalink)  
Old 05-14-07, 01:23
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,
to get RI definitions and all others (views, indexes, etc) execute command db2look (see documentation for detail).

Backup/restore can be done only within Unix platform (AIX, HP, Solaris) and not over different operating system like Unix/Linux (although they seem to be quite the same they are not).

When migrating from one platform to another I do this way:
1. execute db2look to get table, view, foreign keys, indexes, trigger, etc info
2. the output DDL file generated by db2look I split manually into two parts - first part where create tables etc are and into second where create foreign keys are - this is useful you can import tables without needing to have exact relation dependency
3. db2more export ... -> export data from source db
4. connect to target db and execute first part of db2look commands
5. db2move import -> import data into target db
6. execute second part of db2look commands

Hope this helps,
Grofaty
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