Unanswered: What is the best db2 utility for this task?
I need to set up a nightly job that will copy off all tables and indexes in a database except for 3 tables. That data will be saved off onto the same server on which the database is located on. It will also be needed to be restored back into the database on demand.
DB2 version in 9.7 fp7. OS is ReDHat.
Indexes are located in separate tablespaces.
Total amount of data that would be moved is 40-50 Gigs.
Would appreciate your suggestions re the best db2utility with which to accomplish this.
if it is to save the data : the only utility is export
this will export the data (no additional command for indexes)
always take a db2look together with export - so you have the data model for this data EXPORT - IBM DB2 9.7 for Linux, UNIX, and Windows
import/load are utilities for loading the data back..
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be
How big are the three tables you want to exclude ?
If they are, say, <100 GB , then you can take a BACKUP of the database every day.
When you want the data restored, at that point of time, you can EXPORT the data in the three tables , RESTORE the database from previous night backup and IMPORT the data into the three tables.
Using BACKUP serves two purposes - for this data restore and also can be used if you have other failures that may require database restore
If the three tables are large, but you can easily identify the changed rows since last backup (eg. you have a UPDATE_TIMESTAMP column), you can follow the same technique as above. When exporting you can EXPORT only the rows that have changed since your last backup.
If neither of these is suitable for you, then consider EXPORTing the data on a nightly basis and IMPORTing/LOADing them when you need the data restored.
Visit the new-look IDUG Website , register to gain access to the excellent content.