|
|
/**/
’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’
Figure 197. Example EXEC to Execute the RELOAD Function
The 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
DBSPACE=SAMPLE
Figure 198. Sample SYSIN to Execute the RELOAD Function
The following is an example of an EXEC to RELOAD from the last BACKUP and
generate the log recovery files.
(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’
Figure 199. Example EXEC to Reload Tables and Prepare Recovery from the Log
Statement 1
Rewinds the tape.
Statement 2
Specifies the ddname ARCHIV for the BACKUP file.
Statement 3
Specifies the ddname LARCHIV for the log archive file.
Statement 4
Specifies the work file LMBRWRK which is used if the reloaded tables
contain LONG columns.
Statement 5
Specifies the work files LMBRLG1, LMBRLG2, and LMBRLG3 which are
used to extract all changes referenced in the log for the reloaded tables
when the RECOVERY=YES parameter is specified. They will be used to
execute forward log recovery.
Statement 6
Specifies the SYSPRINT which contains information about the process.
230
Data Restore Guide
Statement 7
Specifies the SYSIN file.
Statement 8
Allows you to edit the SYSIN file is make any required changes before
processing.
Statement 9
Calls the program to execute the function.
The SYSIN file must contain the following statements:
CONTROL DBNAME=dbname
OPTIONS RECOVERY=YES
RELOAD CREATOR=SQLDBA TNAME=CUSTOMERS
FUNCT=REPLACE
Figure 200. Example SYSIN to Reload a Table and Prepare Recovery from the Log
The following is an example of an EXEC to RELOAD from a DB2 Server for VM
archive.
/**/
(1) ---> ’FILEDEF LMBRLG1 DISK LMBRLG1 DATA A (RECFM VB BLOCK 32760’
’FILEDEF LMBRLG2 DISK LMBRLG2 DATA A (RECFM VB BLOCK 32760’
’FILEDEF LMBRLG3 DISK LMBRLG3 DATA A (RECFM VB BLOCK 32760’
(2) ---> ’FILEDEF ARIARCH TAP1 SL (RECFM FB BLOCK 28672 LRECL 4096’
(3) ---> ’FILEDEF ARCHIV DISK ARCHIV DATA G (RECFM VB BLOCK 32760’
(4) ---> ’FILEDEF LARCHIV DISK BASE2 LOGDSK1
A1(RECFM F BLOCK 4096’
(5) ---> ’FILEDEF LMBRWRK DISK LMBRWRK DATA H (RECFM FB BLOCK 28672 LRECL 4096’
(6) ---> ’FILEDEF SYS0001 DISK SYS0001 DATA H(RECFM F BLOCK 4096’
(7) ---> ’FILEDEF HEADER DISK HEADER DATA H(RECFM F BLOCK 4096’
(8) ---> ’FILEDEF DIRWORK DISK DIRWORK DATA H(RECFM F BLOCK 0512’
(9) ---> ’FILEDEF SYSIN DISK RELOAD SYSIN A’
’FILEDEF SYSPRINT DISK RELOAD SYSPRINT A’
’XEDIT RELOAD SYSIN A’
’XTS91001’
Figure 201. Example Procedure to Execute the RELOAD Function from a DB2 Server for VM
Archive
Statement 1
Specifies the work files LMBRLG1, LMBRLG2, LMBRLG3 which are used
for recovery processing.
Statement 2
Defines the virtual tape drive for DB2 Server for VM the archive file.
Statement 3
Defines a work file. This file will contain one DB2 Server for VM
reloadable table.
Statement 4
Defines the database log archive file.
Statement 5
Defines the work file to process the function.
Statement 6
Defines the file which contains all the pages for dbspace SYS0001.
Appendix B. Command Examples
231
Statement 7
Defines the file which contains all the header pages.
Statement 8
Defines the file which contains all the directory pages.
Statement 9
Defines the SYSIN file.
The following is an example of a report generated by 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 202. Example Report from a RELOAD from a DB2 Server for VSE & VM Archive
Statement 1
Specifies that the input file is a DB2 Server for VSE & VM archive.
Statement 2
Prompts the operator to remount the first archive tape.
Statement 3
Displays the timestamp of the DB2 Server for VSE & VM archive.
232
Data Restore Guide
/**/
’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 203. Example of VM Procedure to Reload From a Backup File
/**/
’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
Figure 204. Example of VM Procedure to Reload From an Incremental Backup
Appendix B. Command Examples
233
Using the RESTORE Function
In VSE
* $$ JOB JNM=DRFRESTR,CLASS=7,DISP=D
* $$ LST CLASS=A,DISP=D,PRI=3,DEST=(*,ELADM1)
* $$ PUN CLASS=A,DISP=D,PRI=3,DEST=(*,ELADM1)
// JOB DRFRESTR
RESTORE FULL DATABASE from tape
// LIBDEF *,SEARCH=(PRD2.DB2vrm,PRD2.RCV510)
// EXEC PROC=SQLVSE02
// EXEC PROC=XTS9DLBL
// TLBL
ARCHIV
// ASSGN
SYS006,181
// MTC
REW,SYS006
/* PAUSE for monitor
// EXEC XTS91001,SIZE=AUTO
CONTROL DBNAME=SQLVSE02
RESTORE
/*
/&
* $$ EOJ
Figure 205. JCL File for Data Restore RESTORE of a Full Database
* $$ JOB JNM=DRFRESTR,CLASS=7,DISP=D
* $$ LST CLASS=A,DISP=D,PRI=3,DEST=(*,ELADM1)
* $$ PUN CLASS=A,DISP=D,PRI=3,DEST=(*,ELADM1)
// JOB DRFRESTR
RESTORE STORAGE
POOL from BACKUP
tape
// LIBDEF *,SEARCH=(PRD2.DB2vrm,PRD2.RCV510)
// EXEC PROC=SQLVSE02
// EXEC PROC=XTS9DLBL
// TLBL
ARCHIV
// ASSGN
SYS006,181
// MTC
REW,SYS006
/* PAUSE for monitor
// EXEC XTS91001,SIZE=AUTO
CONTROL DBNAME=SQLVSE02
RESTORE POOL=8
/*
/&
* $$ EOJ
Figure 206. JCL File for Data Restore RESTORE of a Storage Pool
234
Data Restore Guide
// JOB DRFRESTR
DRF 4.1 RESTORE STORAGE POOL FROM BACKUP
// LIBDEF *,SEARCH=(PRD2.DB2vrm,PRD2.RCVvrm)
// EXEC PROC=SQLVSE02
// PROC CAT=’SQLPCAT’
// DLBL IJSYSUC,’SQLPCAT.USER.CATALOG’,,VSAM
* **********************************************************
* SQLVSE02: SQL/DS DATABASE IDENTIFICATION
* **********************************************************
// DLBL BDISK,’SQLVSE02.BDISK.SQLDIR80’,,VSAM,CAT=SQLPCAT
// DLBL LOGDSK1,’SQLVSE02.LOGDSK1.SQLLOG’,,VSAM,CAT=SQLPCAT
// DLBL DDSK1,’SQLVSE02.DDSK1.POOL1’,,VSAM,CAT=SQLPCAT
// DLBL DDSK2,’SQLVSE02.DDSK2.POOL2’,,VSAM,CAT=SQLPCAT
// DLBL DDSK3,’SQLVSE02.DDSK3.POOL3’,,VSAM,CAT=SQLPCAT
// DLBL DDSK4,’SQLVSE02.DDSK4.POOL4’,,VSAM,CAT=SQLPCAT
// DLBL DDSK5,’SQLVSE02.DDSK5.POOL5’,,VSAM,CAT=SQLPCAT
// DLBL DDSK6,’SQLVSE02.DDSK6.POOL6’,,VSAM,CAT=SQLPCAT
// DLBL DDSK7,’SQLVSE02.DDSK7.POOL7’,,VSAM,CAT=SQLPCAT
// DLBL DDSK8,’SQLVSE02.DDSK8.POOL8’,,VSAM,CAT=SQLPCAT
// DLBL DDSK9,’SQLVSE02.DDSK9.POOL9’,,VSAM,CAT=SQLPCAT
// DLBL DDSK10,’SQLVSE02.DDSK10.POOL10’,,VSAM,CAT=SQLPCAT
// DLBL DDSK11,’SQLVSE02.DDSK11.POOL11’,,VSAM,CAT=SQLPCAT
// DLBL DDSK12,’SQLVSE02.DDSK12.POOL12’,,VSAM,CAT=SQLPCAT
// DLBL DDSK13,’SQLVSE02.DDSK13.POOL13’,,VSAM,CAT=SQLPCAT
// DLBL DDSK14,’SQLVSE02.DDSK14.POOL14’,,VSAM,CAT=SQLPCAT
EOP SQLVSE02
// EXEC PROC=XTS9DLBL
// PROC CAT=’VSESPUC’
// DLBL IJSYSUC,’VSESP.USER.CATALOG’,,VSAM
* **********************************************************
* XTS9DLBL: DATARESTORE FEATURE WORKFILES
* **********************************************************
// DLBL LMBRWRK,,,VSAM,CAT=VSESPUC
// DLBL LMBRLG1,,,VSAM,CAT=VSESPUC
// DLBL LMBRLG2,,,VSAM,CAT=VSESPUC
// DLBL LMBRLG3,,,VSAM,CAT=VSESPUC
// DLBL SYS0001,,0,VSAM,RECSIZE=4096,RECORDS=(100,100),CAT=VSESPUC
// DLBL HEADER,,0,VSAM,RECSIZE=4096,RECORDS=(100,100),CAT=VSESPUC
// DLBL DIRWORK,,0,VSAM,CAT=VSESPUC
EOP XTS9DLBL
// TLBL
ARCHIV
// ASSGN
SYS006,181
// MTC
REW,SYS006
// EXEC XTS91001,SIZE=AUTO
XTS9-143 CONTROL DBNAME=SQLVSE02
XTS9-143 RESTORE POOL=8
XTS9-143 /*
XTS9-100 Data restore feature VERSION 7.1.0
XTS9-136 Processing SQLVSE02 archived on (02/19/97-15:53:07)
XTS9-182 Following files are needed for recovery
XTS9-195 UARCHIVE
currently mounted
XTS9-179 Current log
XTS9-406 Enter 0(CANCEL) or 1(CONTINUE)
XTS9-403 Reply is 1
XTS9-211 Beginning update of directory
XTS9-006 Processing DDSK8
XTS9-010
2452 blocks restored
XTS9-307 Start the database manager with parameter "STARTUP=U"
XTS9-007 Processing successfully completed
1S55I LAST RETURN CODE WAS 0000
EOJ DRFRESTR MAX.RETURN CODE=0000
Figure 207. Output File from Data Restore RESTORE of a Storage Pool
The following is an example of a RESTORE from an INCREMENTAL backup tape
in VSE. The JCL or EXEC used for RESTORE must be modified to add a FULLARC
label or FILEDEF is used for the incremental backup file.
Appendix B. Command Examples
235
The SYSIN file used for RESTORE must be modified to add the WRKSIZE
parameter on the OPTIONS statement. The value specified must be the same
backup time.
// JOB RESTORE
// LIBDEF *,SEARCH=(PRD2.DB2710,PRD2.RCVvrm)
// EXEC PROC=ARIS71DB
// TLBL ARCHIV,’ARCHIVE.SQL’,,,1
---> // TLBL FULLARC,’ARCHIVE.SQL’,,,,1
// ASSGN SYS006,180
// MTC REW,SYS006
// EXEC XTS91001,SIZE=AUTO
OPTIONS WRKSIZE=nnnn DEVICE2=TAPE
CONTROL DBNAME=dbname
RESTORE
/*
In VM
/* */
/* FILEDEF FOR INPUT FROM TAPE */
’FILEDEF ARCHIV TAP1 SL (RECFM VB BLOCK 32760’
’FILEDEF SYSIN
DISK RESPOOL SYSIN A’
’FILEDEF DIRWORK
DISK DIRWORK DATA A’
’FILEDEF SYSPRINT DISK RESPOOL SYSPRINT A’
’XTS91001’
exit rc
Figure 208. EXEC File for Data Restore RESTORE of a Storage Pool from Tape (RESPOOL
EXEC)
OPTIONS RECOVERY=NO CONFIRM=NO
CONTROL DBNAME=ELDB2A
RESTORE POOL=8
Figure 209. SYSIN File for Data Restore RESTORE of a Storage Pool from Tape (RESPOOL
SYSIN)
The following is an example of a RESTORE from an INCREMENTAL backup tape
in VM. The JCL or EXEC used for RESTORE must be modified to add a FULLARC
label or FILEDEF is used for the incremental backup file.
The SYSIN file used for RESTORE must be modified to add the WRKSIZE
parameter on the OPTIONS statement. The value specified must be the same
backup time.
/**/
’TAPE REW’
’FILEDEF ARCHIV TAP1 SL 1 (RECFM VB BLOCK 32760’
’FILEDEF SYSPRINT DISK RESTORE SYSPRINT A’
---> ’FILEDEF FULLARC TAP1 SL 1 (RECFM VB BLOCK 32760’
’FILEDEF SYSIN DISK RESTORE SYSIN A’
’XTS91001’
The SYSIN file should contain:
236
Data Restore Guide
OPTIONS WRKSIZE=nnnn DEVICE2=TAPE
CONTROL DBNAME=dbname
RESTORE
/*
The output from RESTORE will be modified as follows:
XTS9-143
OPTIONS WRKSIZE=4096 DEVICE2=TAPE
XTS9-143
CONTROL BASE=SQLDS
XTS9-143
RESTORE
XTS9-143
/*
XTS9-196
Do you want to continue the RESTORE process
?
XTS9-406
Enter 0(CANCEL) or 1(CONTINUE)
XTS9-403
Reply is 1
XTS9-100
Data Restore feature VERSION 7.1.0
XTS9-304
Restore from user archive invoked
XTS9-305
Current database will be destroyed
XTS9-406
Enter 0(CANCEL) or 1(CONTINUE)
XTS9-403
Reply is 1
XTS9-008
Restoring directory
XTS9-009
15661 directory blocks restored
XTS9-011
Restoring DDSK1
XTS9-010
7 blocks restored
XTS9-011
Restoring DDSK3
XTS9-010
1 blocks restored
XTS9-011
Restoring DDSK1
XTS9-010
199 blocks restored
XTS9-011
Restoring DDSK3
XTS9-010
66 blocks restored
XTS9-011
Restoring DDSK4
--->
XTS9-219
Mount SQLDS
archived on (11/25/97-06:07:40)
--->
XTS9-406
Enter 0(CANCEL) or 1(CONTINUE)
--->
XTS9-403
Reply is 1
XTS9-010
54 blocks restored
XTS9-011
Restoring DDSK1
XTS9-010
30 blocks restored
XTS9-011
Restoring DDSK3
XTS9-010
1 blocks restored
XTS9-011
Restoring DDSK4
XTS9-010
67 blocks restored
XTS9-307
Start the database manager with parameter "STARTUP=U"
XTS9-007
Processing successfully completed
Using the SELECT Function
Figure 210 on page 238 shows an example of JCL for using OUTPUT=DASD for a
sequential file.
Appendix B. Command Examples
237
(1)
---> // JOB SELECT
(2)
---> // LIBDEF *,SEARCH=(PRD2.DB2vrm,PRD2.RCVvrm)
(3)
---> // DLBL DATAUNL,’DATAUNLOAD.DATA’,0
(4)
---> // EXTENT SYS006,DOSRES,1,0,2715,300
(5)
---> // ASSGN SYS006,DISK,VOL=DOSRES,SHR
(6)
---> // EXEC PROC=ARIS73DB
(7)
---> // EXEC XTS91001,SIZE=AUTO
(8)
---> CONTROL DBAPW=XXXXXXXX
(9)
---> SELECT CREATOR=SQLDBA TNAME=CUSTOMERS
(10) --->
OUTPUT=DASD
(11) --->
COUNT=500
(12) ---> /*
Figure 210. JCL to Extract Data from a Sequential File (VSE)
Statement 1
Specifies the job name.
Statement 2
Specifies the IBM DATABASE 2 Server for VSE & VM library for the
SELECT function. You must specify the IBM DATABASE 2 Server for VSE
& VM library for the SELECT function.
Statement 3
Defines the output VSAM file.
Statement 4-5
Defines the output file to disk.
Statement 6
Starts an EXEC to access the database files.
Statement 7
Starts the program to process the function.
Statement 8
Specifies the password for SQLDBA.
Statement 9
Indicates the creator name as well as the table name.
Statement 10
Indicates the output source (DASD).
Statement 11
Indicates the number of rows to be selected.
Statement 12
Ends the SYSIN file.
Figure 211 on page 239 shows an example of JCL for OUTPUT=DASD to a VSAM
ESDS file.
238
Data Restore Guide
// JOB SELECT
(1) ---> // LIBDEF *,SEARCH=(PRD2.DB2vrm,PRD2.RCVvrm)
(2) ---> // DLBL DATAUNL,’DATAUNLOAD.DATA’,,VSAM,RECORDS=100,RECSIZE=4096
(3) ---> // EXEC PROC=ARIS73DB
(4) ---> // EXEC XTS91001,SIZE=AUTO
(5) ---> CONTROL DBAPW=XXXXXXXX
(6) ---> SELECT CREATOR=SQLDBA TNAME=CUSTOMERS
(7) ---> OUTPUT=DASD
(8) ---> COUNT=500
(9) ---> /*
Figure 211. JCL to Extract Data from a VSAM File (VSE)
Statement 1
Specifies the IBM DATABASE 2 Server for VSE & VM Library for the
SELECT function. You must specify the IBM DATABASE
2
Server for VSE
& VM library.
Statement 2
Defines the output VSAM file.
Statement 3
Uses an EXEC to access the database files.
Statement 4
Starts the program to process the function.
Statement 5
Specifies the password for SQLDBA.
Statement 6
Indicates the creator name and the table name.
Statement 7
Indicates the output device (DASD).
Statement 8
Indicates the number of rows to select.
Statement 9
Ends of SYSIN file.
Figure 212 shows an example of JCL for OUTPUT=TAPE.
// JOB SELECT
(1)
---> // LIBDEF *,SEARCH=(PRD2.DB2vrm,PRD2.RCVvrm)
(2)
---> // TLBL DATAUNL,’DATAUNLOAD.DATA’
(3)
---> // ASSGN SYS006,180
(4)
---> // MTC REW,SYS006
(5)
---> // EXEC PROC=ARIS73DB
(6)
---> // EXEC XTS91001,SIZE=AUTO
(7)
---> CONTROL DBAPW=XXXXXXXX
(8)
---> SELECT CREATOR=SQLDBA TNAME=CUSTOMERS
(9)
---> OUTPUT=TAPE
(10) --->
/*
Figure 212. JCL to Extract Data from a Tape (VSE)
Statement 1
Specifies the IBM DATABASE 2 Server for VSE & VM library for the
SELECT function. You must specify the IBM DATABASE 2 Server for VSE
& VM library.
Appendix B. Command Examples
239
Statement 2-4
Defines the output file to tape.
Statement 5
Uses an EXEC to access database files
Statement 6
Starts the program to process the function.
Statement 7
Specifies the password for SQLDBA.
Statement 8
Indicates the creator name and the Table name.
Statement 9
Indicates the output device (TAPE).
Statement 10
Ends the SYSIN file.
Figure 213 shows an example of an EXEC to extract 100 rows and output them to a
file on a tape.
/**/
(1) ---> ’FILEDEF DATAUNL TAP1 SL 1 (RECFM VB BLOCK 32760’
(2) ---> ’FILEDEF SYSPRINT DISK SELECT SYSPRINT A’
(3) ---> ’FILEDEF SYSIN DISK SELECT SYSIN A’
(4) ---> ’XEDIT SELECT SYSIN A’
(5) ---> ’XTS91001’
Figure 213. Procedure to Execute a SELECT Function
Statement 1
Defines the output file on the tape device.
Statement 2
Designates the SYSPRINT file to contain information about the process.
Statement 3
Calls the SYSIN file.
Statement 4
Initiates an edit of the SYSIN file to allow for any changes before
processing.
Statement 5
Starts the program to process the function.
The SYSIN file must contain the following statements:
(6) ---> CONTROL DBAPW=XXXXXXXX, DBNAME=dbname
(7) ---> SELECT CREATOR=SQLDBA TNAME=CUSTOMERS
(8) ---> COLUMNS=(01,02,03) OUTPUT=TAPE
(9) ---> COUNT=100
Figure 214. SYSIN File to Extract Data on Tape
Statement 6
Specifies the password for SQLDBA.
240
Data Restore Guide
Statement 7
Indicates the creator name and the table name.
Statement 8
Writes the result to tape.
Statement 9
Indicates the number of ROWS to select.
Using the SHOWDBS Function
The example below lists all dbspaces in the database with a summary.
XTS9-143 OPTIONS CONFIRM=NO
XTS9-143 CONTROL BASE=S35VMDB1
XTS9-143 SHOWDBS
XTS9-143 /*
XTS9-100 Data Restore feature VERSION 7.1.0
XTS9-313 DB2 for VSE & VM Version 7 processed
XTS9-601 DATE:17/06/96
TIME:15:02:28
--------------------------------------------------------------------------------
XTS9-014 Pool 1 Dbno
1 Name SYS0001
Pages
12.800 Header 8 Index 60
XTS9-019
Header
Data
Index
XTS9-020
------
---------
---------
XTS9-018 Maximum
8
5.112
7.680
XTS9-015 Reserved
1
87
54
XTS9-016 Used
1
86
54
XTS9-017 %Used
12,5
1,6
0,7
---------------------------------------------------------------------------------
XTS9-014 Pool 1 Dbno
2 Name SYS0002
Pages
2.048 Header 8 Index
0
XTS9-019
Header
Data
Index
XTS9-020
------
---------
---------
XTS9-018 Maximum
8
2.040
0
XTS9-015 Reserved
6
55
0
XTS9-016 Used
6
53
0
XTS9-017 %Used
75,0
2,5
0,0
---------------------------------------------------------------------------------
.. more pools in between
---------------------------------------------------------------------------------
XTS9-601 DATE:17/06/96
TIME:15:02:28
XTS9-022 Pool:001
XTS9-023 ========
XTS9-024
Dbno Dbspacename
Reserved
Used
Empty
XTS9-025
---- ------------------ --------- --------- ---------
XTS9-021
5 SAMPLE
20
12
8
XTS9-021
2 SYS0002
61
59
2
XTS9-021
4 ISQL
8
7
1
XTS9-021
1 SYS0001
142
141
1
XTS9-026
--------- --------- ---------
XTS9-027 Total pool:
1
231
219
12
XTS9-601 DATE:17/06/96
TIME:15:02:28
XTS9-007 Processing successfully completed
Figure 215. SYSPRINT File of Data Restore SHOWDBS
Using the SHOWPOOL Function
The example below lists all storage pools in the database.
Appendix B. Command Examples
241
XTS9-143
CONTROL DBNAME=SQLVSE02
XTS9-143
SHOWPOOL
XTS9-143
/*
XTS9-100
Data restore feature VERSION 7.1.0
XTS9-313
DB2 for VSE & VM Version 7 processed
XTS9-143
****************************************************************
XTS9-203
Pool=
1 First dbextent=
1
Pool is RECOVERABLE
XTS9-203
Pool=
2 First dbextent=
2
Pool is RECOVERABLE
XTS9-203
Pool=
3 First dbextent=
3
Pool is RECOVERABLE
XTS9-203
Pool=
4 First dbextent=
4
Pool is RECOVERABLE
XTS9-203
Pool=
5 First dbextent=
5
Pool is RECOVERABLE
XTS9-203
Pool=
6 First dbextent=
6
Pool is RECOVERABLE
XTS9-203
Pool=
7 First dbextent=
7
Pool is RECOVERABLE
XTS9-203
Pool=
8 First dbextent=
8
Pool is RECOVERABLE
XTS9-203
Pool=
9 First dbextent=
9
Pool is RECOVERABLE
XTS9-203
Pool=
10 First dbextent=
10
Pool is RECOVERABLE
XTS9-203
Pool=
11 First dbextent=
11
Pool is RECOVERABLE
XTS9-203
Pool=
12 First dbextent=
12
Pool is RECOVERABLE
XTS9-203
Pool=
13 First dbextent=
13
Pool is RECOVERABLE
XTS9-203
Pool=
14 First dbextent=
14
Pool is RECOVERABLE
XTS9-143
****************************************************************
XTS9-204
Dbextent=
1 Pool=
1 Next dbextent=NONE
XTS9-204
Dbextent=
2 Pool=
2 Next dbextent=NONE
XTS9-204
Dbextent=
3 Pool=
3 Next dbextent=NONE
XTS9-204
Dbextent=
4 Pool=
4 Next dbextent=NONE
XTS9-204
Dbextent=
5 Pool=
5 Next dbextent=NONE
XTS9-204
Dbextent=
6 Pool=
6 Next dbextent=NONE
XTS9-204
Dbextent=
7 Pool=
7 Next dbextent=NONE
XTS9-204
Dbextent=
8 Pool=
8 Next dbextent=NONE
XTS9-204
Dbextent=
9 Pool=
9 Next dbextent=NONE
XTS9-204
Dbextent=
10 Pool= 10 Next dbextent=NONE
XTS9-204
Dbextent=
11 Pool= 11 Next dbextent=NONE
XTS9-204
Dbextent=
12 Pool= 12 Next dbextent=NONE
XTS9-204
Dbextent=
13 Pool= 13 Next dbextent=NONE
XTS9-204
Dbextent=
14 Pool= 14 Next dbextent=NONE
XTS9-143
****************************************************************
XTS9-007
Processing successfully completed
Figure 216. SYSPRINT File of Data Restore SHOWPOOL
Using the TRANSLATE Function
Using Control Center
The steps which follow show how to TRANSLATE a database archive into a Data
Restore BACKUP format using Control Center.
To invoke a TRANSLATE, select the Database Utilities Menu (U), followed by DR.
Or, using fastpath, enter U.DR, from the Control Center Main Menu (see
Figure 217 on page 243).
242
Data Restore Guide
07.03.1997
Control Center Facility V5.1
11.57.18
*--------------------------------- Main Menu --------------------------------*
| Option ===> u.dr
CTRLID: ELDBMSRV
|
| Database => ELDB2B
NODE: BOEVMCT1
|
|
************************* DBA FUNCTIONS
************************
|
| O Operator Commands
C Change CTRLCTR userid
|
| S Database Status
P Database Parameters
|
| SI Database Startup (Immediate)
E SQLEND Database (Menu)
|
| SS Database Startup (Scheduled)
U Database Utilities
|
| A Database Archiving (Menu)
R Database Recovery (Menu)
|
| T Database TAPES (Menu)
M Database Monitoring
|
| V View Message Log
VJ View Database Job Schedule
|
|
************ CONTROL CENTER ADMINISTRATOR FUNCTIONS
***************
|
| N New Database Setup
AU CTRLCTR Authorization
|
| MS Master Schedule
G General CONTROL CENTER commands |
| CCC OO NN N TTTTT RRR
OO L
CCC EEEE NN N TTTTT EEEE RRR
|
| CC C O O NN N T R R O O L
CC C E
NN N T E
R R
|
| C
O O N N N T R R O O L
C
E
N N N T E
R R
|
| C
O O N NN T RRR O O L
C
EEE
N NN T EEE
RRR
|
| CC C
O O N N T R R O O L
CC C
E
N N T E
R R
|
| CCC OO N N T R R OO LLL
CCC EEEE N N T EEEE R R |
|
|
*---------------------------------------------------------------SQMMENU------*
PF:
1 Help
3 EXIT
5 What’s New
Figure 217. Invoking Data Restore
Before invoking TRANSLATE, you must first choose the archive series you wish to
TRANSLATE. You must also define your translate output (disk or tape) and control
files. This can be accomplished by editing the Database Tapes File.
To begin this step, type TM from the Data Restore menu as illustrated in
Figure 218.
07.03.1997
Control Center Facility
11.58.27
*------------------------------- Data Restore Menu -------------------------*
| Option ===> tm
CTRLID: ELDBMSRV |
|
Database ===> ELDB2B
NODE: BOEVMCT1 |
|
DRMACH: ELDB2DRF |
|
|
|
T TRANSLATE ARCHIVE
TRANSLATE archive into BACKUP format
|
|
U UNLOAD DBSPACES
UNLOAD one or more dbspaces
|
|
R RELOAD TABLES
RELOAD one or more tables
|
|
LL LISTLOG
LISTLOG selection panel
|
|
AL APPLYLOG
APPLYLOG selection panel
|
|
VJ VIEW JOB SCHEDULE
VIEW database job schedule
|
|
S VIEW DRMACH STATUS
VIEW Data Restore Machine status
|
|
SR RESET DRMACH STATUS
RESET Data Restore Machine status
|
|
D SHOWDBS
Generate report about all dbspaces
|
|
View Tapes Edit Tapes
View History
View Log
|
| BACKUP
BT
BM
BH
BL
|
| UNLOAD
UT
UM
UH
UL
|
| TRANSLATE
TT
TM
TH
TL
|
|
|
|
Enter OPTION, select DATABASE, press ENTER to process
|
|
|
*---------------------------------------------------------------SDRMAIN-----*
PF:
1 Help
3 End
Figure 218. Choosing Archive Series and Defining TRANSLATE Tapes
From the Database TAPES File, we have chosen to TRANSLATE the archive entry
(VOL100) from series 100. Next, we have added two entries for series 100 to
handle the TRANSLATE process. The first entry, TRANS, must be specified for the
TRANSLATE output file (either disk or tape). In our case, we have selected tape
(Volid TRL200). The second entry must be disk (TRANSDSK); the filename, filetype
Appendix B. Command Examples
243
and cuu must be provided (ELRES2 TRANSLAT 192). This file is where the Data
Restore control information for SYS0001, HEADER, and DIRWORK, will be found.
Note: The series number must be the same for each archive and its associated
output and control files used for the translation.
07.03.1997
Control Center Facility
11.59.45
*---------------------- Database TAPES File Update ----------------------*
| Command ===>
CTRLID: ELDBMSRV |
| Database => ELDB2B
NODE: BOEVMCT1 |
|
VOLID/
|
| SERIES TYPE
DATE TIME
STATUS FILENAME FILETYPE FM SCRCUU
|
|
100
ARCHIVE
97066
11:50:14 FILDEF VOL100
|
|
100
LOG
00000
00:00:00 UNUSED LOG100
|
|
100
LOG
00000
00:00:00 UNUSED LOG101
|
|
100
TRANS
00000
00:00:00 UNUSED TRL200
|
|
100
TRANSDSK 00000
00:00:00 UNUSED ELRES2
TRANSLAT
192
|
|
200
ARCHIVE
97066
10:54:47 FILLED VOL200
|
|
200
LOG
97066
10:51:13 FILLED LOG200
|
|
200
LOG
00000
00:00:00 UNUSED LOG201
|
|
|
|
|
|
|
|
|
| Make changes, place D in SERIES to DELETE , press PF10 to process
|
|
Page 1
of 1
|
|
|
*---------------------------------------------------------------SQMTP20-----*
PF:
1 Help
3 End
4 Add Tape
7 Bkwd
8 Fwd
10 Process updates
Figure 219. Database Tapes File
After updating the Database Tapes File, to start the TRANSLATE function select T
from the Data Restore Menu.
07.03.1997
Control Center Facility
12.01.15
*------------------------------- Data Restore Menu -------------------------*
| Option ===> t
CTRLID: ELDBMSRV |
|
Database ===> ELDB2B
NODE: BOEVMCT1 |
|
DRMACH: ELDB2DRF |
|
|
|
T TRANSLATE ARCHIVE
TRANSLATE archive into BACKUP format
|
|
U UNLOAD DBSPACES
UNLOAD one or more dbspaces
|
|
R RELOAD TABLES
RELOAD one or more tables
|
|
LL LISTLOG
LISTLOG selection panel
|
|
AL APPLYLOG
APPLYLOG selection panel
|
|
VJ VIEW JOB SCHEDULE
VIEW database job schedule
|
|
S VIEW DRMACH STATUS
VIEW Data Restore Machine status
|
|
SR RESET DRMACH STATUS
RESET Data Restore Machine status
|
|
D SHOWDBS
Generate report about all dbspaces
|
|
View Tapes Edit Tapes
View History
View Log
|
| BACKUP
BT
BM
BH
BL
|
| UNLOAD
UT
UM
UH
UL
|
| TRANSLATE
TT
TM
TH
TL
|
|
|
|
Enter OPTION, select DATABASE, press ENTER to process
|
|
|
*---------------------------------------------------------------SDRMAIN-----*
PF:
1 Help
3 End
Now the archive set to be translated needs to be specified. To view all the Archive
Sets, type ALL, or press enter to see the current Archive Sets from the menu
shown in Figure 220 on page 245.
244
Data Restore Guide
07.03.1997
Control Center Facility
12.02.46
*----------------------- Select Archive for Translation --------------------*
| Command ==>
CTRLID: ELDBMSRV |
|
Database ===> ELDB2B
NODE: BOEVMCT1 |
|
DRMACH ELDB2DRF |
|
|
|
Translate Set ===>
Archive Set for Translation
|
|
( Blank for LATEST or ALL for all available ) |
|
To TRANSLATE a database archive, you must view the Restore
|
|
Set Report and select the archive set for translation. The translate
|
|
set will consist of tapes or disks from a previous database archive.
|
|
You may choose ALL to display all for all available archive sets,
|
|
or you may leave the translate set BLANK to retrieve the LATEST
|
|
archive.
|
|
|
|
The selected archive will be displayed, and you will be asked to
|
|
enter the archive set number to begin the TRANSLATE.
|
|
|
|
Enter Translate Set, press ENTER to process, or
|
|
press PF3 to QUIT
|
|
|
*---------------------------------------------------------------SQMTR60-----*
PF:
1 Help
3 End (Quit)
Figure 220. Select Archive Set for Translation
From this menu (Figure 220), you will be placed in PEEK mode to review the
Restore Set Report. This report will show the date, timestamp, series number, and
the volid(s) belonging to each archive restore set.
RESTORE SET REPORT for Data Base ELDB2B
Date: 07.03.1997
Time: 15.36.43
RESTORE SET(s) generated using LOGMODE = L
NOTE: Examine the following restore set(s) and
remember the restore set that you wish to use.
Restore Set #1
From Data Base Archive Created 07.03.1997 15.03.11 ...
Archive
Archive
Date
Time
Type (DB or Log) Sequence Archived Archived Series Volid
_________________
________
__________ ________ ______ ______
Data Base Archive
Tape #1
07.03.1997 15.03.11
100
VOL100
ACTIVE Log
>>>>
Archived During The Recovery
<<<<
Restore Set #1 END
The Translate Set Number specified must match the appropriate Series in the
Database Tapes File. In our case, Translate Set 1 is associated with series 100, as
both the Restore Set Report and Database Tapes file reflect.
Appendix B. Command Examples
245
07.03.1997
Control Center Facility
12.04.33
*-------------------------- Translate Selection Set ------------------------*
| Command ==>
CTRLID: ELDBMSRV |
|
Database ===> ELDB2B
NODE: BOEVMCT1 |
|
DRMACH: ELDB2DRF |
|
|
| Translate Set
===> 1
Translate Set Number to Use
|
|
(Select from the list below)
|
| TAPEPWD
===> N
Specify a ’Y’ (YES) for pass-
|
|
word authority to be handled;
|
|
or ’N’ (NO) if READ authority
|
|
has already been provided.
|
|
------------------ Valid Translate Sets -------------------
|
|
1
(07.03.1997)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Enter TRANSLATE Set and press ENTER to process, or press F3 to QUIT
|
|
|
*---------------------------------------------------------------SQMTR70-----*
PF:
1 Help
3 End (Quit)
Figure 221. Translate Selection Set Menu
Before submitting the TRANSLATE job, there is one last chance to cancel or quit.
07.03.1997
Control Center Facility
12.06.13
*--------------------------- Translate Verification ------------------------*
| Command ==>
CTRLID: ELDBMSRV |
|
Database ===> ELDB2B
NODE: BOEVMCT1 |
|
|
|
This is the LAST CHANCE to CANCEL the TRANSLATE. If you want to
|
|
continue with the TRANSLATE, press ENTER, if you want to CANCEL the
|
|
TRANSLATE now, press PF3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Press ENTER to continue with the TRANSLATE request, or
|
|
press PF3 to QUIT
|
|
|
*---------------------------------------------------------------SQMAR80-----*
PF:
1 Help
3 End (Quit)
Figure 222. Translate Verification
After the TRANSLATE job has been submitted, its log will be available for review.
To browse this log, select TL from the Data Restore Menu, shown in Figure 218 on
page 243.
The following Translate Log, shows the job we submitted. The TRANSLATE file
created can now be used as input for either a RESTORE or RELOAD function with
Control Center.
246
Data Restore Guide
XTS9-143
* 03/07/1997
CONTROL CENTER
15:37:43
XTS9-143
TRANSLATE ARCHIVE
XTS9-143
* SYSIN FILE: ELDB2B TRANSYIN A
XTS9-143
* :DBMACH= ELDB2B DRMACH= ELDB2DRF CTLMACH= SQLMSTR
XTS9-143
* ARCHIVE: TAPE SERIES 100 FROM 07.03.1997 15.03.11
XTS9-143
* TRANS: TRANMEDIA
XTS9-143
* TRANSDSK: ELRES2 SYS001/HEADER/DIRWORK G 192 121
XTS9-143
XTS9-143
* SYSPRINT DISK
ELDB2B TRANLIST A1
XTS9-143
* SYSIN
DISK
ELDB2B TRANSYIN A1
XTS9-143
* ARCHIV
TAP5
SL
00001
VOLID TRL200
XTS9-143
* Z
DISK
DMSNAM LOADLIB
XTS9-143
* SYS0001
DISK
ELRES2
SYS0001
G1
XTS9-143
* HEADER
DISK
ELRES2
HEADER
G1
XTS9-143
* DIRWORK
DISK
ELRES2
DIRWORK
G1
XTS9-143
* ARIARCH
TAP1
SL
00001
VOLID VOL100
XTS9-143
XTS9-143
* DDNAME VOLID FSEQ VOLSEQ GENN GENV CRDTE EXDTE
SEC
FID
XTS9-143
* ARCHIV TRL200
XTS9-143
* ARIARCH VOL100
XTS9-143
* **********************************************
XTS9-143
OPTIONS CONFIRM=YES NOTATION=E LANG=S001
XTS9-143
MSGCLASS=1 MSGDEV=3 CASE=M
XTS9-143
CONTROL DBNAME=ELDB2B
XTS9-143
TRANSLATE
XTS9-143
/*
XTS9-196
Do you want to continue the TRANSLATE process ?
XTS9-406
Enter 0(CANCEL) or 1(CONTINUE)
XTS9-403
Reply is 1
XTS9-100
Data restore feature VERSION 7.1.0
XTS9-193
Mount first tape of database server archive
XTS9-406
Enter 0(CANCEL) or 1(CONTINUE)
XTS9-403
Reply is 1
XTS9-013
Table SQLDBA
.ACTIVITY
may be reloaded
XTS9-013
Table DATARFTR.CMD
may be reloaded
XTS9-013
Table SQLDBA
.DEPARTMENT
may be reloaded
XTS9-013
Table SQLDBA
.DRIVER_TABLE
may be reloaded
XTS9-013
Table SQLDBA
.ELOLANGUAGE
may be reloaded
XTS9-013
Table SQLDBA
.ELOOPTIONS
may be reloaded
XTS9-013
Table SQLDBA
.ELOTEXT1
may be reloaded
XTS9-013
Table SQLDBA
.ELOTEXT2
may be reloaded
XTS9-013
Table SQLDBA
.EMP_ACT
may be reloaded
XTS9-013
Table SQLDBA
.EMPLOYEE
may be reloaded
XTS9-013
Table SQLDBA
.INVENTORY
may be reloaded
XTS9-013
Table SQLDBA
.ITEM
may be reloaded
XTS9-013
Table SQLDBA
.ITEM1
may be reloaded
XTS9-013
Table SQLDBA
.IXLNGVAR
may be reloaded
XTS9-013
Table SQLDBA
.LMBRINS
may be reloaded
XTS9-013
Table SQLDBA
.OPERATIONS
may be reloaded
XTS9-013
Table SQLDBA
.PROJ_ACT
may be reloaded
XTS9-013
Table SQLDBA
.PROJECT
may be reloaded
XTS9-013
Table SQLDBA
.PROJECTS
may be reloaded
XTS9-013
Table SQLDBA
.QUOTATIONS
may be reloaded
XTS9-013
Table EXAMPLE .ROUTINE
may be reloaded
XTS9-013
Table SQLDBA
.ROUTINE
may be reloaded
XTS9-013
Table SQLDBA
.STORED QUERIES
may be reloaded
Figure 223. View Translate Log Using Control Center (Part 1 of 3)
Appendix B. Command Examples
247
XTS9-013 Table SQLDBA
.SUPPLIERS
may be reloaded
XTS9-013 Table DATARFTR.SYSCATALOG
may be reloaded
XTS9-013 Table DATARFTR.SYSCOLAUTH
may be reloaded
XTS9-013 Table DATARFTR.SYSCOLUMNS
may be reloaded
XTS9-013 Table DATARFTR.SYSINDEXES
may be reloaded
XTS9-013 Table DATARFTR.SYSKEYCOLS
may be reloaded
Figure 223. View Translate Log Using Control Center (Part 2 of 3)
XTS9-013 Table DATARFTR.SYSKEYS
may be reloaded
XTS9-013 Table SQLDBA
.SYSLANGUAGE
may be reloaded
XTS9-013 Table DATARFTR.SYSTABAUTH
may be reloaded
XTS9-013 Table SQLDBA
.SYSTEXT1
may be reloaded
XTS9-013 Table SQLDBA
.SYSTEXT2
may be reloaded
XTS9-013 Table DATARFTR.SYSUSAGE
may be reloaded
XTS9-013 Table DATARFTR.SYSVIEWS
may be reloaded
XTS9-007 Processing successfully completed
Figure 223. View Translate Log Using Control Center (Part 3 of 3)
For more information about the TRANSLATE operation, as well as the other Data
Restore functions using Control Center, refer to the appropriate chapters of the
DB2 for VM Control Center Operations Guide.
Refer to Figure 224 for a sample command syntax that was used to translate a DB2
archive to a Data Restore archive format.
* $$ JOB JNM=DRFTRANS,CLASS=0,DISP=D
* $$ LST CLASS=A,DISP=D,PRI=3,DEST=(*,VSESQADM)
* $$ PUN CLASS=A,DISP=D,PRI=3,DEST=(*,VSESQADM)
// JOB DRFTRANS
TRANSLATE SQL ARCHIVE TO DRF BACKUP
// LIBDEF *,SEARCH=(PRD2.DB2vrm,PRD2.RCVvrm.)
// TLBL
ARIARCH
// TLBL
ARCHIV
// ASSGN
SYS007,180
input tape : database manager archive
// ASSGN
SYS006,181
output tape
// MTC
REW,SYS007
// MTC
REW,SYS006
// DLBL DIRWORK,,,VSAM,CAT=VSESPUC
// DLBL SYS0001,,,VSAM,RECSIZE=4096,RECORDS=(100,100),CAT=VSESPUC
// DLBL HEADER,,,VSAM,RECSIZE=4096,RECORDS=(100,100),CAT=VSESPUC
// EXEC XTS91001,SIZE=AUTO
TRANSLATE
/*
/&
* $$ EOJ
Figure 224. JCL File for Data Restore TRANSLATE
The Data Restore TRANSLATE produces the work files, SYS0001, HEADER and
DIRWORK. If you plan to RELOAD from a translated archive file, you must keep a
copy of these work files in both VM and VSE. If you plan to RESTORE, these files
can be destroyed after the TRANSLATE. In this case it is recommended in VSE to
define these files with a retention period of zero days in order to avoid in the case
of a follow-on run, the messages 4228I and 4233I, indicating that the “file already
exists”.
248
Data Restore Guide
DB2
Archives
The following is an example of a function report for the TRANSLATE function on
a DB2 FULL archive.
XTS9-143 TRANSLATE
XTS9-143 /*
XTS9-196 Do you want to continue the TRANSLATE process ?
XTS9-406 Enter 0(CANCEL) or 1(CONTINUE)
XTS9-403 Reply is 1
XTS9-100 DATA RESTORE FEATURE VERSION 7.1.0
---> XTS9-229 The file is a DB2 FULL archive
XTS9-193 Mount first tape of database server archive
XTS9-406 Enter 0(CANCEL) or 1(CONTINUE)
XTS9-403 Reply is 1
XTS9-013 Table SQLDBA
.ACTIVITY
may be reloaded
XTS9-013 Table SQLDBA
.DEPARTMENT
may be reloaded
XTS9-007 Processing successfully completed
The following is an example of a function report for the TRANSLATE function on
a DB2 regular archive.
XTS9-143 TRANSLATE
XTS9-143 /*
XTS9-196 Do you want to continue the TRANSLATE process ?
XTS9-406 Enter 0(CANCEL) or 1(CONTINUE)
XTS9-403 Reply is 1
XTS9-100 DATA RESTORE FEATURE VERSION 7.1.0
---> XTS9-229 The file is a DB2 regular archive
XTS9-193 Mount first tape of database server archive
XTS9-406 Enter 0(CANCEL) or 1(CONTINUE)
XTS9-403 Reply is 1
XTS9-013 Table SQLDBA
.ACTIVITY
may be reloaded
XTS9-013 Table SQLDBA
.DEPARTMENT
may be reloaded
XTS9-007 Processing successfully completed
Using the UNLOAD Function
Figure 225 shows you the statement to unload a single dbspace.
(1) ---> UNLOAD DBSPACE=(dbspacename)
Figure 225. SYSIN File to Specify Unloading a Specific Dbspace
Statement 1
Indicates that only one dbspace (dbspacename) is to be unloaded.
Unloading Multiple Dbspaces
Figure 226 shows how to list up to 90 dbspaces for unloading.
(1) ---> UNLOAD DBSPACE =(dbspacename, dbspacename, ...)
Figure 226. SYSIN File to Unload More than One Dbspace
Statement 1
Indicates that a list of dbspaces will be unloaded.
Appendix B. Command Examples
249
Unloading All Dbspaces Except Those Listed
Figure 227 shows how to use the COND= parameter to unload all tables except for
the group listed. You can have as many as 90 tables in the list.
(1) ---> UNLOAD DBSPACE =( dbspacename, dbspacename,...),COND=EXCLUDE
Figure 227. SYSIN File to Specify Excluding Dbspaces from the Unload File
Statement 1
Lists the dbspaces that are excluded from the UNLOAD process. All other
dbspaces are unloaded.
If you do not specify the COND= parameter, it defaults to INCLUDE and unloads
all the tables in the list.
Unloading Multiple Dbspaces with the Server Stopped (VSE)
Figure 228 shows an example of the JCL (VSE) used to unload all dbspaces except
one with the application server stopped.
// JOB UNLOAD
(1) ---> // LIBDEF *,SEARCH=(PRD2.DB2vrm,PRD2.RCVvrm)
(2)
---> // EXEC PROC=ARIS73DB
(3)
---> // TLBL ARCHIV,’UNLOAD.DB2’
(4)
---> // ASSGN SYS006,180
(5)
---> // MTC REW,SYS006
(6)
---> // EXEC XTS91001,SIZE=AUTO, PARM=’DBNAME(dbname)’
(7)
---> OPTIONS DEVICE=TAPE,REWIND=YES/NO
(8)
---> CONTROL DBAPW=XXXXXXXX,DBNAME=dbname
(9)
---> UNLOAD DBSPACE=(SAMPLE) COND=EXCLUDE MODE=OFFLINE
(10) ---> /*
Figure 228. JCL to Unload All Dbspaces But One Offline
Statement 1
Specifies the IBM DATABASE 2 Server for VSE & VM library for the
UNLOAD function. You must specify the library.
Statement 2
Contains all DLBL defining directory, log and all dbextents.
Statement 3
Identifies the label on the tape.
Statement 4
Assigns a specific tape drive that will be used.
Statement 5
Rewinds the tape to its first file.
Statement 6
Executes the program XTS91001, pointing it to the specified dbname.
Statement 7
Sets the device to a tape volume.In VSE, for UNLOAD program you can
specify REWIND=YES or NO,(the default value is YES). If REWIND=NO is
specified at OPEN/CLOSE time the tape will not be positioned.
Statement 8
Uses the Control statement to specify the password for the SQLDBA and
identifies the dbname to be unloaded.
250
Data Restore Guide
Statement 9
Indicates the type of UNLOAD to perform. In this case, an UNLOAD of all
dbspaces except one will be performed.
Statement 10
Ends the SYSIN file.
Unloading All Dbspaces Except One With the Server Stopped
(VM)
Sample of EXEC (VM) to unload all dbspaces except one with the database server
stopped.
/**/
(1) ---> ’FILEDEF ARCHIV TAP1 SL 1 (RECFM VB BLOCK 32760’
(2) ---> ’FILEDEF SYSPRINT DISK UNLOAD SYSPRINT A’
(3) ---> ’FILEDEF SYSIN DISK UNLOAD SYSIN A’
(4) ---> ’XTS91001’
Figure 229. Procedure to Unload All Dbspace But One Offline
The SYSIN file must contain the following statements.
(5) ---> CONTROL DBNAME=dbname DBAPW=XXXXXXXX
(6) ---> UNLOAD DBSPACE=(SAMPLE) COND=EXCLUDE MODE=OFFLINE
Figure 230. SYSIN File to Unload All Dbspaces But One Offline
Statement 1
Identifies the output file.
Statement 2
Identifies the SYSPRINT file.
Statement 3
Identifies the SYSIN file.
Statement 4
Executes the program XTS91001.
Statement 5
Uses the Control statement to specify the password for the SQLDBA and
identifies the dbname to be unloaded.
Statement 6
Defines the type of UNLOAD to perform. In this case, an UNLOAD of all
dbspaces but one will be performed.
Make sure you can access the dbname SQLFDEF file on the database production
disk when you execute Data Restore.
Make sure you LINK and ACCESS the Data Restore minidisk to execute the
UNLOAD function.
Unloading Dbspaces With the Server Up
Figure 231 on page 252 shows an example of a SYSIN file used to unload dbspaces
with application server running.
Appendix B. Command Examples
251
(1) ---> UNLOAD DBSPACE =(...),COND=xxx,MODE=ONLINE
Figure 231. SYSIN File to Unload Dbspaces Online
Statement 1
Indicates that an UNLOAD will be performed while the application server
is running. If the application server is not running an error occurs.
Make sure that you do not update dbspaces that are being unloaded while
MODE=ONLINE is specified. This can result in a deadlock because of lock
contention.
Because the UNLOAD function does not use SQL commands to perform the
unload, the database manages the LOCK process when MODE=ONLINE is
specified by issuing a LOCK DBSPACE command.
You must make sure that an an unacquired public dbspace is available when
MODE=ONLINE is specified. The dbspace will be acquired (ACQUIRE PUBLIC
DBSPACE command is used) and dropped (DROP DBSPACE command is used),
which forces a checkpoint. The checkpoint ensures all updates to the dbspace are
flushed to DASD.
Data Restore will execute a LOCK DBSPACE command in EXCLUSIVE MODE to
avoid any modification on the dbspace being unloaded.
Unloading Dbspaces With the Database Server Down
Figure 232 shows an example of a SYSIN file used to unload dbspaces while the
application server is down.
(1) ---> UNLOAD DBSPACE =(...),COND=xxx,MODE=OFFLINE
Figure 232. SYSIN File to Unload Dbspaces Offline
Statement 1
Indicates that the application server must be stopped before performing
the unload. None of the considerations for MODE=ONLINE (Figure 231)
apply here.
If the application server is running, an error occurs.
Output of an UNLOAD Function
Figure 233 on page 253 shows an example of a function report.
252
Data Restore Guide
XTS9-143 CONTROL DBNAME=dbname
XTS9-143 UNLOAD DBSPACE=(*)
XTS9-143 /*
XTS9-100 Data Restore feature VERSION 7.1.0
XTS9-309 Processing DB2 Server for VSE & VM version 7
XTS9-160 External labeling of this unload is
XTS9-142 Base BASE1
date 17/10/95 time 13:07:58
XTS9-013 Table SQLDBA.COST_TABLE may be reloaded
XTS9-013 Table SQLDBA.DEPARTMENT may be reloaded
XTS9-013 Table SQLDBA.EMPLOYEE may be reloaded
XTS9-013 Table SQLDBA.EMPLOYEE_ACTIVITY may be reloaded
XTS9-013 Table SQLDBA.FOREIG may be reloaded
XTS9-013 Table SQLDBA.INVENTORY may be reloaded
XTS9-013 Table SQLDBA.OPERATIONS may be reloaded
XTS9-013 Table SQLDBA.PLAN_TABLE may be reloaded
XTS9-013 Table SQLDBA.ROUTINE may be reloaded
XTS9-145 Table SQLDBA.STORED QUERIES may be reloaded
XTS9-013 Table SQLDBA.STRUCTURE_TABLE may be reloaded
XTS9-013 Table SQLDBA.SUPPLIERS may be reloaded
XTS9-013 Table SQLDBA.SYSTEXT2 may be reloaded
XTS9-013 Table SQLDBA.SYSUSERLIST may be reloaded
XTS9-006 Processing DDSK1
XTS9-005
1055 blocks saved
XTS9-006 Processing DDSK2
XTS9-005
78 blocks saved
XTS9-006 Processing DDSK3
XTS9-005
2 blocks saved
XTS9-007 Processing successfully completed
Figure 233. Function Report for the UNLOAD Function
You can use the RELOAD function to reload the tables included in an UNLOAD
output file. If you do not specify an owner as part of the dbspacename, the default
value is PUBLIC. To unload private dbspaces, specify DBSPACE=
(owner.dbspacename).
You can include an OPTIONS statement to supply more specific information to
Data Restore (see “OPTIONS and CONTROL Statements” on page 167).
The list of reloadable tables and the number of blocks saved is displayed on the
console as shown in Figure 233.
Forward log recovery is not available when restoring from unloaded dbspaces.
Appendix B. Command Examples
253
254
Data Restore Guide
Appendix C. Problem Determination
Introduction
This appendix will assist you to analyze and solve problems that may occur when
using the Data Restore Feature.
The main focus of this appendix is to help the users understand and handle
software errors they might encounter. Additionally, some basic information on
hardware errors is also included.
This appendix helps you to:
v recognize a particular type of error
v collect and interpret the available information
v identify the actions that are necessary to remove the error.
Most error situations are indicated by a message. Therefore, messages must be read
carefully. Messages may be issued by VSE, VM or DB2, or by the Data Restore .
Before any action, determine the system which issued the message.
This appendix is organized in 3 parts:
v System errors: this part helps you to analyze VM or VSE messages.
v DB2 errors: this part helps you to analyze DB2 messages.
v Data Restore Feature error: this part helps you to analyze Data Restore Feature
messages.
Part
1. System Errors
For all messages issued by a system refer to the documentation for that system.
The messages are issued on SYSLOG or the system console and can be
complimented with a storage DUMP.
Most of the time, during the Data Restore Feature processing, system errors will
occur because hardware devices are not properly LINKed or Ready with an
appropriate file mounted.
This partial list of potential problems and suggested actions will help you to solve
problems before contacting your technical support.
VM Environment - Possible Problems:
1. Feature not linked to the directory and dbextents minidisks:
255
XTS9-100 Data Restore Feature Version 7.1.0
DMSXIN571I CREATING NEW FILE:
DMSXSU559W WARNING: FILE IS EMPTY
DMSXSU585E NO LINE(S) CHANGED
DMSXSU559W WARNING: FILE IS EMPTY
DMSXCT559E EMPTY FILE SQLDB2 XTS9FEDF A1 NOT WRITTEN
User response: Parameter DBNAME specified in SYSIN refers to the database
to process. Data Restore needs to LINK the directory and dbextent minidisks
to access the specified database. File dbname SQLFDEF defined on the
production minidisk of the database server must be accessed to process the
required LINK commands. Execute the required LINK and ACCESS
commands to the database server production minidisk and retry the process.
2. The Server is active and access required needs Read/Write access:
XTS9-100 Data Restore Feature Version 7.1.0
DMSXCG517I 6 OCCURRENCE(S) CHANGED ON 6 LINE(S)
HCPLNM105E SQLDB2 0200 NOT LINKED; R/W BY SQLDB2
ARIO644E ERROR OCCURRED DURING LINK COMMAND FOR CUU 200
THE RETURN CODE = 105.
XTS9-146 Error at EXEC XTS9FDEF DEF
User response: The function executed requires access in READ/WRITE mode,
but the server is still active and the disk cannot be linked. The user should
terminate the database server before restarting the procedure OR modify the
MODE= parameter with value ONLINE to specify that the server is still
active.
3. Tape device for output is not properly attached:
XTS9-309 Processing DB2 Server for VSE & VM version 7
DMSACC724I 200 REPLACES B (200)
DMSACC724I 200 REPLACES B (200)
DMSACC724I 201 REPLACES C (201)
DMSACC724I 201 REPLACES C (201)
XTS9-172 DB2 was ended with logmode L
DMSTLM110S ERROR READING TAP1(181)
XTS9-132 LMBRC031 file BASE2-ARCHIV OPEN ERROR R15=00
User response: Verify that the tape device is attach at address
181
and is
ready.
4. Tape is probably write protected:
XTS9-100 Data Restore Feature Version 7.1.0
DMSXCG517I 6 OCCURRENCE(S) CHANGED ON 6 LINE(S)
XTS9-309 Processing DB2 Server for VSE & VM version 7
DMSACC724I 200 REPLACES B (200)
DMSACC724I 200 REPLACES B (200)
DMSACC724I 201 REPLACES C (201)
DMSACC724I 201 REPLACES C (201)
XTS9-172 DB2 was ended with logmode L
DMSTLM111S ERROR WRITING TAP1(181)
XTS9-132 LMBRC031 file BASE2-ARCHIV OPEN ERROR R15=00
256
Data Restore Guide
User response: Verify that the tape mounted is not write protected and is
ready.
5. Disk access is not properly defined :
DMSFLD069I FILEMODE H NOT ACCESSED
XTS9-100 Data Restore Feature Version 7.1.0
DMSXCG517I 6 OCCURRENCE(S) CHANGED ON 6 LINE(S)
XTS9-309 Processing DB2 Server for VSE & VM version 7
User response: Access all disks, where the FILEDEFs are defined.
6. Tape mounted is not a standard label tape:
XTS9-100 Data Restore Feature Version 7.1.0
DMSXCG517I 6 OCCURRENCE(S) CHANGED ON 6 LINE(S)
XTS9-309 Processing DB2 Server for VSE & VM version 7
DMSACC724I 200 REPLACES B (200)
DMSACC724I 200 REPLACES B (200)
DMSACC724I 201 REPLACES C (201)
DMSACC724I 201 REPLACES C (201)
XTS9-172 DB2 was ended with logmode L
DMSTLM431E TAP1(181) VOL1 LABEL MISSING
DMSTLM446R ENTER 1(VOLID) (WRITE(VOLID)), 2(REJECT) OR 3(NEWTAPE)
1(111111)
User response The FILEDEF specifies a standard label tape is being used, but
the tape mounted has no label. Specify the valid LABEL as requested within
parenthesis.
7. Error in archiving to two tapes concurrently
XTS9-100 Data Restore Feature Version 7.1.0
DMSXCG517I 6 OCCURRENCE(S) CHANGED ON 6 LINE(S)
XTS9-309 Processing DB2 Server for VSE & VM version 7
DMSACC724I 200 REPLACES B (200)
DMSACC724I 200 REPLACES B (200)
DMSACC724I 201 REPLACES C (201)
DMSACC724I 201 REPLACES C (201)
XTS9-172 DB2 was ended with logmode L
DMSSOP036E OPEN ERROR CODE 4 ON ARCHIV2
XTS9-132 LMBRC031 file BASE2-ARCHIV2 OPEN error R15=00
User response The parameter ARCHIV2 is specified to process a DUAL
BACKUP but the associated FILEDEF ARCHIV2 was not defined.
Add the required FILEDEF and rerun the EXEC.
8. Error in attempting to archive to disk :
Appendix C. Problem Determination
257
XTS9-100 Data Restore Feature Version 7.1.0
DMSXCG517I 6 OCCURRENCE(S) CHANGED ON 6 LINE(S)
XTS9-309 Processing DB2 Server for VSE & VM version 7
DMSACC724I 200 REPLACES B (200)
DMSACC724I 200 REPLACES B (200)
DMSACC724I 201 REPLACES C (201)
DMSACC724I 201 REPLACES C (201)
XTS9-172 DB2 was ended with logmode L
XTS9-141 External labeling of this archive is
XTS9-142 Base BASE2
Date 26/09/95 Time 10:04:15
XTS9-001 Processing directory
DMSEERD107S DISK A(191) IS FULL
DMSSCT120S OUTPUT ERROR CODE 013 ON ARCHIV2
DMSABE148T SYSTEM ABEND 001 CALLED FROM 00E3A3FC REASON CODE 000000
DMSABE141T PROGRAM INTERRUPT X’00CC’ OCCURRED AT E3A3FC IN ROUTINE
CMS
User response: The parameter ARCHIV2 is specified to process a DUAL
BACKUP, the associated FILEDEF ARCHIV2 is defined on DISK but the DISK
is full. Define a larger disk or change device to tape.
9. Insufficient storage available to satisfy storage request:
XTS9-100 Data Restore Feature Version 7.1.0
DMSXCG517I 6 OCCURRENCE(S) CHANGED ON 6 LINE(S)
XTS9-309 Processing DB2 Server for VSE & VM version 7
DMSACC724I 200 REPLACES B (200)
DMSACC724I 200 REPLACES B (200)
DMSACC724I 201 REPLACES C (201)
DMSACC724I 201 REPLACES C (201)
XTS9-172 DB2 was ended with logmode L
XTS9-141 External labeling of this archive is
XTS9-142 Base BASE2
Date 26/09/95 Time 10:09:28
XTS9-001 Processing directory
XTS9-002
9571 directory blocks saved
DMSFR0159E INSUFFICIENT STORAGE AVAILABLE TO SATISFY FREE STORAGE REQUEST FROM
000363B8 XTS9-117 GETMAIN unsuccessful (R15=01)
READY(00016); T=1.51/3.07 10:09:48
User response: The CMS machine processing the function does not have
enough storage to operate successfully. Define an 8 Meg virtual storage
machine to process the function.
10. Error in executing the main Data Restore program:
backup
7 *-* ’XTS91001’
+++ RC(-3) +++
READY(-0003);; T=0.02/.02 10:33:45
User response: The CMS machine where Data Restore was installed is not
linked or the XTS9GMOD procedure has not been properly processed. Link
the disk, and retry the operation. If it still fails, repeat the installation process
and ensure that the Data Restore Feature is properly installed.
11. Feature not properly linked:
258
Data Restore Guide
XTS9-100 Data Restore Feature Version 7.1.0
DMSXCG517I 6 OCCURRENCE(S) CHANGED ON 6 LINE(S)
XTS9-309 Processing DB2 Server for VSE & VM version 7
XTS9-132 LMBRC033 file BASE2-BDISK READ error R15=08
User response: The disk where Data Restore was installed is likely linked with
the virtual address that was used for the database directory disk.
We recommend to link the minidisk where Data Restore is installed, with an
address which is not currently used by any of the application server’s
minidisks.
12. Feature not properly linked:
XTS9-100 Data Restore Feature Version 7.1.0
DMSXCG517I 6 OCCURRENCE(S) CHANGED ON 6 LINE(S)
XTS9-309 Processing DB2 Server for VSE & VM version 7
DMSACC724I 200 REPLACES B (200)
DMSACC724I 200 REPLACES B (200)
DMSACC724I 201 REPLACES C (201)
DMSACC724I 201 REPLACES C (201)
XTS9-172 DB2 was ended with logmode L
XTS9-141 External labeling of this archive is
XTS9-142 Base BASE2
Date 26/09/95 Time 10:09:28
XTS9-001 Processing directory
XTS9-002
9571 directory blocks saved
READY(00016); T=1.51/3.07 10:09:48
User response: The disk where The Data Restore Feature was installed is likely
linked with the virtual address that was used for a dbextent.
We recommend to link the minidisk where The Data Restore Feature is
installed, with an address which is not currently used by any of the
application server’s minidisks.
13. Failure on Restore function:
XTS9-100 Data Restore Feature Version 7.1.0
DMSXCG517I 6 OCCURRENCE(S) CHANGED ON 6 LINE(S)
XTS9-034 Restore from user archive invoked
XTS9-305 Current database will be destroyed
XTS9-406 Enter 0(CANCEL) or 1(CONTINUE)
1
DMSACC724I 200 REPLACES B (203)
XTS9-008 Restoring directory
DMSDK1307T FILE SYSTEM ERROR DETECTED BY DMSRCM AT ADDRESS 00E2AFBE (OFFSET
000023B6):
DMSDKD1307T WRTK REQUEST FAILED WITH CODE 8 WHILE PROCESSING FILE BASE2 BDISK B6
DMSABE2047I AUTODUMP DUMP STARTED; PLEASE WAIT
DMSABE1297I DUMP HAS BEEN TAKEN
HCPGIR450W CP ENTERED; DISABLED WAIT PSW 00020000 00F11316
User response: The directory size of the current database is different from the
saved database (smaller). Define an appropriate size minidisk and execute a
FORMAT and RESERVE for this minidisk before restarting the RESTORE
procedure.
Appendix C. Problem Determination
259
14. Incorrect password specified for minidisk access:
XTS9-100 Data Restore Feature Version 7.1.0
DMSXCG517I 4 OCCURRENCE(S) CHANGED ON 4 LINE(S)
ENTER WRITE PASSWORD:
HCPLNM114E SQL350 1200 NOT LINKED; MODE OR PASSWORD INCORRECT
ARI0644E An error occurred during LINK command for
CUU 1200 .
Return Code = 114
XTS9-146 Error at EXEC XTS9FDEF DEF
READY; T=0.20/0.36 11:45:25
User response: You were restoring a database but the minidisks are password
protected and you entered a wrong password. You can specify this password
on the CONTROL statement in SYSIN.
15. Invalid access to the server:
Do you want to continue the UNLOAD
process ?
XTS9-146 Enter 0(CANCEL) or 1(CONTINUE)
1
XTS9-100 Data Restore Feature Version 7.1.0
HCPLNM105E SQLDB2 0200 NOT LINKED; R/W BY SQLDB2
ARI0644E ERROR OCCURRED DURING LINK COMMAND FOR CUU 200
THE RETURN CODE = 105.
XTS9-146 Error at EXEC XTS9FDEF DEF
READY; T=0.53/0.90 11:57:27
User response: The UNLOAD function was executed with OFFLINE
parameter, but the server is still active. Specify ONLINE in SYSIN or
terminate the server.
16. Wrong format found on tape mounted:
Do you want to continue the TRANSLATE process ?
XTS9-146 Enter 0(CANCEL) or 1(CONTINUE)
1
XTS9-100 Data Restore Feature Version 7.1.0
DMSSCT120S INPUT ERROR CODE 008 ON ARIARCH
DMSABE148T SYSTEM ABEND 001 CALLED FROM 00E3A3FC REASON CODE 00000000
DMSABE141T PROGRAM INTERRUPT X’00CC’ OCCURRED AT E3A3FC IN ROUTINE
User response: The tape mounted for ARIARCH is not in the DB2 Server for
VSE & VM archive format. Mount a tape produced by DB2 Server for VSE &
VM standard ARCHIVE Version 7 Release 3 .
17. Incorrect National Language specification selected:
DMSLIO201W THE FOLLOWING NAMES ARE UNDEFINED:
LMBRS003
READY; T=0.22/0.37 17:01:46
User response: The user has chosen a national language by specifying LANG=
parameter. The associated TEXT was not found.
260
Data Restore Guide
Example: LANG=S003 is specified but LMBRS003 TEXT is not found. Correct
the LANG= parameter or contact IBM Support Center for assistance.
VSE Environment
1. Missing TLBL definition:
XTS9-100 Data Restore Feature Version 7.1.0
XTS9-309 Processing DB2 Server for VSE & VM version 7
XTS9-172 DB2 was ended with logmode Y
4183I INVALID LOGICAL UNIT ARCHIV SYS006
0V15I JOB LMBRBACK CANCELED. REQUEST FROM SYSTEM SERVICE ROUTINE
1S78I JOB TERMINATED DUE TO PROGRAM ABEND
User response: The TLBL for ARCHIV file is missing. Specify a TLBL/DLBL
with ddname ARCHIV.
2. A user archive is requested, but server is on-line:
XTS9-100 Data Restore Feature Version 7.1.0
XTS9-309 Processing DB2 Server for VSE & VM version 7
4228I FILE LOGDSK1
OPEN ERROR X’A8’(168)
1S78I JOB TERMINATED DUE TO RETURN CODE
EOJ LMBRBACK MAX.RETURN CODE=0016
User response: Stop the server to process the BACKUP function.
3. Tape device not properly attached:
// JOB LMBRBACK
0P31A
DVC NOT OP SYSCTL=4A1
CCSW= NOT AVAILABLE CCB=047360
User response: Verify that the tape device specified is attached properly.
4. Missing TLBL definition:
XTS9-100 Data Restore Feature Version 7.1.0
XTS9-309 Processing DB2 Server for VSE & VM version 7
XTS9-172 DB2 was ended with logmode Y
4881I NO LABEL INFORMATION ARCHIV
0V15I JOB LMBRBACK CANCELED. REQUEST FROM SYSTEM SERVICE ROUTINE
User response: TLBL for ARCHIV is missing. Add the required TLBL
specification to the JCL.
5. LIBDEF statement points to an incorrect library :
// EXEC XTS91001,SIZE=XTS91001,PARM=’DBNAME=dbname’
1U58I PROGRAM NOT FOUND.
1I70I JOB LMBRBACK CANCELED DUE TO CONTROL STATEMENT
Appendix C. Problem Determination
261
User response: The LIBDEF statement is omitted or the Data Restore library is
not specified. Correct the LIBDEF statement. If the problem persists, verify
that Data Restore was installed correctly, and if necessary repeat the
installation.
6. Incorrect specification on the Unload function:
XTS9-100 Data Restore Feature Version 7.1.0
XTS9-309 Processing DB2 Server for VSE & VM version 7
ARI0415D Database server &1 is not ready. Enter WAIT or CANCEL.
User response: An UNLOAD function is executed with MODE=ONLINE
parameter, but the server is not active. Restart the server and reply WAIT on
console.
7. Incorrect specification on the Unload function:
XTS9-100 Data Restore Feature Version 7.1.0
4228I FILE BDISK
OPEN ERROR X’A8’(168)
1S78I JOB TERMINATED DUE TO RETURN CODE
EOJ LMBRBACK MAX.RETURN CODE=0016
User response: An UNLOAD function is executed with MODE=OFFLINE
parameter, but the server is active. Shut down the server and restart the
process or specify MODE=ONLINE parameter.
8. Incorrect National Language support specification selected:
PROG=LMBRS003 NOT FOUND
1S55I LAST RETURN CODE WAS 0016
User response: LANG=S003 parameter is specified but the associated program
is not found. Correct the LANG parameter or contact your technical support.
9. Incorrect specification for the DB2 archive tape:
// JOB LMBRBACK
XTS9-100 Data Restore Feature Version 7.1.0
4183I INVALID LOGICAL UNIT ARIARCH SYS007
0V15I JOB LMBRBACK CANCELED. REQUEST FROM SYSTEM SERVICE ROUTINE
1S78I JOB TERMINATED DUE TO PROGRAM ABEND
EOJ LMBRBACK
User response: The TRANSLATE function is executing but the DB2 Server for
VSE & VM archive tape was not defined with ddname ARIARCH and was
not assigned to the SYS0007 address unit. Correct the JCL and retry the
procedure.
10. Incorrect JCL specification for the TRANSLATE function :
262
Data Restore Guide
// JOB LMBRBACK
XTS9-100 Data Restore Feature Version 7.1.0
4228I FILE DIRWORK
OPEN ERROR X’80’(128)
1S78I JOB TERMINATED DUE TO RETURN CODE
EOJ LMBRBACK MAX.RETURN CODE=0016
User response: The TRANSLATE function requires a DLBL for the DIRWORK,
SYS0001, and HEADER work files. Correct the JCL and restart the process.
Part
2. DB2
Errors
If a DB2 error occurs while running Data Restore, the messages are displayed on
SYSLOG or the system console and PRINTER. Furthermore, a dump of the DB2
command may also be produced for some errors.
Analyze the SQLCODE, SQLERRD1, and SQLERRD2 values to fix the problem.
Refer to the DB2 Server for VM Messages and Codes manuals.
Database manager errors are listed as in Figure 234.
XTS9-192 Processing SQL/VSE archived by DB2 on (26/09/95-15:20:51)
XTS9-129 DB2 error
(sqlcode=
-117,SQLERRD1=
-110,sqlerrd2=
XTS9-153 DB2 message()
XTS9-194 SQLERRP(ARIXOIN)
XTS9-162 SQL stmt:SQLDBA
.LMBREDYN.000
READY(00016); T=2.34/3.72 16:30:26
Figure 234. Data Restore with DB2 Error.
Both VM and VSE Environments
This partial list of potential problems and suggested actions will help you to solve
problems before contacting your technical support.
1. SQLCODE = 100
Possible solution: During the APPLYLOG function, a modification referenced in
the LOG cannot be re-executed because a row has been modified between
RELOAD and APPLYLOG functions. The modifications are extracted from the
LOG files during the RELOAD process. The reloaded tables must not be
modified before the APPLYLOG function is processed.
2. SQLCODE = - 117
Possible solution: RELOAD PURGE was requested and the table to reload has
been modified since the UNLOAD or BACKUP and now the table contains
more columns than when it was saved. Execute a RELOAD with REPLACE
parameter to reload the table with the correct number of columns.
3. SQLCODE = - 560
Possible solution: The user SQLDBA has no password specified or the value
specified in SYSIN file is incorrect. Correct the password and retry the process.
4. SQLCODE = -601
Possible solution: The user specified RELOAD NEW but the table to create
already exists in the database. Drop the table before re-executing the process or
specify RELOAD REPLACE.
5. SQLCODE = -608
Appendix C. Problem Determination
263
Possible solution: RELOAD function is specified with DBSPACE parameter to
recreate the table in a specific dbspace, but the specified dbspace is not yet
acquired. Execute an ACQUIRE DBSPACE command before re-executing the
process.
6. SQLCODE = -670
Possible solution: The reloaded table is involved with referential integrity and
is a reference to other tables. The dependent tables contains keys that are not
referenced in the reloaded table. For such tables, all tables must be reloaded to
recreate a situation where referential integrity is consistent.
7. SQLCODE = -704
Possible solution: An UNLOAD ONLINE function will force a checkpoint by
acquiring a free dbspace. No such dbspace is available. Either an ADD
DBSPACE process must be executed or an unused public dbspace should be
dropped.
8. SQLCODE = -814
Possible solution: You are unloading a system dbspace (SYS000n) with the
ONLINE parameter. You cannot unload System Catalog Tables. Modify the list
of dbspaces to unload.
9. SQLCODE = -940
Possible solution: The ONLINE parameter was specified but the server is not
started. Start the database server and re-execute the process.
Part
3. Data Restore Feature Errors
The Data Restore Feature messages are preceded by XTS9. This part is ordered by
message number.
1.
XTS9-121
Possible solution: You have specified a national language with the LANG
parameter on the OPTIONS statement (refer to “OPTIONS and CONTROL
Statements” on page 167 for more information). For example, when you
specify a language SSSS : program LMBRSSSS must be found. Correct the
LANG parameter.
2.
XTS9-122
Possible solutions:
If the program specified in the message is LMBRP008 : The tape was not
created on a DB2 Version 7 Release 3 database. The TRANSLATE function
cannot proceed. Mount the correct tape.
If the program specified in the message is LMBRP043 : To save your database,
virtual storage is required and the work size specified is too small for your
database. Increase the value of the WRKSIZE parameter and retry the process.
If the program specified in the message is LMBRP061 : You are reloading a
table with full environment recreation, and the table is contains many views.
Increase the NBVIEWS parameter to specify the maximum number of views to
recreate and retry the process.
3.
XTS9-126
Possible solution: You are trying to RELOAD an unknown table. Verify the
input file content using the DESCRIBE function or check the table name and
creator in SYSIN.
4.
XTS9-132
264
Data Restore Guide
Possible solution: An open error occurred. Verify the specified file is accessible
and the tape drive ready and that a FILEDEF or DLBL/TLBL is defined. Also
analyze the system message on the operator console.
5.
XTS9-135
Possible solution: You are trying to execute the FORMAT function in a VM
system but this function is only available for in VSE. To format a DBEXTENT
in VM, you can use CMS FORMAT and RESERVE commands.
6.
XTS9-137
Possible solution: You are trying to restore a database but the input file
defined with ddname ARCHIV has not been generated by a BACKUP
function. If the tape was generated by a standard DB2 archive, use the
TRANSLATE function to convert the archive file into a Data Restore format.
7.
XTS9-145
Possible solution: Tables containing LONGVARCHAR columns cannot be
processed by the SELECT function.
8.
XTS9-152
Possible solution: You have selected a table using the SELECT function. The
number of resulting rows is not the same as the one expected. The SELECT
function processes pages on disk and if a checkpoint has not been issued,
pages on the disk may contain old information. You can ACQUIRE and DROP
a dbspace to force a checkpoint and retry your request.
9.
XTS9-154
Possible solution: An SQLDBA userid must be defined in the database with a
password and have DBA authority. Verify that such a user is defined. To
define an SQLDBA userid process the following command while connected
with DBA authority: ’GRANT DBA TO SQLDBA IDENTIFIED BY xxxxxxxx’
and retry your request.
10.
XTS9-157
Possible solution: The TRANSLATE function is processed to convert a DB2
archive file that was not created in Version 7 Release 3. Data Restore can only
process DB2 Version 7 Release 3 archive files.
11.
XTS9-161
Possible solution: You are processing a dbspace with UNLOAD function but
the dbspace specified does not exist. Verify the DBNAME parameter is correct.
Verify the syntax for the DBSPACE parameter.
12.
XTS9-166
Possible solution: You are processing a RESTORE function, but the mounted
tape was not produced by a BACKUP or TRANSLATE function. Mount the
correct tape before restarting the RESTORE process.
13.
XTS9-170
Possible solution: You are reloading a table and using the RESTARTCOUNT
parameter to skip a certain number of rows, but the table contains LONG
columns. RESTARTCOUNT cannot be used with tables containing LONG
columns. You must restart the RELOAD function without specifying
RESTARTCOUNT parameter.
14.
XTS9-173
Possible solution: You are processing a BACKUP function for a database. The
database server must be terminated using the SQLEND UARCHIVE operator
command. The server was not stopped using this command. Restart the server
to specify that command and retry the BACKUP process.
15.
XTS9-190 & XTS9-191
Appendix C. Problem Determination
265
Possible solution: You are processing a RELOAD function with forward log
recovery. The database archive has been found in the log history area, but an
action is found that cannot guarantee security for the recovery process (such
as COLDLOG or ARCHIVE when running in LOGMODE A). Re-execute the
process without RECOVERY=YES parameter.
Note: You will not be able to recover using updates in the log in this
situation.
16.
XTS9-309
Possible solution: The DB2 version displayed is not correct during installation
of Data Restore Feature:
v VM - a 195 minidisk of specified version in message was linked when
XTS9GMOD procedure was processed.
v VSE- the specified library in XTS9PRDI job control was not the DB2 Version
7 Release 3 library. Re-execute this step in the installation documentation.
17.
XTS9-311
Possible solution: You are restoring from a file that was produced on a
different database. Confirm to continue the process or verify that the mounted
tape is the correct one.
18.
RC=16
Possible solution: If no other messages are displayed, verify that the files
defined in the process (such as ARIARCH or ARCHIV) are assigned to the
correct file. Retry the process after verifying the FILEDEFs (VM) or
DLBLs/TLBLs (VSE).
Recover from a DB2 Server for VM Error during Full
Environment Recreation
When you specify REPLACE for the FUNCT parameter during the RELOAD
function, all SQL commands necessary to recreate the environment are executed. If
a DB2 Server for VM error occurs during this process, the commands for
environment recreation are inserted into a DB2 Server for VM table named
DATARFTR.CMD and information about the SQLCODE and the program in error
are displayed on SYSPRINT for VM or on the PRINTER for VSE.
When all the rows are not reloaded:
v If the COMMITCOUNT parameter was specified on the OPTIONS statement,
you can use the RESTARTCOUNT parameter to skip the reloaded rows (for
more information refer to “OPTIONS and CONTROL Statements” on page 167)
and continue, or you can correct the problem and restart the process.
Note: If the RESTARTCOUNT parameter is specified, log recovery cannot be done.
When all the rows are reloaded:
v The commands for environment recreation are in the table DATARFTR.CMD.
v SQLCODE information and a dump of the unsuccessful command are displayed
on the PRINTER. You can verify which commands were completed successfully
and delete these commands from the DATARFTR.CMD table.
v Run the program XTS91002 to execute the commands in the DATARFTR.CMD
table. You must specify the password for SQLDBA as a parameter.
The following is an example of JCL to run the program XTS91002 in VSE:
266
Data Restore Guide
// JCL RECOVER
// LIBDEF *, SEARCH=(PRD2.DB2vrm,PRD2.RCVvrm)
// EXEC XTS91002,SIZE=AUTO,PARM=’DBAPW=XXXXXXXX,DBNAME(dbname)’
/ *
Figure 235. Example JCL to Recover From an Environment Recreation Error
The following is an example of an EXEC to run the program XTS91002 in VM:
/**/
’FILEDEF SYSPRINT DISK XTS91002
SYSPRINT A’
’XTS91002 DBAPW=XXXXXXXX’
Figure 236. Example EXEC to Recover From an Environment Recreation Error
The DATARFTR.CMD table has the following columns:
v SEQ, defined as SMALLINT, which contains the sequence number of each SQL
statement required to recreate the environment.
v SUBSEQ, defined as SMALLINT, which contains the sequence number of each
part of each SQL statement (statements longer than 60 characters have to be
divided, because of the next column).
v CMD, defined as VARCHAR(60), which contains the SQL statements, split into
60 character lengths.
To select rows from the table in the proper order, you must specify ORDER BY
SEQ,SUBSEQ on the SELECT statement.
The following is an example of rows that may be found in the DATARFTR.CMD
table.
SELECT * FROM DATARFTR.CMD ORDER BY SEQ,SUBSEQ
SEQ
SUBSEQ
CMD
---
-------
-------------------------------------------------------------
5
5
CREATE INDEX "SQLDBA"."ISYSTEXT1" ON "SQLDBA"."SYSTEXT1" ("T
5
10
OPIC" ASC ) PCTFREE=10;
10
5
COMMIT WORK ;
15
5
CREATE UNIQUE INDEX "SQLDBA"."DEUXIEME" ON "SQLDBA"."SYSTEXT
15
10
1" ("TOPIC" ASC ,"ITEM" ASC ) PCTFREE=10;
20
5
COMMIT WORK ;
25
5
CREATE INDEX "SQLDBA"."I1SYSTEXT1" ON "SQLDBA"."SYSTEXT1" ("
25
10
TOPIC" ASC ) PCTFREE=10;
30
5
COMMIT WORK ;
35
5
CONNECT SQLDBA ;
40
5
GRANT SELECT ON "SQLDBA"."SYSTEXT1" TO "PUBLIC";
45
5
COMMIT WORK ;
50
5
GRANT SELECT ON "SQLDBA"."SYSTEXT1" TO "GEORGE" WITH GRANT O
50
10
PTION;
55
5
COMMIT WORK ;
60
5
CONNECT SQLDBA ;
65
5
LABEL ON COLUMN "SQLDBA"."SYSTEXT1"."ITEM" IS ’""’;
70
5
COMMIT WORK ;
75
5
LABEL ON COLUMN "SQLDBA"."SYSTEXT1"."TOPIC" IS ’""’;
80
5
COMMIT WORK ;
Figure 237. Example of Rows in DATARFTR.CMD
Appendix C. Problem Determination
267
Reload Tables With Forward Recovery From the Log
When you reload a table from a BACKUP or a DB2 Server for VSE & VM archive
file, the reloaded table does not contain any of the changes made on that table
after the backup was taken. Those changes are recorded in any log archives taken
since the backup and in the current log.
If you want to reload a table and apply the changes, specify RECOVERY=YES on
the OPTIONS statement (refer to “OPTIONS and CONTROL Statements” on
page 167) during the RELOAD process. Refer to the next sections for information
on listing and applying the changes in the log.
Notes:
1. This function is available for BACKUP or DB2 Server for VSE & VM archive
files processed when the server was running in LOGMODE A or L.
2. Forward Recovery can only be applied to tables that exist in the archive that is
being used for the RELOAD.
3. Forward log recovery stops when it encounters a DROP TABLE or DROP
DBSPACE command in the log.
4. If dual logging is being used, Data Restore will switch to the secondary log if
there is an error processing the primary log.
LMBRWRK
ARCHIVE
SYSIN
LMBRLG1
RELOAD
LMBRLG2
Log 1
Log 2
LMBRLG3
DB2
DATABASE
Figure 238. Possible Input Sources for RELOADing Tables with Forward Recovery
Problem Determination when Reloading Tables
If an error occurs during full environment recreation, refer to “Recover from a DB2
Server for VM Error during Full Environment Recreation” on page 266.
268
Data Restore Guide
Problems may occur on an extended dynamic command; see Figure 239 for an
example of this.
XTS9-143 RELOAD TNAME=SYSTEXT1
XTS9-143
CREATOR=SQLDBA
XTS9-143
FUNCT=PURGE NEWCREATOR=GEORGE
XTS9-143 CONTROL DBNAME=dbname
XTS9-143 OPTIONS DEVICE=DASD,COMMITCOUNT=5000
XTS9-143 /*
XTS9-100 Data Restore Feature Version 7.1.0
XTS9-136 Processing SQL/VSE archived on (14/10/94-15:38:54)
XTS9-129 SQL error (sqlcode=
-302,errd1=
0,errd2=
0)
XTS9-153 SQL msg()
XTS9-162 SQL stmt:SQLDBA
.LMBRP049.000
XTS9-163 Cursor name:C001 table:GEORGE.SYSTEXT1
Figure 239. DB2 Server for VSE Error on an Extended Dynamic Statement During the
Reload Process
Problems may also occur on a dynamic statement; see Figure 240 for an example of
this.
XTS9-143 RELOAD TNAME=SYSCATALOG
XTS9-143
CREATOR=DATARFTR
XTS9-143
FUNCT=NEW
NEWCREATOR=GEORGE
XTS9-143 CONTROL DBNAME=dbname
XTS9-143 OPTIONS DEVICE=DASD,COMMITCOUNT=5000
XTS9-143 /*
XTS9-100 Data Restore Feature Version 7.1.0
XTS9-136 Processing SQL/VSE archived on (14/10/94-15:38:54)
XTS9-129 SQL error (sqlcode=
-601,errd1=
0,errd2=
0)
XTS9-153 SQL msg()
XTS9-162 SQL stmt:SQLDBA
.LMBRP017.006
Figure 240. DB2 Server for VSE Error on a Dynamic Statement During the Reload Process
LMBRP099-0209
0000
0208C3D9
C5C1E3C5
40E3C1C2
D3C5407F D4C9D3D3
D6D57F40
4B7FE2E8
E2C3C1E3
0020
C1D3D6C7
7F4D7FE3
D5C1D4C5
7F40E5C1
D9C3C8C1
D94D40F1
F85D6B7F
C3D9C5C1
0040
E3D6D97F
40C3C8C1
D94D40F8
5D6B7FE3
C1C2D3C5
E3E8D7C5
7F40C3C8
C1D94D40
0060
F15D3B7F
D5C3D6D3
E27F40E2
D4C1D3D3
C9D5E36B
7FD9C5D4
C1D9D2E2
7F40E5C1
0080
D9C3C8C1
D94D40F2
F5F45D6B
7FC4C2E2
D7C1C3C5
D5D67F40
E2D4C1D3
D3C9D5E3
00A0
6B7FC4C2
E2D7C1C3
C5D5C1D4
C57F40E5
C1D9C3C8
C1D94D40
F1F85D6B
7FE3C1C2
00C0
C9C47F40
E2D4C1D3
6B7FC3D3
E4E2E3C5
D9E3E8D7
C57F40C3
C8C1D94D
D3C9D5E3
00E0
40F15D6B
7FC3D3E4
E2E3C5D9
D9D6E67F
40C9D5E3
C5C7C5D9
406B7FC1
E5C7D9D6
0100
E6D3C5D5
7F40E2D4
C1D3D3C9
D5E36B7F
D6E4D5E3
7F40C9D5
E3C5C7C5
D9D6E6C3
0120
D9406B7F
D5D7C1C7
C5E27F40
C9D5E3C5
C7C5D940
6B7FD7C3
E3D7C1C7
C5E27F40
0140
E2D4C1D3
D3C9D5E3
6B7FD5D6
E5C5D9C6
D3D6E67F
40C9D5E3
C5C7C5D9
406B7FD3
0160
C6C4E3C1
C2C9C47F
40E2D4C1
D3D3C9D5
E36B7FD3
C6C4D3C9
D5D27F40
E2D4C1D3
0180
D3C9D5E3
6B7FD3C6
C4C4C2E2
D7C1C3C5
7F40E2D4
C1D3D3C9
D5E36B7F
E3D3C1C2
01A0
C5D37F40
E5C1D9C3
C8C1D94D
40F3F05D
6B7FD7C1
D9C5D5E3
E27F40E2
D4C1D3D3
01C0
C9D5E36B
7FC4C5D7
C5D5C4C5
D5E3E27F
40E2D4C1
D3D3C9D5
E36B7FC9
D5C1C3E3
01E0
C9E5C57F
40E2D4C1
D3D3C9D5
E35D40C9
D5407D7
E4C2D3C9
C37F404B
7FC2C1C3
0200
D2E2E3D6
D9C57F40
40400000
Figure 241. Example of a Dump Produced for a DB2 Server for VSE Error on a Dynamic Statement During the Reload
Process
Appendix C. Problem Determination
269
|
||
|
|
|