Re: How to restore db cold dump to different machine

Re: How to restore db cold dump to different machine

 

  



Sue,
Is the data actually stored on the server or is it stored out on a SAN?
Can the SA do the mksysb just to bring up DB2? If not you'll need to
install DB2 on that box. Once that's done, you can still recover to the
other box if you want, but you'd have to do a Redirected Restore. The
backup you have will be looking to build the tablespaces in the same
containers with the same directories as the original Productoin database.
Therefore, you need to "redirect" the tablespace containers to a new path.

Your restore will look something like this:

db2 restore database dbname from /db2backup to /dbdir redirect without
rolling forward; <<<---- This will start the restore process and then
complete with an error message saying the containers need to be reset.

db2 "set tablespace containers for 0 using (file
'/filesystemname/dbname/tsname/dms_cat.dbf' 25800)"; <<<<---- You need to
do a set tablespace container for each tablespace in your database.
db2 "set tablespace containers for 1 using (path
'/filesystemname/dbname/tmpspace/dms_temp')";
db2 "set tablespace containers for 2 using (file
'/filesystemname/dbname/tsname/dms_data.dbf' 2234000)";
db2 "set tablespace containers for 3 using (file
'/filesystemname/dbname/tsname/dms_big_data.dbf' 640)";
db2 "set tablespace containers for 4 using (file
'/filesystemname/dbname/ixname/dms_indx.dbf' 1093600)";
db2 "set tablespace containers for 5 using (path
'/filesystemname/dbname/tsname/SYSTOOL')";
db2 "set tablespace containers for 6 using (path
'/filesystemname/dbname/tsname/QCTEMPTS')";

db2 restore database dbname continue; <<<--- This will complete the
restore

Mark Talens
Certified Consulting I/T Specialist
DB2 UDB for Linux, Unix and Windows
DB2 Tools for zSeries and Multiplatform


IBM Data Management Solutions
600 Anton Blvd. Costa Mesa, CA 92626
Voice: (714) 438-6149 Fax: 714-438-6199

IBM Only: T/L 925-6149, Mark Talens/Costa Mesa/[Email Address Removed]DB2 & UDB email list listserv db2-l LazyDBA home page