Your procedures for recovery can also include archiving the log. A log archive is a copy of the DB2 Server for VSE & VM log on either a magnetic tape or in VM only, on a disk.
There are three ways to do a log archive:
Specify LOGMODE=L in the initialization parameters when you start the application server. The ARCHPCT parameter controls how often an archive is done. If you do not specify ARCHPCT, the default value is used.
Enter the SQLEND LARCHIVE operator command. See Stopping the Application Server for information on the SQLEND command.
Use the LARCHIVE operator command.
The syntax of the LARCHIVE operator command is as follows:
>>-LARCHIVE---------------------------------------------------->< |
The application server must be running with LOGMODE=L. Automatic log archiving must be in effect before you can request a log archive explicitly. When LOGMODE=L, the application server automatically does periodic log archives; therefore, it is unusual to have to enter the LARCHIVE command. One reason to enter the LARCHIVE command is to free log space before the next automatic log archive. The command is rejected if a database or log archive is already in progress.
The LARCHIVE command causes only a log archive. The application server does not archive the database as a result of the LARCHIVE command.
As with any archive, the application server requests that you mount the required tape volume to contain the log archive. The log is then copied to tape.
When you are using a tape for the log archive, the application server requests that you mount the required tape volume to contain it. The log archive is then copied to tape. When the application server prompts you to mount and ready the archive volume, respond with the virtual device number (cuu). Unless you entered your own CMS FILEDEF command before starting the application server, the virtual device number is 183.
You can direct a log archive to disk by changing the file definition for the log archive file with the CMS FILEDEF command.
If you receive message ARI0246D, you can direct a log archive to disk by replying CHANGE to the message.