Recovering data using db2adutl
You can perform cross-node recovery using the db2adutl command, logarchopt1 and vendoropt database configuration parameters. This recovery is demonstrated in examples from a few different Tivoli® Storage Manager (TSM) environments.
bar
and is running the AIX® operating system. The user on this machine is roecken
. The
database on bar
is called zample
. Computer 2 is called
dps
. This computer is also running the AIX
operating system, and the user is regress9
.Example 1: TSM server manages passwords automatically (PASSWORDACCESS option set to GENERATE)
This cross-node
recovery example shows how to set up two computers so that you can
recover data from one computer to another when log archives and backups
are stored on a TSM server and where passwords are managed using the PASSWORDACCESS=GENERATE
option.
- To enable the database for log archiving for the
bar
computer to the TSM server, update the database configuration parameter logarchmeth1 for thezample
database using the following command:bar:/home/roecken> db2 update db cfg for zample using LOGARCHMETH1 tsm
The following information is returned:DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
- Disconnect all users and applications from the database using
the following command:
db2 force applications all
- Verify that there are no applications connected to the database
using the following command:
You should receive a message that says that no data was returned.db2 list applications
Note: In a partitioned database environment, you must perform this step on all database partitions. - Create a backup of the database on the TSM server using the following
command:
db2 backup db zample use tsm
Information similar to the following is returned:Backup successful. The timestamp for this backup imagge is : 20090216151025
Note: In a partitioned database environment, you must perform this step on all database partitions. The order in which you perform this step on the database partitions differs depending on whether you are performing an online backup or an offline backup. For more information, see Backing up data. - Connect to the
zample
database using the following command:db2 connect to zample
- Generate new transaction logs for the database by creating a table
and loading data into the TSM server using the following command:
where in this example, the table is calledbar:/home/roecken> db2 load from mr of del modified by noheader replace into employee copy yes use tsm
employee
, and the data is being loaded from a delimited ASCII file calledmr
. The COPY YES option is specified to make a copy of the data that is loaded, and the USE TSM option specifies that the copy of the data is stored on the TSM server.Note: You can specify the COPY YES option only if the database is enabled for roll-forward recovery; that is, the logarchmeth1 database configuration parameter must be set to USEREXIT, LOGRETAIN, DISK, or TSM.To indicate its progress, the load utility returns a series of messages:SQL3109N The utility is beginning to load data from file "/home/roecken/mr". SQL3500W The utility is beginning the "LOAD" phase at time "02/16/2009 15:12:13.392633". SQL3519W Begin Load Consistency Point. Input record count = "0". SQL3520W Load Consistency Point was successful. SQL3110N The utility has completed processing. "1" rows were read from the input file. SQL3519W Begin Load Consistency Point. Input record count = "1". SQL3520W Load Consistency Point was successful. SQL3515W The utility has finished the "LOAD" phase at time "02/16/2009 15:12:13.445718". Number of rows read = 1 Number of rows skipped = 0 Number of rows loaded = 1 Number of rows rejected = 0 Number of rows deleted = 0 Number of rows committed = 1
- After the data has been loaded into the table, confirm that there
is one backup image, one load copy image, and one log file on the
TSM server by running the following query on the
zample
database:bar:/home/roecken/sqllib/adsm> db2adutl query db zample
The following information is returned:Retrieving FULL DATABASE BACKUP information. 1 Time: 20090216151025 Oldest log: S0000000.LOG Log stream: 0 Sessions: 1 Retrieving INCREMENTAL DATABASE BACKUP information. No INCREMENTAL DATABASE BACKUP images found for ZAMPLE Retrieving DELTA DATABASE BACKUP information. No DELTA DATABASE BACKUP images found for ZAMPLE Retrieving TABLESPACE BACKUP information. No TABLESPACE BACKUP images found for ZAMPLE Retrieving INCREMENTAL TABLESPACE BACKUP information. No INCREMENTAL TABLESPACE BACKUP images found for ZAMPLE Retrieving DELTA TABLESPACE BACKUP information. No DELTA TABLESPACE BACKUP images found for ZAMPLE Retrieving LOAD COPY information. 1 Time: 20090216151213 Retrieving LOG ARCHIVE information. Log file: S0000000.LOG, Chain Num: 0, Log stream: 0, Taken at: 2009-02-16-15.10.38
- To enable cross-node recovery, you must give access to the objects
associated with the
bar
computer to another computer and account. In this example, give access to the computerdps
and the userregress9
using the following command:bar:/home/roecken/sqllib/adsm> db2adutl grant user regress9 on nodename dps for db zample
The following information is returned:Successfully added permissions for regress9 to access ZAMPLE on node dps.
Note: You can confirm the results of the db2adutl grant operation by issuing the following command to retrieve the current access list for the current node:bar:/home/roecken/sqllib/adsm> db2adutl queryaccess
The following information is returned:Node Username Database Name Type -------------------------------------------------------------- DPS regress9 ZAMPLE A -------------------------------------------------------------- Access Types: B - backup images L - logs A - both
- In this example, computer 2,
dps
, is not yet set up for cross-node recovery of thezample
database. Verify that there is no data associated with this user and computer on the TSM server using the following command:
The following information is returned:dps:/home/regress9/sqllib/adsm> db2adutl query db zample
--- Database directory is empty --- Warning: There are no file spaces created by Db2 on the ADSM server Warning: No Db2 backup images found in ADSM for any alias.
- Query the TSM server for a list of objects for the
zample
database associated with userroecken
and computerbar
using the following command:
The following information is returned:dps:/home/regress9/sqllib/adsm> db2adutl query db zample nodename bar owner roecken
This information matches the TSM information that was generated previously and confirms that you can restore this image onto the--- Database directory is empty --- Query for database ZAMPLE Retrieving FULL DATABASE BACKUP information. 1 Time: 20090216151025 Oldest log: S0000000.LOG Log stream: 0 Sessions: 1 Retrieving INCREMENTAL DATABASE BACKUP information. No INCREMENTAL DATABASE BACKUP images found for ZAMPLE Retrieving DELTA DATABASE BACKUP information. No DELTA DATABASE BACKUP images found for ZAMPLE Retrieving TABLESPACE BACKUP information. No TABLESPACE BACKUP images found for ZAMPLE Retrieving INCREMENTAL TABLESPACE BACKUP information. No INCREMENTAL TABLESPACE BACKUP images found for ZAMPLE Retrieving DELTA TABLESPACE BACKUP information. No DELTA TABLESPACE BACKUP images found for ZAMPLE Retrieving LOAD COPY information. 1 Time: 20090216151213 Retrieving LOG ARCHIVE information. Log file: S0000000.LOG, Chain Num: 0, Log stream: 0, Taken at: 2009-02-16-15.10.38
dps
computer. - Restore the
zample
database from the TSM server to thedps
computer using the following command:dps:/home/regress9> db2 restore db zample use tsm options "'-fromnode=bar -fromowner=roecken'" without prompting
The following information is returned:DB20000I The RESTORE DATABASE command completed successfully.
Note: If thezample
database already existed ondps
, the OPTIONS parameter would be omitted, and the database configuration parameter vendoropt would be used. This configuration parameter overrides the OPTIONS parameter for a backup or restore operation. - Perform a roll-forward operation to apply the transactions recorded
in the
zample
database log file when a new table was created and new data loaded. In this example, the following attempt for the roll-forward operation will fail because the roll-forward utility cannot find the log files because the user and computer information is not specified:dps:/home/regress9> db2 rollforward db zample to end of logs and stop
The command returns the following error:Force the roll-forward utility to look for log files associated with another computer using the proper logarchopt value. In this example, use the following command to set the logarchopt1 database configuration parameter and search for log files associated with userSQL4970N Roll-forward recovery on database "ZAMPLE" cannot reach the specified stop point (end-of-log or point-in-time) because of missing log file(s) on node(s) "0".
roecken
and computerbar
:dps:/home/regress9> db2 update db cfg for zample using logarchopt1 "'-fromnode=bar -fromowner=roecken'"
- Enable the roll-forward utility to use the backup and load copy
images by setting the vendoropt database configuration
parameter using the following command:
dps:/home/regress9> db2 update db cfg for zample using VENDOROPT "'-fromnode=bar -fromowner=roecken'"
- You can finish the cross-node data recovery by applying the transactions
recorded in the
zample
database log file using the following command:dps:/home/regress9> db2 rollforward db zample to end of logs and stop
The following information is returned:The databaseRollforward Status Input database alias = zample Number of members have returned status = 1 Member number Rollforward Next log to Log files processed Last committed transaction status be read ------------- ----------- ----------- ------------------------- ------------------------------ 0 not pending S0000000.LOG-S0000000.LOG 2009-05-06-15.28.11.000000 UTC DB20000I The ROLLFORWARD command completed successfully.
zample
on computerdps
under userregress9
has been recovered to the same point as the database on computerbar
under userroecken
.
Example 2: Passwords are user-managed (PASSWORDACCESS option set to PROMPT)
This cross-node recovery example shows how to set up two computers so that you can recover data from one computer to another when log archives and backups are stored on a TSM server and where passwords are managed by the users. In these environments, extra information is required, specifically the TSM nodename and password of the computer where the objects were created.
- Update the client dsm.sys file by adding
the following line because computer
bar
is the name of the source computerNODENAME bar
Note: On Windows operating systems, this file is called the dsm.opt file. When you update this file, you must reboot your system for the changes to take effect. - Query the TSM server for the list of objects associated with user
roecken
and computerbar
using the following command:dps:/home/regress9/sqllib/adsm> db2adutl query db zample nodename bar owner roecken password *******
The following information is returned:Query for database ZAMPLE Retrieving FULL DATABASE BACKUP information. 1 Time: 20090216151025 Oldest log: S0000000.LOG Log stream: 0 Sessions: 1 Retrieving INCREMENTAL DATABASE BACKUP information. No INCREMENTAL DATABASE BACKUP images found for ZAMPLE Retrieving DELTA DATABASE BACKUP information. No DELTA DATABASE BACKUP images found for ZAMPLE Retrieving TABLESPACE BACKUP information. No TABLESPACE BACKUP images found for ZAMPLE Retrieving INCREMENTAL TABLESPACE BACKUP information. No INCREMENTAL TABLESPACE BACKUP images found for ZAMPLE Retrieving DELTA TABLESPACE BACKUP information. No DELTA TABLESPACE BACKUP images found for ZAMPLE Retrieving LOAD COPY information. 1 Time: 20090216151213 Retrieving LOG ARCHIVE information. Log file: S0000000.LOG, Chain Num: 0, Log stream: 0, Taken at: 2009-02-16-15.10.38
- If the
zample
database does not exist on computerdps
, perform the following steps:- Create an empty
zample
database using the following command:dps:/home/regress9> db2 create db zample
- Update the database configuration parameter tsm_nodename using
the following command:
dps:/home/regress9> db2 update db cfg for zample using tsm_nodename bar
- Update the database configuration parameter tsm_password using
the following command:
dps:/home/regress9> db2 update db cfg for zample using tsm_password ********
- Create an empty
- Attempt to restore the
zample
database using the following command:dps:/home/regress9> db2 restore db zample use tsm options "'-fromnode=bar -fromowner=roecken'" without prompting
The restore operation completes successfully, but a warning is issued:SQL2540W Restore is successful, however a warning "2523" was encountered during Database Restore while processing in No Interrupt mode.
- Perform a roll-forward operation using the following command:
dps:/home/regress9> db2 rollforward db zample to end of logs and stop
In this example, because the restore operation replaced the database configuration file, the roll-forward utility cannot find the correct log files and the following error message is returned:SQL1268N Roll-forward recovery stopped due to error "-2112880618" while retrieving log file "S0000000.LOG" for database "ZAMPLE" on node "0".
Reset the following TSM database configuration values to the correct values:- Set the tsm_nodename configuration parameter
using the following command:
dps:/home/regress9> db2 update db cfg for zample using tsm_nodename bar
- Set the tsm_password database configuration
parameter using the following command:
dps:/home/regress9> db2 update db cfg for zample using tsm_password *******
- Set the logarchopt1 database configuration
parameter so that the roll-forward utility can find the correct log
files using the following command:
dps:/home/regress9> db2 update db cfg for zample using logarchopt1 "'-fromnode=bar -fromowner=roecken'"
- Set the vendoropt database configuration
parameter so that the load recovery file can also be used during the
roll-forward operation using the following command:
dps:/home/regress9> db2 update db cfg for zample using VENDOROPT "'-fromnode=bar -fromowner=roecken'"
- Set the tsm_nodename configuration parameter
using the following command:
- You can finish the cross-node recovery by performing the roll-forward
operation using the following command:
dps:/home/regress9> db2 rollforward db zample to end of logs and stop
The following information is returned:Rollforward Status Input database alias = zample Number of members have returned status = 1 Member number Rollforward Next log to Log files processed Last committed transaction status be read ------------- ----------- ----------- ------------------------- ------------------------------ 0 not pending S0000000.LOG-S0000000.LOG 2009-05-06-15.28.11.000000 UTC DB20000I The ROLLFORWARD command completed successfully.
zample
on computer dps
under
user regress9
has been recovered to the same point
as the database on computerbar
under user roecken
Example 3: TSM server is configured to use client proxy nodes
This cross-node recovery example shows how to
set up two computers as proxy nodes so that you can recover data from
one computer to another when log archives and backups are stored on
a TSM server and where passwords are managed using the PASSWORDACCESS=GENERATE
option.
In this example, the computers bar
and dps
are
registered under the proxy name of clusternode
. The
computers are already setup as proxy nodes.
- Register the computers
bar
anddps
on the TSM server as proxy nodes using the following commands:REGISTER NODE clusternode mypassword GRANT PROXYNODE TARGET=clusternode AGENT=bar,dps
- To enable the database for log archiving to the TSM server, update
the database configuration parameter logarchmeth1 for
the
zample
database using the following command:bar:/home/roecken> db2 update db cfg for zample using LOGARCHMETH1 tsm logarchopt1 "'-asnodename=clusternode'"
The following information is returned:DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
- Disconnect all users and applications from the database using
the following command:
db2 force applications all
- Verify that there are no applications connected to the database
using the following command:
You should receive a message that says that no data was returned.db2 list applications
Note: In a partitioned database environment, you must perform this step on all database partitions. - Create a backup of the database on the TSM server using the following
command:
db2 backup db zample use tsm options "'-asnodename=clusternode'"
Information similar to the following is returned:
Instead of specifying the -asnodename option on the BACKUP DATABASE command, you can update the vendoropt database configuration parameter instead.Backup successful. The timestamp for this backup image is : 20090216151025
Note: In a partitioned database environment, you must perform this step on all database partitions. The order in which you perform this step on the database partitions differs depending on whether you are performing an online backup or an offline backup. For more information, see Backing up data. - Connect to the
zample
database using the following command:db2 connect to zample
- Generate new transaction logs for the database by creating a table and loading data into the TSM
server using the following command:
where in this example, the table is calledbar:/home/roecken> db2 load from mr of del modified by noheader replace into employee copy yes use tsm
employee
, and the data is being loaded from a delimited ASCII file calledmr
. The COPY YES option is specified to make a copy of the data that is loaded, and the USE TSM option specifies that the copy of the data is stored on the TSM server.Note: You can specify the COPY YES option only if the database is enabled for roll-forward recovery; that is, the logarchmeth1 database configuration parameter must be set to USEREXIT, LOGRETAIN, DISK, or TSM.To indicate its progress, the load utility returns a series of messages:SQL3109N The utility is beginning to load data from file "/home/roecken/mr". SQL3500W The utility is beginning the "LOAD" phase at time "02/16/2009 15:12:13.392633". SQL3519W Begin Load Consistency Point. Input record count = "0". SQL3520W Load Consistency Point was successful. SQL3110N The utility has completed processing. "1" rows were read from the input file. SQL3519W Begin Load Consistency Point. Input record count = "1". SQL3520W Load Consistency Point was successful. SQL3515W The utility has finished the "LOAD" phase at time "02/16/2009 15:12:13.445718". Number of rows read = 1 Number of rows skipped = 0 Number of rows loaded = 1 Number of rows rejected = 0 Number of rows deleted = 0 Number of rows committed = 1
- After the data has been loaded into the table, confirm that there
is one backup image, one load copy image, and one log file on the
TSM server by running the following query on the
zample
database:bar:/home/roecken/sqllib/adsm> db2adutl query db zample options "-asnodename=clusternode"
The following information is returned:Retrieving FULL DATABASE BACKUP information. 1 Time: 20090216151025 Oldest log: S0000000.LOG Log stream: 0 Sessions: 1 Retrieving INCREMENTAL DATABASE BACKUP information. No INCREMENTAL DATABASE BACKUP images found for ZAMPLE Retrieving DELTA DATABASE BACKUP information. No DELTA DATABASE BACKUP images found for ZAMPLE Retrieving TABLESPACE BACKUP information. No TABLESPACE BACKUP images found for ZAMPLE Retrieving INCREMENTAL TABLESPACE BACKUP information. No INCREMENTAL TABLESPACE BACKUP images found for ZAMPLE Retrieving DELTA TABLESPACE BACKUP information. No DELTA TABLESPACE BACKUP images found for ZAMPLE Retrieving LOAD COPY information. 1 Time: 20090216151213 Retrieving LOG ARCHIVE information. Log file: S0000000.LOG, Chain Num: 0, Log stream: 0, Taken at: 2009-02-16-15.10.38
- In this example, computer 2,
dps
, is not yet set up for cross-node recovery of thezample
database. Verify that there is no data associated with this user and computer using the following command:
The following information is returned:dps:/home/regress9/sqllib/adsm> db2adutl query db zample
--- Database directory is empty --- Warning: There are no file spaces created by Db2 on the ADSM server Warning: No Db2 backup images found in ADSM for any alias.
- Query the TSM server for a list of objects for the
zample
database associated with the proxy nodeclusternode
using the following command:
The following information is returned:dps:/home/regress9/sqllib/adsm> db2adutl query db zample options="-asnodename=clusternode"
This information matches the TSM information that was generated previously and confirms that you can restore this image onto the--- Database directory is empty --- Query for database ZAMPLE Retrieving FULL DATABASE BACKUP information. 1 Time: 20090216151025 Oldest log: S0000000.LOG Log stream: 0 Sessions: 1 Retrieving INCREMENTAL DATABASE BACKUP information. No INCREMENTAL DATABASE BACKUP images found for ZAMPLE Retrieving DELTA DATABASE BACKUP information. No DELTA DATABASE BACKUP images found for ZAMPLE Retrieving TABLESPACE BACKUP information. No TABLESPACE BACKUP images found for ZAMPLE Retrieving INCREMENTAL TABLESPACE BACKUP information. No INCREMENTAL TABLESPACE BACKUP images found for ZAMPLE Retrieving DELTA TABLESPACE BACKUP information. No DELTA TABLESPACE BACKUP images found for ZAMPLE Retrieving LOAD COPY information. 1 Time: 20090216151213 Retrieving LOG ARCHIVE information. Log file: S0000000.LOG, Chain Num: 0, Log stream: 0, Taken at: 2009-02-16-15.10.38
dps
computer. - Restore the
zample
database from the TSM server to thedps
computer using the following command:dps:/home/regress9> db2 restore db zample use tsm options "'-asnodename=clusternode'" without prompting
The following information is returned:DB20000I The RESTORE DATABASE command completed successfully.
Note: If thezample
database already existed ondps
, the OPTIONS parameter would be omitted, and the database configuration parameter vendoropt would be used. This configuration parameter overrides the OPTIONS parameter for a backup or restore operation. - Perform a roll-forward operation to apply the transactions recorded
in the
zample
database log file when a new table was created and new data loaded. In this example, the following attempt for the roll-forward operation will fail because the roll-forward utility cannot find the log files because the user and computer information is not specified:dps:/home/regress9> db2 rollforward db zample to end of logs and stop
The command returns the following error:Force the roll-forward utility to look for log files on another computer using the proper logarchopt value. In this example, use the following command to set the logarchopt1 database configuration parameter and search for log files associated with userSQL4970N Roll-forward recovery on database "ZAMPLE" cannot reach the specified stop point (end-of-log or point-in-time) because of missing log file(s) on node(s) "0".
roecken
and computerbar
:dps:/home/regress9> db2 update db cfg for zample using logarchopt1 "'-asnodename=clusternode'"
- Enable the roll-forward utility to use the backup and load copy
images by setting the vendoropt database configuration
parameter using the following command:
dps:/home/regress9> db2 update db cfg for zample using VENDOROPT "'-asnodename=clusternode'"
- You can finish the cross-node data recovery by applying the transactions
recorded in the
zample
database log file using the following command:dps:/home/regress9> db2 rollforward db zample to end of logs and stop
The following information is returned:The databaseRollforward Status Input database alias = zample Number of members have returned status = 1 Member number Rollforward Next log to Log files processed Last committed transaction status be read ------------- ----------- ----------- ------------------------- ------------------------------ 0 not pending S0000000.LOG-S0000000.LOG 2009-05-06-15.28.11.000000 UTC DB20000I The ROLLFORWARD command completed successfully.
zample
on computerdps
under userregress9
has been recovered to the same point as the database on computerbar
under userroecken
.
Example 4: TSM server is configured to use client proxy nodes in a Db2 pureScale environment
This
example shows how to set up two members as proxy nodes so that you
can recover data from one member to the other when log archives and
backups are stored on a TSM server and where passwords are managed
using the PASSWORDACCESS=GENERATE
option.
In this example, the members member1
and member2
are
registered under the proxy name of clusternode
. In Db2®
pureScale® environments,
you can perform backup or data recovery operations from any member.
In this example, data will be recovered from member2
- Register the members
member1
andmember2
on the TSM server as proxy nodes using the following commands:REGISTER NODE clusternode mypassword GRANT PROXYNODE TARGET=clusternode AGENT=member1,member2
- To enable the database for log archiving to the TSM server, update
the database configuration parameter logarchmeth1 for
the
zample
database using the following command:member1:/home/roecken> db2 update db cfg for zample using LOGARCHMETH1 tsm logarchopt1 "'-asnodename=clusternode'"
Note: In Db2 pureScale environments, you can set the global logarchmeth1 database configuration parameters once from any member.The following information is returned:DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
- Disconnect all users and applications from the database using
the following command:
db2 force applications all
- Verify that there are no applications connected to the database
using the following command:
You should receive a message that says that no data was returned.db2 list applications global
- Create a backup of the database on the TSM server using the following
command:
db2 backup db zample use tsm options '-asnodename=clusternode'
Information similar to the following is returned:
Instead of specifying the -asnodename option on the BACKUP DATABASE command, you can update the vendoropt database configuration parameter instead.Backup successful. The timestamp for this backup image is : 20090216151025
Note: In Db2 pureScale environments, you can run this command from any member to back up all data for the database. - Connect to the
zample
database using the following command:db2 connect to zample
- Generate new transaction logs for the database by creating a table
and loading data into the TSM server using the following command:
where in this example, the table is calledmember1:/home/roecken> db2 load from mr of del modified by noheader replace into employee copy yes use tsmwhere
employee
, and the data is being loaded from a delimited ASCII file calledmr
. The COPY YES option is specified to make a copy of the data that is loaded, and the USE TSM option specifies that the copy of the data is stored on the TSM server.Note: You can specify the COPY YES option only if the database is enabled for roll-forward recovery; that is, the logarchmeth1 database configuration parameter must be set to USEREXIT, LOGRETAIN, DISK, or TSM.To indicate its progress, the load utility returns a series of messages:SQL3109N The utility is beginning to load data from file "/home/roecken/mr". SQL3500W The utility is beginning the "LOAD" phase at time "02/16/2009 15:12:13.392633". SQL3519W Begin Load Consistency Point. Input record count = "0". SQL3520W Load Consistency Point was successful. SQL3110N The utility has completed processing. "1" rows were read from the input file. SQL3519W Begin Load Consistency Point. Input record count = "1". SQL3520W Load Consistency Point was successful. SQL3515W The utility has finished the "LOAD" phase at time "02/16/2009 15:12:13.445718". Number of rows read = 1 Number of rows skipped = 0 Number of rows loaded = 1 Number of rows rejected = 0 Number of rows deleted = 0 Number of rows committed = 1
- After the data has been loaded into the table, confirm that there
is one backup image, one load copy image, and one log file on the
TSM server by running the following query on the
zample
database:member1:/home/roecken/sqllib/adsm> db2adutl query db zample options "-asnodename=clusternode"
The following information is returned:Retrieving FULL DATABASE BACKUP information. 1 Time: 20090216151025 Oldest log: S0000000.LOG Log stream: 0 Sessions: 1 Retrieving INCREMENTAL DATABASE BACKUP information. No INCREMENTAL DATABASE BACKUP images found for ZAMPLE Retrieving DELTA DATABASE BACKUP information. No DELTA DATABASE BACKUP images found for ZAMPLE Retrieving TABLESPACE BACKUP information. No TABLESPACE BACKUP images found for ZAMPLE Retrieving INCREMENTAL TABLESPACE BACKUP information. No INCREMENTAL TABLESPACE BACKUP images found for ZAMPLE Retrieving DELTA TABLESPACE BACKUP information. No DELTA TABLESPACE BACKUP images found for ZAMPLE Retrieving LOAD COPY information. 1 Time: 20090216151213 Retrieving LOG ARCHIVE information. Log file: S0000000.LOG, Chain Num: 1, Log stream: 1, Taken at: 2009-02-16-13.01.10 Log file: S0000000.LOG, Chain Num: 1, Log stream: 0, Taken at: 2009-02-16-13.01.11 Log file: S0000000.LOG, Chain Num: 1, Log stream: 2, Taken at: 2009-02-16-13.01.19 Log file: S0000001.LOG, Chain Num: 1, Log stream: 0, Taken at: 2009-02-16-13.02.49 Log file: S0000001.LOG, Chain Num: 1, Log stream: 1, Taken at: 2009-02-16-13.02.49 Log file: S0000001.LOG, Chain Num: 1, Log stream: 2, Taken at: 2009-02-16-13.02.49 Log file: S0000002.LOG, Chain Num: 1, Log stream: 1, Taken at: 2009-02-16-13.03.15 Log file: S0000002.LOG, Chain Num: 1, Log stream: 2, Taken at: 2009-02-16-13.03.15 Log file: S0000002.LOG, Chain Num: 1, Log stream: 0, Taken at: 2009-02-16-13.03.16
- Query the TSM server for a list of objects for the
zample
database associated with the proxy nodeclusternode
using the following command:
The following information is returned:member2:/home/regress9/sqllib/adsm> db2adutl query db zample options="-asnodename=clusternode"
This information matches the TSM information that was generated previously and confirms that you can restore this image onto the--- Database directory is empty --- Query for database ZAMPLE Retrieving FULL DATABASE BACKUP information. 1 Time: 20090216151025 Oldest log: S0000000.LOG Log stream: 0 Sessions: 1 Retrieving INCREMENTAL DATABASE BACKUP information. No INCREMENTAL DATABASE BACKUP images found for ZAMPLE Retrieving DELTA DATABASE BACKUP information. No DELTA DATABASE BACKUP images found for ZAMPLE Retrieving TABLESPACE BACKUP information. No TABLESPACE BACKUP images found for ZAMPLE Retrieving INCREMENTAL TABLESPACE BACKUP information. No INCREMENTAL TABLESPACE BACKUP images found for ZAMPLE Retrieving DELTA TABLESPACE BACKUP information. No DELTA TABLESPACE BACKUP images found for ZAMPLE Retrieving LOAD COPY information. 1 Time: 20090216151213 Retrieving LOG ARCHIVE information. Log file: S0000000.LOG, Chain Num: 1, Log stream: 1, Taken at: 2009-02-16-13.01.10 Log file: S0000000.LOG, Chain Num: 1, Log stream: 0, Taken at: 2009-02-16-13.01.11 Log file: S0000000.LOG, Chain Num: 1, Log stream: 2, Taken at: 2009-02-16-13.01.19 Log file: S0000001.LOG, Chain Num: 1, Log stream: 0, Taken at: 2009-02-16-13.02.49 Log file: S0000001.LOG, Chain Num: 1, Log stream: 1, Taken at: 2009-02-16-13.02.49 Log file: S0000001.LOG, Chain Num: 1, Log stream: 2, Taken at: 2009-02-16-13.02.49 Log file: S0000002.LOG, Chain Num: 1, Log stream: 1, Taken at: 2009-02-16-13.03.15 Log file: S0000002.LOG, Chain Num: 1, Log stream: 2, Taken at: 2009-02-16-13.03.15 Log file: S0000002.LOG, Chain Num: 1, Log stream: 0, Taken at: 2009-02-16-13.03.16
member2
member. - Restore the
zample
database on the TSM server from themember2
member using the following command:member2:/home/regress9> db2 restore db zample use tsm options '-asnodename=clusternode' without prompting
The following information is returned:DB20000I The RESTORE DATABASE command completed successfully.
Note: If thezample
database already existed onmember2
, the OPTIONS parameter would be omitted, and the database configuration parameter vendoropt would be used. This configuration parameter overrides the OPTIONS parameter for a backup or restore operation. - Enable the roll-forward utility to use the backup and load copy
images by setting the vendoropt database configuration
parameter using the following command:
member2:/home/regress9> db2 update db cfg for zample using VENDOROPT "'-asnodename=clusternode'"
Note: In Db2 pureScale environments, you can set the global vendoropt database configuration parameters once from any member. - You can finish the cross-member data recovery by applying the
transactions recorded in the
zample
database log file using the following command:member2:/home/regress9> db2 rollforward db zample to end of logs and stop
The following information is returned:The databaseRollforward Status Input database alias = zample Number of members have returned status = 3 Member number Rollforward Next log to Log files processed Last committed transaction status be read ------------- ----------- ----------- ------------------------- ------------------------------ 0 not pending S0000001.LOG-S0000012.LOG 2009-05-06-15.28.11.000000 UTC 1 not pending S0000001.LOG-S0000012.LOG 2009-05-06-15.28.11.000000 UTC 2 not pending S0000001.LOG-S0000012.LOG 2009-05-06-15.28.11.000000 UTC DB20000I The ROLLFORWARD command completed successfully.
zample
on membermember2
under userregress9
has been recovered to the same point as the database on membermember1
under userroecken
.