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 > problem import data in db2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-12-08, 07:05
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
Question problem import data in db2

Hi all,
i am using db2 v9.5 ESE on windows.
i am trying to move tables from one tablespace to another. To achieve this, i have followed these steps:

db2look on the database whose tables need to be migrated ->db2move export on the same database ->edit the exported file to use newer tablespace ->drop this database -> create another database with same name -> executed the sql file obtained by db2look command -> db2move import

But in the last step, i.e at the time of importing, for some of the tables the following error is thrown:
*** SQL3201N The specified table cannot be replaced because another table is dependent on it.

how can i find the dependency to come out of this error???

and is there any other simpler way to move tables to another tablespace???
Reply With Quote
  #2 (permalink)  
Old 12-12-08, 07:12
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Disable foreign keys before importing data. Alternatively, you can use "db2move load", then SET INTEGRITY.
Reply With Quote
  #3 (permalink)  
Old 12-12-08, 08:09
nittal nittal is offline
Registered User
 
Join Date: Jul 2008
Posts: 131
but how do i do that??? can you tell me what command exactly will help me achieve this n how do i set the constraints later after disabling them now???
Reply With Quote
  #4 (permalink)  
Old 12-12-08, 08:27
JAYANTA_DATTA JAYANTA_DATTA is offline
Registered User
 
Join Date: Oct 2004
Location: DELHI INDIA
Posts: 336
For loading, you just need to put LOAD in place of IMPORT.
db2move dbname LOAD [options]

For how to run "SET INTEGRITY", just search on the manual, it will get you some very good examples with explanation.
__________________

Jayanta Datta
DB2 UDB DBA
IBM India, Global Delivery
New Delhi
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