The Data Restore UNLOAD function allows the user to unload one or many DBSPACES with the database up or down. It is different from the DBSU UNLOAD utility which is used in Control Center for DBSPACE reorganizations. The Data Restore UNLOAD does not unload DBSPACE table records in key order.
When the tables are reloaded using Data Restore, the tables are not reorganized. The DBSU and Data Restore unload formats are not compatible with each other.
However, because Data Restore unloads the active pages in the DBSPACE, it provides a faster unload than DBSU and can be used to provide a backup of critical DBSPACES. Data Restore UNLOAD unloads DBSPACES and Data Restore RELOAD reloads tables. Tables can later be recovered from either a Data Restore BACKUP, TRANSLATE, or UNLOAD.
Control Center will give the user a way to unload and store DBSPACES for later use.
An UNLOAD may be desired to provide a temporary backup for a DBSPACE before changing its tables. Or, a DBSPACE may be unloaded as part of a regular backup strategy for vital system tables.
To manage the different size and frequency requirements for unloading DBSPACES, Control Center will use an UNLOAD ID (UNLOAD identification name) to |identify each unload event. The UNLOAD ID is an eight (8) character name that will be used in the database UNLTAPES file to identify which files or tapes are to be used with a particular unload event. The UNLOAD ID will be used to identify the file (unloadid UNLDDBSP) which will contain the list of DBSPACES to unload. The UNLOAD ID will also be used in the UNLDHIST file to refer to the unload event that has completed.
To set up an UNLOAD event, the DBA will use the Control Center menu interface to select which DBSPACES to unload, the file or tapes to use, a unique UNLOAD ID that will be used to identify which output media to use, and the Data Restore values to use in the SYSIN file.
Data Restore allows you to UNLOAD a maximum of 90 DBSPACES. All the DBSPACES selected must fit on a maximum ten (10) lines of the SYSIN file. This is a Data Restore restriction. In practice, it will not be possible to fit 90 DBSPACES on 10 lines unless all the DBSPACE owners are "PUBLIC" and the DBSPACEnames are very short.
At execution time, the Data Restore machine will perform necessary FILEDEFS and LABELDEFS, create the SYSIN file, and execute the Data Restore UNLOAD routine (XTS91001 MODULE). The file or tape output will be recorded in the database UNLDHIST file, and the SYSPRINT file appended to the database UNLDDESC (unload description) file.
The unloaded DBSPACE tables can later be reloaded using the RELOAD tool.
The basic files created will be:
The output media (unloaded DBSPACE tables) is determined by the selection made on the set up panels. The media selected (DISK/TAPE/SCRATCH) must match the media type represented in the UNLTAPES file. If SCRATCH is selected, then the tapes listed in the UNLTAPES file will not be re-used. New SCRATCH tapes will be requested.
The UNLOAD (ARCHIV) tape will use cuu 181.
The UNLTAPES file is different from other Control Center tapes files. The differences are discussed in the following sections.
Instead of "TYPE", referring to the type of operation the media will be used for (for example, "ARCHIVE", "LOG", "BACKUP"), this entry will identify the unique name assigned by the user for the UNLOAD event. It is critical that this UNLOAD ID be the exact name as indicated in the set up panels. Control Center will use this name when requesting tapes to be used in FILEDEF, LABELDEF, and tape mount operations.
In the UNLTAPES file, it is not necessary to have more than one series of output media listed for the UNLOAD ID. If you only wish to maintain one level of DBSPACE backup, then your UNLOAD ID should be listed in series 100 only.
However, if you wish to keep multiple levels of backups for a DBSPACE, the UNLOAD ID may have multiple series (100, 200, 300, and so on), with each series using different VOLID or file names. If more than one series is defined for an UNLOAD ID, Control Center will cycle through each series until it starts back at series 100 again.
If output is to disk, then the previous file will be overwritten. If you change the file name of your output, be sure that there is enough space on the disk to hold the new file.
For disk output, the cuu indicated MUST be the link address on the Data Restore machine where the output will be written. The disk should not be linked and accessed prior to execution. Control Center will link to this address using the first available access cuu starting at "120". The first free filemode will be used. If the operation ends normally, the disk will be detached.
Sometimes you will want to unload a DBSPACE to temporary storage until another operation is complete. You can define an UNLOAD ID that can be used many times to hold different DBSPACES. Each UNLOAD using this UNLOAD ID will overwrite the previous data.
Figure 119 is an example of the database UNLTAPES file entries required to process different unloads.
Figure 119. Example of UNLTAPES file entries for UNLOAD
100 UNLOAD1 97003 11:41:49 FILLED UNLD1100 DB2VM510 * 400 100 UNLOAD2 97003 10:57:08 FILLED VB3073 100 UNLOAD3 96364 13:51:42 FILLED VB3075 100 WORKDISK 97008 12:43:44 FILLED TEMP100 DB2VM510 * 403 200 UNLOAD1 97006 12:31:21 FILLED UNLD1200 DB2VM510 * 400 200 UNLOAD2 97010 14:29:09 FILLED VB3074 300 UNLOAD2 97017 14:29:09 FILLED VB3078 |
UNLOAD requires the database password for user SQLDBA in the "DBAPW=" SYSIN file control statement.
If database disks are password protected, UNLOAD requires the "READ" password for all of the database disks in the "READPW=" SYSIN file control statement.
A password file (drmach LINKPWDS) file is required. Refer to Appendix C, Password Support for instructions of how to implement Data Restore password support.
To invoke UNLOAD, select Option U from the Data Restore Menu. The first entry panel of the UNLOAD tool is shown in Figure 120.
Figure 120. Data Restore UNLOAD Panel
+--------------------------------------------------------------------------------+ | mm/dd/yyyy CONTROL CENTER hh:mm:ss | |*------------------------------- UNLOAD Utility -----------------------------* | || CTRLID: MSTRV1 | | || Database ==> SQLDBA NODE: VMSYSTM1 | | || DRMACH: DREST1 | | || Select DBSPACES ==> 2 (1= *, 2= Search List) | | || (3= Input file, 4= Type in one dbspace) | | || | | || DBSPACE OWNER ==> ________ (blank for ALL, PUBLIC, PRIVATE, ownername) | | || DBSPACE NAME ==> _________________ (blank for ALL, use % for wildcard) | | || DBSPACE PAGES: MINIMUM ==> 1 MAXIMUM ==> 9999999 | | || STORPOOL ==> ____ (blank for ALL Pools or specific pool | | || | | || | | || DBSPACE INPUT FILE ==> ___________________ Filename, filetype, filemode | | || | | || | | || The % SQL wildcard character can be used when specifying the | | || Dbspace Owner or Dbspace Name values for selection. | | || | | |*---------------------------------------------------------------DRUNLD2------* | | PF1 HELP PF3 QUIT PF4 EXIT PF5 Main Menu Enter Retrieve List | | | | | +--------------------------------------------------------------------------------+
On this panel, you will tell Control Center what DBSPACES you wish to unload. If you choose to type the name of one DBSPACE, or to unload all DBSPACES('*'), you will be required to select the media, mode, and condition options.
If you choose DBSPACE selection Option 2 from the UNLOAD Dbspace Utility Menu, you will be presented with a list of the DBSPACES that match your selection criteria. You may UNLOAD a maximum of 90 DBSPACES; all the DBSPACES selected must fit on a maximum ten (10) lines of the SYSIN file. This is a Data Restore restriction.
You may eliminate DBSPACES from your list by indicating "O" on the left hand input line of the list panel. Control Center will build the SYSIN DBSPACE list for you. If the DBSPACES you selected will not fit on ten lines, or if you have more than 90 DBSPACES, you will be returned to the DBSPACE list panel.
The number of DBSPACES selected is indicated in the Selected DBSPACES field in the upper right hand corner of the panel. The Select UNLOAD DBSPACES panel is shown in Figure 121, and the OMIT DBSPACE Option O has been specified.
Figure 121. Select Unload Dbspaces Panel
+--------------------------------------------------------------------------------+ | mm/dd/yyyy CONTROL CENTER hh:mm:ss | |*--------------------------- Select Unload Dbspaces -------------------------* | || Database => SQLDBA Selected DBSPACES => 7 | | || PCTFREE PCT | | || SEL OWNER NAME ACQ ALT INDX POOL NPAGES NACTIVE | | || --- -------- ------------------ ------- ---- ---- -------- ------- | | || _ D128980 DUKE_BIGTEST 10 0 10 -8 40960 16660 | | || O PUBLIC BDGT_MSTRCA_DBS 10 0 5 6 20480 -1 | | || _ PUBLIC DATARFTR 10 0 33 4 6400 32 | | || _ PUBLIC DUKE_BIGTEST 10 0 30 6 40960 18124 | | || _ PUBLIC HELPTEXT 10 0 33 1 8192 1190 | | || _ PUBLIC SAMPLE 10 0 33 6 40960 4 | | || _ PUBLIC SORTA_BIG 10 0 5 6 20480 -1 | | || _ SQMDEMO3 DUKE_BIGTEST 10 0 30 -8 40960 18369 | | || | | || | | || | | || Select: O = Omit Dbspace | | || | | || Page 1 of 1 | | |*---------------------------------------------------------------DRUNLD3------* | |1 Help 3 QUIT 5 Continue | |9 Sort/Name 10 Sort/Nact 11 Sort/Pages 12 Sort/Pool | | | +--------------------------------------------------------------------------------+
The menu which follows (Figure 122) is where the UNLTAPES (UNLOAD TAPES) file can be selected or updated. You must either verify the UNLOAD ID, series, media (file/tapes) to be used for the UNLOAD, or create a new entry for your unload.
Figure 122. Database UNLTAPES File Update Panel
+--------------------------------------------------------------------------------+ | mm/dd/yyyy CONTROL CENTER hh:mm:ss | |*----------------------- Database UNLTAPES File Update ---------------------* | || Command ===> CTRLID: MSTSRV1 | | || Database => SQLDBA NODE: VMSYSTM1 | | || VOLID/ | | || SERIES TYPE DATE TIME STATUS FILENAME FILETYPE FM ADDRESS | | || 100 UNLOAD1 97003 11:41:49 FILLED UNLD1100 DB2VM510 * 400 | | || 100 UNLOAD2 97003 10:57:08 FILLED VB3073 | | || 100 UNLOAD3 96364 13:51:42 FILLED VB3075 | | || 100 WORKDISK 97008 12:43:44 FILLED TEMP100 DB2VM510 * 403 | | || 200 UNLOAD1 97006 12:31:21 FILLED UNLD1200 DB2VM510 * 400 | | || 200 UNLOAD2 97010 14:29:09 FILLED VB3074 | | || 200 UNLOAD3 96334 17:25:17 FILLED VB3076 | | || 300 UNLOAD2 97017 14:29:09 FILLED VB3078 | | || | | || | | || | | || | | || 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 | | | +--------------------------------------------------------------------------------+
From the panel below, you will decide whether to execute or to schedule the UNLOAD. You must also specify UNLOAD ID for the UNLOAD, who to notify, and make any necessary changes in the SYSIN options.
Figure 123. UNLOAD Execution Panel
+--------------------------------------------------------------------------------+ | mm/dd/yyyy Control Center hh:mm:ss | | *------------------------- DRF UNLOAD EXECUTION --------------------------* | | | DATABASE ==> SQLDBA CTRLID: MSTRSRV1 | | | | NODE: VMSYSTM1 | | | | | | | | Execution ==> 1 ( 1= Schedule, 2 = Execute Immediately | | | | | | | | UNLOAD ID ==> ________ (Unique name for UNLOAD job ) | | | | The Unload Id will indicate which disk or tape set to be used. | | | | The Unload ID MUST be the same as the ID used in the UNLTAPES file. | | | | | | | | | | | | NOTIFY ==> ________ (Userid) ________ (Node ) | | | | | | | | MEDIA ==> 1 ( 1= DISK, 2= Predefined TAPE, 3= SCRATCH Tape) | | | | MODE ==> 1 ( 1= Online, 2= Offline ) | | | | COND ==> 1 ( 1= Include, 2= Exclude ) | | | | WRKSIZE => 2048 ( Npages * 5 / 1024, default = 2048) | | | | | | | | | | | *----------------------------------------------------------------DRUNLD4----* | | PF1 HELP PF3 QUIT PF4 Modify/View UNLTAPES file ENTER Execute | | | | | +--------------------------------------------------------------------------------+
The database UNLDHIST file will be updated with the file or tapes that were produced for the UNLOAD and the date and time stamps of the UNLOAD.
If the UNLOAD was successful, the UNLDLIST (SYSPRINT) file will be sent to the Control Center service machine. This file will be appended to the database UNLDDESC (unload describe) file to provide a running record of all successful unloads. When this becomes too large, it can be manually edited to remove old entries by using the General Utilities Filelist tool (SQM =G.F * UNLDDESC).