How to use LoadExternalDB to load DB/table/data online?

~ 0 min
2017-01-12 03:23

You can use LoadExternalDB to load external DB into local DB directly via DSN.

If set unload external 'connection string', dmSQL will print "set external db 'odbc connection string' " in unload-file.s0 file.

1. unload db1

Connect to db1 sysadm;

set unload external 'DSN=db1;UID=SYSADM;PWD=;';

unload db to db1;

2.  db1.s0 look like

set external db 'DSN=db1;UID=SYSADM;PWD=;';

create table SYSADM.T1 (

C1  INTEGER default null ,

C2  INTEGER default null )

in DEFTABLESPACE  lock mode row  fillfactor 100 ;

load external db from 'select * from SYSADM.T1' into SYSADM.T1;

3. load db to destination database:

Connect to db2 sysadm;

Load db from db1;  //commit_num is 1000 by default

OR

Load db from db1 100; //commit_num is 100

Note: Please make sure db1 started while loading to db2, and set DB_USRFO=1 in db2 in advance if user FO is used.

Version: 5.4.1

Product: Normal/Bundle

Platform: Windows/Linux

Average rating 0 (0 Votes)

You cannot comment on this entry

Tags