DB2 Server for VSE & VM: Operation


Archiving the Database

There are three ways to archive a database:



>>-ARCHIVE--+------+-------------------------------------------><
            '-FULL-'
 

The application server must be running with either LOGMODE=A or L. Automatic archiving of either the database or the log must already be in effect before you can explicitly request a database archive. DB2 Server for VSE supports both dynamic and static tape drive assignment during the archiving process. Dynamic assign, the default, allows access to one tape drive while archiving, whereas static assign allows access to multiple tape drives. The use of static tape drive assignment can decrease the time required to archive the log or database. Startup JCL must include assign statements to permit static assign. Figure 22 shows an example of startup JCL required for using static assign.

Figure 22. Example of Startup JCL for Static Tape Drive Assign Archive

// JOB SQLUSQL    DB2/VSE  FROM (SQLUSR1,ECHO=NO) 02/10/96 15:44:09
// LIBDEF *,SEARCH=(PRD2.SQL340)
// TLBL ARILARC
// TLBL ARIARCH
// ASSGN SYS005,cu1
// ASSGN SYS005,cu2,ALT
// EXEC ARISQLDS,SIZE=AUTO,                                            *
               PARM='ACCOUNT=T,ARCHPCT=80,DISPBIAS=9,DSPLYDEV=B,LOGMODE*
               =L,NCUSERS=05,STARTUP=W,SYSMODE=M'
Note:For cu1 and cu2, specify your installation's tape devices.

When the FULL option is used on the ARCHIVE command, these archives may be used as a starting point for taking incremental archives with Data Restore. Database manager archives taken with the FULL parameter, will be the associated full backup for subsequent incremental backups taken with Data Restore.

Implicit archives occur only in LOGMODE=A or LOGMODE=L. In LOGMODE=L, the database manager will take a log archive. In LOGMODE=A, the database manager will take a database archive.

When LOGMODE=A, the database is already being archived automatically, so it is unusual to have to enter an ARCHIVE command. One reason to enter an ARCHIVE command would be to free log space prior to the next automatic archive. Note that when LOGMODE=A, the ARCHIVE command causes only a database archive. Log archiving is not involved.

When LOGMODE=L, log archives are automatically being done, but not database archives. You may want to explicitly archive the database during long periods of operation with LOGMODE=L. The time required to restore the database increases as the frequency of log archives increases. If you enter the ARCHIVE command when LOGMODE=L, the application server does a log archive if there is information in the log, and then a database archive. The command is rejected if a database or log archive is already in progress.

As with any archive, the application server requests that you mount the required tape volume or volumes to contain the database archive (or log archive, if LOGMODE=L, and you are not archiving the log to a VM disk). For dynamic assign, the operator enters the virtual device number (cuu) of the tape drive when prompted by message ARI0299A; for static assign, the operator enters '1' to indicate that the archive will be written to one or more statically assigned tape drives (SYS005). If logical device SYS005 is not available, the operator will be notified by display message ARI2036I that the device is not available. The system will then re-display message ARI0299A prompting the operator to specify a valid cuu. For more information on static and dynamic tape drive assign, and the DB2 Server for VSE System Administration manual. The archive or archives are then created. In a VM system, when the application server prompts you to mount and ready the archive volume, you should respond with the virtual device number. Unless you have entered your own CMS FILEDEF command before startup, the virtual device number for database archives is 181. The virtual device number for log archives is 183.
Note:When LOGMODE=N, in single user mode, a log for recovery is not maintained. When LOGMODE=Y, the log is maintained but is not automatically archived.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]