Terminology Used in This Chapter
Before continuing, you should review these topics:
Control Center uses the database TAPES file to maintain a list of output media assigned for usage during database archives, log archives, and trace activities. At database startup time and during processing of these activities, it references and updates this file as necessary. If Data Restore is enabled and used, then the TAPES file will also include media information for Data Restore BACKUP, Incremental BACKUP and TRANSLATE.
A separate database TAPES file is maintained by the product for each database machine it manages. TAPES files are generated during the database setup process and saved on the service machine's 191 A-disk as file database TAPES, where database is the database machine ID. Using the Tape Management tool, you can view and modify the database TAPES file.
Figure 54. Tape Management Option Selection Panel
+--------------------------------------------------------------------------------+ | mm/dd/yyyy Control Center hh:mm:ss | | *-------------------------- Database Tapes Functions -----------------------* | | | Option ===> CTRLID: MSTRSRV1 | | | | Database ===> SQLDBA NODE: VMSYSTM1 | | | | | | | | | | | | V VIEW TAPES View tape catalog | | | | | | | | M TAPE MAINTENANCE Make changes to tape catalog | | | | | | | | S SCRATCH TAPE ACQUISITION Acquire a new (SCRATCH) tape and add | | | | volid to TAPES file (VMTAPE & DYNAMT). | | | | When DYNAMT is installed, do not use if | | | | DYNOPEN is specified as the DYNAMT | | | | method in the SQLMSTR Control file. | | | | | | | | | | | | | | | | | | | | | | | | Enter OPTION, select DATABASE, press ENTER to process | | | | | | | *---------------------------------------------------------------SQMTAPES----* | | PF: 1 Help 3 End | +--------------------------------------------------------------------------------+
Shown in Figure 54 is the option selection panel of the Tape Management tool. The database you're currently working with is identified by your communication path and database settings shown near the top of the panel. The communication path can be changed using Option C from the Control Center Main Menu, whereas the database setting can be changed on this panel. For more information, see Control Center Communication Path and Database Settings.
Select this option to view the current database TAPES file.
The display panel used by the VIEW TAPES Option V, is similar to the entry panel used by the TAPE MAINTENANCE Option M, described next.
Select this option to modify the database TAPES file. Make required changes, paging forward and backward using PF7 and PF8, and then select PF10 to process. You will be prompted to confirm the update of the TAPES file on the service machine's 191 A-disk. |Refer to Figure 55.
Usage Considerations:
Extreme caution should be exercised when changing the database TAPES file. Except for problem resolution, changes in the TAPES file should be limited to adding output media and deleting unused output media.
Note: |
---|
Under no circumstances should you update the TAPES file while a database archive, log archive, Data Restore backup, translate or trace activity is in progress. The product references and updates the TAPES file during these activities. Your changes may corrupt status information required by Control Center, which can lead to serious errors and loss of data. |
Figure 55. Tape Management Tool, Tape Maintenance Panel
+--------------------------------------------------------------------------------+ | mm/dd/yyyy CONTROL CENTER hh:mm:ss | | *------------------------- Database TAPES File Update ----------------------* | | | Command ===> CTRLID: MSTRSRV1 | | | | Database => SQLDBA NODE: VMSYSTM1 | | | | VOLID/ | | | | SERIES TYPE DATE TIME STATUS FILENAME FILETYPE FM CUU | | | | 100 ARCHIVE 00000 00:00:00 FILDEF VOL100 | | | | 100 LOG 00000 00:00:00 UNUSED SQLDBA1 03269101 F 501 | | | | 100 LOG 00000 00:00:00 UNUSED SQLDBA1 03269102 F 501 | | | | 200 ARCHIVE 97086 11:09:58 FILLED VOL200 | | | | 200 LOG 97086 11:34:56 FILLED SQLDBA1 03279103 G 502 | | | | 200 LOG 00000 00:00:00 UNUSED SQLDBA1 03269105 G 502 | | | | 300 ARCHIVE 97086 11:49:02 FILLED VOL300 | | | | 300 LOG 00000 00:00:00 UNUSED SQLDBA1 03269106 H 503 | | | | 300 LOG 00000 00:00:00 UNUSED SQLDBA1 25039107 H 503 | | | | | | | | | | | | | | | | 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 | | | +--------------------------------------------------------------------------------+
Value | Description |
---|---|
SERIES | A three-digit number indicating the output media series. Output media with the same series number are considered by Control Center to belong together as a single logical group. Control Center will NOT work properly if less than two tape series are used. You should use at least three tape series to ensure sufficient database recoverability. |
TYPE | Assigns output media to a specific usage.
Possible values:
|
DATE | The Julian date (yyddd) when output media was last used by Control Center. Should be equal to 00000 when tape is unused. |
TIME | Time (hh:mm:ss) when output media was last used by Control Center. Should be equal to 00:00:00 when tape is unused. |
STATUS | Control Center uses this field to track the status of the output
media.
Common status values include:
|
VOLID | Tape volume serial number if output media is TAPE. |
FILENAME | CMS file name if output media is DISK. |
FILETYPE | CMS file type if output media is DISK. |
FM | CMS file mode (disk access mode) if output media is DISK. |
CUU | Virtual disk address (CUU) if output media is DISK and TYPE is ARCHIVE, LOG or TRACE. Real disk address (CUU) if output media is DISK and TYPE is a Data Restore function, such as TRANS, BACKUP2, ssINCBKdd, BACKUP, or UNLOADID (Unload Identifier). You should not specify a virtual address of less than 200. Addresses between 180 and 190 are reserved for tape usage and are detached during product operation. |
CI | Century Indicator (1 = 20th Century, 2 = 21st Century) This is not displayed on the panels. |
Select PF4 key to add a new record to the end of the list, as shown below. You must provide a valid SERIES and VOLID/FILENAME by typing over the default values before the new record will be accepted by the product. The list will be resorted after you process your changes (PF10).
Figure 56. Adding a Record to the Database TAPE File
+--------------------------------------------------------------------------------+ | | 300 ARCHIVE 97086 11:49:02 FILLED VOL300 | | | | 300 LOG 00000 00:00:00 UNUSED SQLDBA1 03269106 H 503 | | | | 300 LOG 00000 00:00:00 UNUSED SQLDBA1 25039107 H 503 | | | | ADD ARCHIVE 00000 00:00:00 UNUSED | | | | | | | | | | | | 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 | +--------------------------------------------------------------------------------+
To delete an entire record, type a D in the SERIES field of the target record. The Control Center identifies deleted records by changing the SERIES value to DEL, as shown below.
Figure 57. Deleting a Record in the Database TAPE File
+--------------------------------------------------------------------------------+ | | 200 LOG 00000 00:00:00 UNUSED SQLDBA1 03269105 G 502 | | | | 300 ARCHIVE 97086 11:49:02 FILLED VOL300 | | | | 300 LOG 00000 00:00:00 UNUSED SQLDBA1 03269106 H 503 | | | | DEL LOG 00000 00:00:00 UNUSED SQLDBA1 25039107 H 503 | | | | | | | | 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 | +--------------------------------------------------------------------------------+
|This option acquires a scratch tape and automatically adds it to the |database TAPES file. This option can only be used with tape managers |that allow SCRATCH tapes, such as VMTAPE or DYNAMT (using the DYNOPEN method |only).
|This option cannot be used for tapes and tape types used by the Data |Restore machine.
Figure 58. Tape Management Tape Acquisition Panel
+--------------------------------------------------------------------------------+ | mm/dd/yyyy CONTROL CENTER hh:mm:ss | | *---------------------------- Tape Acquisition -----------------------------* | | | Command ==> CTRLID: MSTRSRV1 | | | | NODE: VMSYSTM1 | | | | Database ===> SQLDBA | | | | | | | | TYPE ===> ARCHIVE (ARCHIVE, LOG, or TRACE) | | | | | | | | SERIES ===> 100 (which series to add tape to) | | | | | | | | | | | | This function will issue a tape mount request for a SCRATCH tape, | | | | acquire the tape with the appropriate retention period, and will | | | | place the tape within the TAPES file for the database. | | | | | | | | NOTE: This function is only available with VMTAPE. | | | | | | | | Enter TYPE and SERIES, press ENTER to process. | | | | Press PF3 to RETURN without acquiring a tape. | | | | | | | *---------------------------------------------------------------SQMTAPEA----* | | PF: 1 Help 3 End | | | | | +--------------------------------------------------------------------------------+
Possible values:
DYNAMT has two mount commands available to handle tape processing. DYNOPEN lets users create and request tapes based upon data set name, while DYNMOUNT lets users create and request tapes from a user's personal tape library. Both mount methods are supported by this version of Control Center, however, the information below is important based upon the DYNAMT method you choose for tape usage.
Note: | CA-DYNAM/T does NOT support multivolume tape processing. Therefore, this version of Control Center only supports single tape handling. |
To use DYNOPEN, the steps below are required for correct operation:
To use DYNMOUNT, the following is required for correct operation:
Tape TYPE |
---|
When discussing tape files, TYPE will refer to the indicator in the database TAPES file that describes the function for which the output tape/file is intended. TYPE does NOT describe the physical characteristics of the media (for example, 3480 tape). |
If Data Restore is enabled and used, then the TAPES file will also include media information for Data Restore BACKUP, Incremental BACKUP and TRANSLATE. | All output media written to by Data Restore functions are owned by |the Data Restore machine. The database TAPES files must always |include an ARCHIVE entry for each series regardless of whether you are using |Data Restore.
The tapes for the "BACKUP" tape type will be used for the primary Data Restore BACKUP. If "Dual-backup = Y" in the database PARMS file, the secondary BACKUP will use the tapes indicated by the BACKUP2 tape type. An archive or a BACKUP executed with the FULL option does not affect the tape type used for the function.
|The primary BACKUP (ARCHIV) tapes are mounted on the Data Restore |machine using virtual address 181. The secondary BACKUP (ARCHIV2) tapes |are mounted using virtual address 182.
Output media for TRANSLATE tapes and work files resides in the database TAPES file in the same series as the associated archive. One TRANSLATE is allowed per database TAPES file series. The file or tapes to be used for the TRANSLATE are indicated by using a type of TRANS.
While there can be one or more tapes designated for the TRANSLATE (TRANS), only one entry (TRANSDSK) will be used to indicate where the work files will be kept.
The three work files created by Data Restore. (SYS0001, DIRWORK, HEADER) can only be written to disk; these files will all be written to the same disk. Because all the work files are written to the same disk, only one entry in the database TAPES file (TRANSDSK) will be used to indicate the name and location of the work files. The TRANSDSK entry includes the FILENAME and link address of the work files. Only the file name will be significant for the TRANSDSK entry. The actual file type used will correspond to the type work file that will be FILEDEFed and LABELDEFed. The file mode will be determined at the time of the TRANSLATE. This strategy will allow more than one TRANSLATE work file output on a disk. See Figure 60 for an example of the FILEDEFs specified.
TRANSLATE may require more tapes than those used in the archive. If predefined tapes are used in the database TAPES file, be sure to include more tapes to handle the TRANS entry.
Figure 59. Example of TAPES file entries for TRANSLATE
100 TRANS 00000 00:00:00 UNUSED SCRATCH
100 TRANSDSK 00000 00:00:00 UNUSED DB2VM510 TRANSDSK * 400
The preceding figure shows how the TRANSDSK entry in the database TAPES file will be used when performing a FILEDEF on the translate work files.
Figure 60. Example FILEDEFS for TRANSDSK entry
FILEDEF SYS0001 DISK DB2VM510 SYS0001 T ( RECFM F BLOCK 4096
FILEDEF HEADER DISK DB2VM510 HEADER T ( RECFM F BLOCK 4096
FILEDEF DIRWORK DISK DB2VM510 DIRWORK T ( RECFM F BLOCK 0512
|The TRANSLATE |output tapes |(ARCHIV) use virtual address 185, and the archive |input tapes (ARIARCH) use virtual address 181.
Because the TRANSLATE output tapes are taken from the same series as the archive being translated, the database TAPES file must have a series that matches the series in the ARCHHIST file.
For example, if you have a series 100 through 600 and you delete series 600, you can still have an entry for series 600 in the ARCHHIST file. You can TRANSLATE the archive for the deleted series 600 because the tapes still exist, but there will be no entry in the TAPES file to indicate what tapes to use.
DB2 Server for VM treats an Incremental Backup as a normal USER ARCHIVE. However, an Incremental Backup is not useful unless the file or tapes used for the reference Full Backup are still valid. If a Full Backup's tapes are overwritten by a subsequent BACKUP, then all the Incremental Backups that reference that Full Backup will no longer be usable.
When Control Center manages archive and log archive output media in the database TAPES file, it uses a series which holds one archive and one or more log archives. A similar strategy is used to maintain the relationship between the Full Backup and its one or more Incremental Backups.
In order to prevent tapes from being overwritten prematurely, each series in the database TAPES file will also include INCBK and INCBK2 tape types for one or more Incremental Backups. The Incremental Backup is grouped together with the series used for the Full BACKUP/archive. In this way, a Full Backup or Incremental Backup is not overwritten until the series is used again for a new normal or Full Backup. However, Incremental Backup output is different than log archive output in several ways:
In order to uniquely identify the tapes that belong to an Incremental Backup within a series, each set of Incremental Backup tapes are identified with their own tape type.
The INCBK tape type is used to identify the set of tapes/file to be used for each Incremental Backup within a series.
The INCBK will be in the form "ssINCBKd" where:
After a Full Backup successfully executes using series 100, the first Incremental Backup would use the 01INCBK tapes in archive-series 100, the second Incremental Backup would use 02INCBK, etc. The subseries numbers must be sequential and start with 01.
Figure 61 shows part of a logmode A database TAPES file using Incremental Backup. Series 100 consists of a set of dual backup entries for primary BACKUP and secondary backup and three sets of dual Incremental Backup. Each tape belonging to an Incremental Backup within series 100 is grouped together by the subseries prefix. If the database was using logmode L, then a log archive would have been performed prior to each BACKUP and Incremental Backup.
Figure 61. Example of a Logmode A Database TAPES File Using Incremental Backup
100 ARCHIVE 00000 00:00:00 UNUSED VM0010
100 ARCHIVE 00000 00:00:00 UNUSED VM0011
(1) 100 BACKUP 98032 16:37:21 FILLED VM0012
100 BACKUP 98032 16:41:08 FILLED VM0012
100 BACKUP2 98032 16:37:21 FILLED VM0014
100 BACKUP2 98032 16:41:08 FILLED VM0015
100 TRANS 00000 00:00:00 UNUSED VM0040
100 TRANS 00000 00:00:00 UNUSED VM0041
100 TRANSDSK 00000 00:00:00 UNUSED TRAN100 TRANSDSK * 196
(2) 100 01INCBK 98033 17:50:01 FILLED VM0016
100 01INCBK2 98033 17:50:02 FILLED VM0017
(3) 100 02INCBK 98034 17:30:01 FILLED VM0018
100 02INCBK 00000 00:00:00 UNUSED VM0019
100 02INCBK2 98034 17:30:02 FILLED VM0020
100 02INCBK2 00000 00:00:00 UNUSED VM0021
(4) 100 03INCBK 98035 17:50:10 FILLED VM0022
100 03INCBK 98035 17:50:15 FILLED VM0023
100 03INCBK 00000 00:00:00 UNUSED VM0024
100 03INCBK2 98035 17:50:11 FILLED VM0025
100 03INCBK2 98035 17:50:17 FILLED VM0026
100 03INCBK2 00000 00:00:00 UNUSED VM0027
200 ARCHIVE 00000 00:00:00 UNUSED VM0028
200 ARCHIVE 00000 00:00:00 UNUSED VM0029
(5) 200 BACKUP 98036 16:37:21 FILLED VM0030
200 BACKUP 98036 16:46:58 FILLED VM0031
200 BACKUP2 98036 16:37:21 FILLED VM0032
200 BACKUP2 98036 16:41:08 FILLED VM0033
200 TRANS 00000 00:00:00 UNUSED VM0042
200 TRANS 00000 00:00:00 UNUSED VM0043
200 TRANSDSK 00000 00:00:00 UNUSED TRAN200 TRANSDSK * 196
(6) 200 01INCBK 98037 17:50:01 FILLED VM0034
200 01INCBK2 98037 17:50:02 FILLED VM0035
200 02INCBK 98038 17:30:01 FILLED VM0036
200 02INCBK 00000 00:00:00 UNUSED VM0037
200 02INCBK2 98038 17:30:02 FILLED VM0038
200 02INCBK2 00000 00:00:00 UNUSED VM0039
200 03INCBK 00000 00:00:00 UNUSED VM0040
200 03INCBK 00000 00:00:00 UNUSED VM0041
200 03INCBK 00000 00:00:00 UNUSED VM0042
200 03INCBK2 00000 00:00:00 UNUSED VM0043
200 03INCBK2 00000 00:00:00 UNUSED VM0044
200 03INCBK2 00000 00:00:00 UNUSED VM0045
(1)-- On Sunday a dual Full Backup was performed using series 100.
(2)-- On Monday, an Incremental Backup was performed using the tapes in series 100 and subseries 01 (01INCBK).
(3)-- On Tuesday, an Incremental Backup was performed using subseries 02 (02INCBK).
(4)-- On Wednesday, two tapes were used for both the primary and secondary Incremental Backup using subseries 03 (03INCBK and 03INCBK2).
(5)-- On Thursday, a new Full Backup was executed using series 200.
(6)-- On Friday, a new set of Incremental Backups are executed in series 200 starting with subseries 01 (01INCBK).
The ARCHIVE and BACKUP2 entries in the database TAPES file do not do not distinguish between FULL and normal backups because the tapes can be used for either. After the backup is completed, the ARCHHIST file will indicate if the full option was used.
Number of LOG ARCHIVE entries in a series |
---|
There must be enough log archive entries in each Logarch-series to handle all log archives between Full Backup or ARCHIVE FULL in the Incbackup-series. If the database is logmode L, then a log archive is performed before each USER ARCHIVE (BACKUP or Incremental Backup). |
Incremental Backup has its own 'Incbackup-series' in the database PARMS file to control which set of tapes will be used for the next Incremental Backup.
The Incbackup-series in the database PARMS file indicates the series and subseries in the database TAPES file that will be used to supply tapes for the next Incremental Backup. The Incbackup-series is presented in the form "series.subseries" where:
The subseries is incremented only after an Incremental Backup successfully completes.
The Archive-series, Logarch-series and Trace-series are not incremented when an Incremental Backup completes.
The Incbackup-series will be maintained in the database PARMS file even when "Incbackup-enabled = N."
After an Incremental Backup completes, the subseries will be incremented even though there may not be an INCBK entry in the database tapes file for that Incbackup-series.
The user must setup the database TAPES file so that there will be enough entries of each tape type to accommodate the expected backup/archive workload. However, there will be times when a user has performed more than the usual number of Incremental Backups, and there may not be anymore INCBK entries in the database TAPES file to satisfy a regularly scheduled Incremental Backup. Control Center provides several options to ensure that archiving can continue.
If another Incremental Backup is requested when there is no INCBK entry for the current Incbackup-series then one of the following actions will occur:
not switch the Incremental Backup to a Full Backup regardless of the "Auto-full" value in the database PARMS file. The Incremental Backup will be cancelled.
If the Incremental Backup is cancelled, you can use the Tape Maintenance menu to add the new INCBK entry and then request another Incremental Backup.
The user must understand the implications of switching an Incremental Backup to a Full Backup. A Full Backup can take considerably longer than an Incremental Backup and can affect the execution of other scheduled database maintenance activity.
There can be times when switching or not switching makes more sense. The AUTOFULL/NOAUTOFULL command option offers the user the flexibility to control the Incremental Backup without changing the overall Incremental Backup strategy. In order to keep the Incremental Backup tapes together with its reference backup, Control Center will increment the Incbackup-series whenever a BACKUP or archive completes.
A BACKUP is a User Archive and when the database is using logmode L, log archives will be initiated by the database.
Number of LOG ARCHIVE entries in a series |
---|
There must be enough log archive entries in each Logarch-series to handle all log archives between Full Backup or ARCHIVE FULL in the Incbackup-series. If the database is logmode L, then a log archive is performed before each USER ARCHIVE (BACKUP or Incremental Backup). |
For DB2 Server for VM databases version 7.1.0 or greater, Control Center automatically updates the tape or disk file information for the ARCHIVE (ARIARCH) FILEDEF or LABELDEF after each logmode A or L online full database archive. This allows successive archives to be taken without overwriting the output from previous archives.
For DB2 Server for VM databases earlier than version 7.1.0, the user must either use SQLEND ARCHIVE or shut down and restart the database after online archives so that archive FILEDEF and LABELDEF can be updated with the next archives series tapes.
Online FILEDEF or LABELDEF commands are only executed to change the volume ID or disk file information of the FILEDEF or LABELDEF for ARIARCH. Other FILEDEF or LABELDEF parameters remain the same.
Log archive tapes/files (ARILARC) are not affected. Currently, Control Center does not LABELDEF log archives tapes in order that successive implicit online log archives may occur without changing the LABELDEF for the tapes.
Trace (ARITRAC) FILEDEFs are not changed. Changing ARITRAC FILEDEFs while the database is tracing would cause errors. ARITRAC is currently reset when the database is started.
An online FILEDEF/LABELDEF change for ARIARCH is not necessary for archive operations that bring the database down. It should not be used for:
You can query the current FILEDEFs or LABELDEF of a local or remote database. These commands require Control Center Operator or greater authority and can only be executed when the database is running and the status is NORMAL.
From the CMS command line, enter one of the following:
Figure 62 shows an example of the QUERY LABELDEF command output:
Figure 62. Example of QUERY LABELDEF Output
+--------------------------------------------------------------------------------+ |------------------------------------------------------------ | | Userid: DBA1 Date: dd/mm/yyyy | |At Node: VMSYSTM1 Time: hh:mm:ss | | | |Request: FDEFSQL Q LABELDEF for database SQLDBA at VMSYSTM1 | | | |DDNAME VOLID FSEQ VOLSEQ GENN GENV CRDTE EXDTE SEC FID | |ARIARCH 000284 SQLDBA.ARCH | | VOLIDS: | | VB3767 VB3768 | | | |DDNAME VOLID FSEQ VOLSEQ GENN GENV CRDTE EXDTE SEC FID | |ARITRAC SCRATCH 000284 SQLDBA.TRAC | | | |-------------------------------------------------------------------- | +--------------------------------------------------------------------------------+ |
The database FDEFLOG on the Control Center service machine's 'A' disk contains the output from the last online archive FILEDEF or LABELDEF change. You can view the database FDEFLOG file at any time to verify the last online archive FILEDEF or LABELDEF change. The database ARCHLOG also contains entries that indicate the beginning and end of the FILEDEF or LABELDEF change.
From the CMS command line, enter the following:
SQM dbmach QUERY FDEFLOGdbmach is the machine ID of the database.
Figure 63 shows an example of the output from QUERY FDEFLOG:
Figure 63. Example of database FDEFLOG
+--------------------------------------------------------------------------------+ |-------------------------------------------------------------- | | Userid: MSTRV1 Date: 2000-03-10 | | At Node: VMSYSTM1 Time: 13.27.58 | | | | Request: CHANGE ARCHIVE ( SQMA292I for database SQLDBA | | | | PARMS ==> ARCHIVE Series: 100 Media: TAPE | | Executed ==> LABELDEF ARIARCH VOLID ? ( CHANGE | | | | DMSLBD441R Enter VOLID information: | | VOLID: VB3767 Entered. | | DMSLBD441R Enter VOLID information: | | VOLID: VB3768 Entered. | | DMSLBD441R Enter VOLID information: | | VOLID: BLANK Entered to complete processing. | | | | ==> SQMDFDEF SQLDBA COMPLETED. RC=0 | |-------------------------------------------------------- | +--------------------------------------------------------------------------------+ |