Chapter 8. Building a corporate backup and recovery strategy 313
Example 8-11 shows the DB2 command to load data into the non-production
system.
Example 8-11 Sample command line to load data into non-production database
-- Issue LOAD commands for all database partitions to be recovered
db2 "LOAD from GOSALESDW.CUSTOMER.file OF DEL INSERT INTO GOSALESDWCUSTOMER
PARTITIONED DB CONFIG MODE LOAD_ONLY_VERIFY_PART PART_FILE_LOCATION /work1/HPU
OUTPUT_DBPARTNUMS(1)"
db2 "LOAD from GOSALESDW.CUSTOMER.file OF DEL INSERT INTO GOSALESDWCUSTOMER
PARTITIONED DB CONFIG MODE LOAD_ONLY_VERIFY_PART PART_FILE_LOCATION /work2/HPU
OUTPUT_DBPARTNUMS(2)"
Example 8-12 shows the control file for loading data from the non-production
system to files in preparation for transfer to the production system. Only the
column to be recovered is specified in the select block.
Example 8-12 Sample control file to extract just the data needed for restore
GLOBAL CONNECT TO CSTINSIGHT;
UNLOAD TABLESPACE
PART(1:8)
SELECT customer_address_id,ca_zip FROM gosalesdw.customer WHERE ca_zip LIKE
'NA%4';
OUTFILE("/work1/HPU/customer_recovered_data.csv") FORMAT DEL
;
The data was applied to the production system by first being loaded into a
temporary table and then applied to the target table through an UPDATE
statement.
8.6 DB2 Recovery Expert as part of your recovery
strategy
24/7 data availability is crucial in an operational BI environment. A DBA needs
many tools to analyze, perform, and respond to recovery scenarios as efficiently
as possible and with minimum effect on the availability of data to the business.
DB2 Recovery Expert for Linux, UNIX, and Windows has a number of features
that help you analyze database transactions and assess the recovery position of
a database.
Similar to Optim Performance Manager, DB2 Recovery Expert uses an
embedded web application server to support a web interface. Configuration and

Get Solving Operational Business Intelligence with InfoSphere Warehouse Advanced Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.