A. Command Reference : copydb Command--Copy and Restore a Database : copydb Examples
 
Share this page                  
copydb Examples
Windows:
The following commands make a copy of olddb. In this example, replace the named directory (\mydir\backup) with your own:
cd \mydir\backup
copydb olddb
sql olddb<copy.out
The following example creates a new database newdb:
createdb newdb
sql newdb<copy.in
sysmod newdb
The following command runs copydb with parameters supplied in a file called flagfile:
copydb -param_file=flagfile
where flagfile can contain the following entries:
dbname
-order_ccm
-relpath
-no_loc
-all
This is equivalent to the command:
copydb dbname -order_ccm -relpath -no_loc -all
These commands copy mydb to tape. In this example, replace the named directory (/usr/mydir/backup) with your own:
cd /usr/mydir/backup
copydb mydb /usr/mydir/backup
sql mydb <copy.out
tar c
rm *
The following commands copy a tape to mydb. In this example, replace the named directory (/usr/mydir/backup) with your own:
cd /usr/mydir/backup
tar xvpf /dev/rmt0
sql mydb <copy.in
sysmod mydb