Note: | Before executing a procedure to reload tables, you must run the
SQLINIT EXEC specifying DBNAME(database-name) PROTOCOL(SQLDS)
to:
You must also link and access the minidisk where Data Restore is installed. |
The following is an example of an EXEC to RELOAD from a BACKUP or UNLOAD file.
Figure 197. Example EXEC to Execute the RELOAD Function
/**/
'TAPE REW'
'FILEDEF ARCHIV TAP1 SL 1 (RECFM VB BLOCK 32760'
'FILEDEF LMBRWRK DISK LMBRWRK DATA A (RECFM FB BLOCK 28672 LRECL 4096'
'FILEDEF SYSPRINT DISK RELOAD SYSPRINT A'
'FILEDEF SYSIN DISK RELOAD SYSIN A'
'XEDIT RELOAD SYSIN A'
'XTS91001'
The SYSIN file must contain the following statements:
Figure 198. Sample SYSIN to Execute the RELOAD Function
CONTROL DBNAME=dbname
RELOAD CREATOR=SQLDBA TNAME=CUSTOMERS FUNCT=PURGE
RELOAD CREATOR=SQLDBA TNAME=SUPPLIERS
FUNCT=NEW
NEWTNAME=NEWSUPPLIERS
DBSPACE=SAMPLE
The following is an example of an EXEC to RELOAD from the last BACKUP and generate the log recovery files.
Figure 199. Example EXEC to Reload Tables and Prepare Recovery from the Log
(1) ---> 'TAPE REW'
(2) ---> 'FILEDEF ARCHIV TAP1 SL 1 (RECFM VB BLOCK 32760'
(3) ---> 'FILEDEF LARCHIV TAP2 SL 1 (RECFM FB BLOCK 28672 LRECL 4096'
(4) ---> 'FILEDEF LMBRWRK DISK LMBRWRK DATA A (RECFM FB BLOCK 28672 LRECL 4096'
(5) ---> 'FILEDEF LMBRLG1 DISK LMBRLG1 DATA A (RECFM VB BLOCK 32760'
(5) ---> 'FILEDEF LMBRLG2 DISK LMBRLG2 DATA A (RECFM VB BLOCK 32760'
(5) ---> 'FILEDEF LMBRLG3 DISK LMBRLG3 DATA A (RECFM VB BLOCK 32760'
(6) ---> 'FILEDEF SYSPRINT DISK RELOAD SYSPRINT A'
(7) ---> 'FILEDEF SYSIN DISK RELOAD SYSIN A'
(8) ---> 'XEDIT RELOAD SYSIN A'
(9) ---> 'XTS91001'
The SYSIN file must contain the following statements:
Figure 200. Example SYSIN to Reload a Table and Prepare Recovery from the Log
CONTROL DBNAME=dbname
OPTIONS RECOVERY=YES
RELOAD CREATOR=SQLDBA TNAME=CUSTOMERS
FUNCT=REPLACE
The following is an example of an EXEC to RELOAD from a DB2 Server for VM archive.
Figure 201. Example Procedure to Execute the RELOAD Function from a DB2 Server for VM Archive
The following is an example of a report generated by a RELOAD from a DB2 Server for VSE & VM archive.
Figure 202. Example Report from a RELOAD from a DB2 Server for VSE & VM Archive
(1) ---> XTS9-143 OPTIONS ARCHTYPE=DB2
XTS9-143 CONTROL DBNAME=dbname READPW=RR
XTS9-143 RELOAD CREATOR=SQLDBA,TNAME=CUSTOMERS FUNCT=NEW
XTS9-143 DBSPACE=SAMPLE
XTS9-143 /*
XTS9-196 Do you want to continue the RELOAD process ?
XTS9-406 Enter 0(CANCEL) or 1(CONTINUE)
XTS9-403 Reply is 1
XTS9-100 Data Restore feature VERSION 7.1.0
(2) ---> XTS9-193 Mount first tape of database server archive
XTS9-406 Enter 0(CANCEL) or 1(CONTINUE)
XTS9-403 Reply is 1
(3) ---> XTS9-202 Processing database server archive (timestamp=1995-274-15-50)
XTS9-169 Processing tables containing long columns
XTS9-102 20 ROWS LOADED, PROCEDURE COMPLETED
XTS9-128 20 ROWS LOADED INTO (SQLDBA.CUSTOMERS)
XTS9-101 1 tables successfully processed
CONNECT SQLDBA ;
COMMIT WORK ;
XTS9-007 Processing successfully completed
Figure 203. Example of VM Procedure to Reload From a Backup File
/**/ 'TAPE REW' 'FILEDEF ARCHIV TAP1 SL 1 (RECFM VB BLOCK 32760' 'FILEDEF LMBRWRK DISK LMBRWRK DATA A (RECFM FB BLOCK 28672 LRECL 4096' 'FILEDEF SYSPRINT DISK RELOAD SYSPRINT A' 'FILEDEF SYSIN DISK RELOAD SYSIN A' 'XEDIT RELOAD SYSIN A' 'XTS91001' SYSIN file must contain the following statements : CONTROL DBNAME=dbname RELOAD CREATOR=SQLDBA TNAME=CUSTOMERS FUNCT=PURGE RELOAD CREATOR=SQLDBA TNAME=SUPPLIERS FUNCT=NEW NEWTNAME=NEWSUPPLIERS |
Figure 204. Example of VM Procedure to Reload From an Incremental Backup
/**/ 'TAPE REW' 'FILEDEF ARCHIV TAP1 SL 1 (RECFM VB BLOCK 32760' 'FILEDEF FULLARC TAP1 SL1 (RECFM VB BLOCK 32760' 'FILEDEF LMBRWRK DISK LMBRWRK DATA A (RECFM FB BLOCK 28672 LRECL 4096' 'FILEDEF SYSPRINT DISK RELOAD SYSPRINT A' 'FILEDEF SYSIN DISK RELOAD SYSIN A' 'XEDIT RELOAD SYSIN A' 'XTS91001' SYSIN file must contain the following statements : OPTIONS WRKSIZE=4096 DEVICE2=TAPE CONTROL DBNAME=dbname RELOAD CREATOR=SQLDBA TNAME=CUSTOMERS FUNCT=PURGE RELOAD CREATOR=SQLDBA TNAME=SUPPLIERS FUNCT=NEW NEWTNAME=NEWSUPPLIERS DBSPACE=SAMPLE |