Thanks very much for your reply.
db2look seems to work fine. But, even though I don't get any errors, exporting the data creates a db2move.lst file with zero size. What am I doing wrong? Here is the output:
________________
C:\db2Exercise>db2move snmasg1 export -tc MED1 -tn Procedure,Anatomic,ProcAnat
***** DB2MOVE *****
Action: EXPORT
Start time: Tue Jan 06 11:01:14 2004
Exporting tables created by: MED1;
All table names beginning with: PROCEDURE; ANATOMIC; PROCANAT;
Connecting to database SNMASG1 ... successful! Server: DB2 Common Server V7.2.0
Disconnecting from database ... successful!
End time: Tue Jan 06 11:01:14 2004
C:\db2Exercise>dir
Volume in drive C has no label.
Volume Serial Number is 70D5-7C79
Directory of C:\db2Exercise
01/06/2004 10:48a <DIR> .
01/06/2004 10:48a <DIR> ..
01/06/2004 10:49a 3,993 paprocanat.ddl
01/06/2004 11:01a 0 db2move.lst
01/06/2004 11:01a 278 EXPORT.out
3 File(s) 4,271 bytes
_____________________
Quote:
Originally posted by Ravi
You can use db2look and db2move on the identified tables (your subset of tables) to replicate them on to another database with all the referential integrities.
For ex: if you have two tables T1 and T2 under the schema S1, then use the following command to generate the ddl,
db2look -d dbname1 -z S1 -e -t T1 T2 -o c:\T1_T2.ddl
then use the db2move utility to export the data of these two tables,
db2move dbname1 export -tc S1 -tn T1,T2
To replicate the structure on the second database,
db2 -tvf c:\T1_T2.ddl (to create the structure)
db2move dbname2 load (to load the data)
db2 set integrity for T2 immediate checked (to set the referential integrity on the table T2 which has the foreign key)
Hope this helps...
Ravi
|