DB2 Server for VSE: System Administration
In general, you should not switch indiscriminately between log modes Y, N,
L, and A: pick one mode and stick to it. However, switching to
another mode may at times be required. (See Choosing a Log Mode for description of log modes.)
To switch to LOGMODE=Y or N:
- Issue either an SQLEND ARCHIVE or an SQLEND UARCHIVE command. With
SQLEND ARCHIVE, a database archive is automatically taken, then the
application server shuts down; with SQLEND UARCHIVE, the application
server shuts down immediately, then you take the user archive (using your own
facilities).
- Start the application server with STARTUP=L and LOGMODE=Y to perform a
COLDLOG to reformat the log.
- Start the application server with STARTUP=W and LOGMODE=Y or N.
To switch to LOGMODE=L:
- Issue either an SQLEND ARCHIVE or an SQLEND UARCHIVE command. With
SQLEND ARCHIVE, a database archive is automatically taken, then the
application server shuts down; with SQLEND UARCHIVE, the application
server shuts down immediately, then you take the user archive. In
either case, this database archive serves as the starting point for subsequent
log archives.
You do not have to take this database archive under either of the following
two conditions:
- You have already taken one, and have been running with LOGMODE=A since
that archive.
- You have done a restore that finished without interruption, and have done
nothing to break the continuity of the restore set. (For information on
how the continuity of the restore set can be broken, see History Area.)
In either of these situations, the database archive you took (or restored)
is in the current restore set.
- Start the application server with STARTUP=W and LOGMODE=L.
To switch to LOGMODE=Y or N:
- Shut down the application server by issuing an SQLEND LARCHIVE operator
command to save the log.
- Start the application server with STARTUP=L and LOGMODE=Y to perform a
COLDLOG to reformat the log.
- Start the application server with STARTUP=W and LOGMODE=Y or N.
To switch to LOGMODE=A:
- Shut down the application server by issuing an SQLEND LARCHIVE operator
command to save the log.
- Start the application server with STARTUP=W and LOGMODE=A.
You will be warned that the continuity of the log archives will be
broken.
Switching the log mode when you have been using log archiving will
interrupt the continuity of the log archives, unless all you do is switch from
LOGMODE=L to A and then back again without taking a database archive.
(This protects you from losing a sequence of log archives if you accidentally
set LOGMODE to A.) If the continuity is broken and work is done on the
database, you will not be able to restore the database to its current level by
using database and log archives taken prior to the break. Figure 73 shows this situation:
Figure 73. Log Archive Continuity
In the above diagram:
- D is the current database status.
- If you use the database archive taken at A and subsequent log archives,
you can restore the database only to point B. All changes between
points B and D are lost.
- If you use the database archive taken at C and subsequent log archives,
you can restore the database to point D.
To switch to LOGMODE=A:
- Start the application server with STARTUP=W, LOGMODE=Y, and
SYSMODE=M.
- Issue either an SQLEND ARCHIVE or an SQLEND UARCHIVE command. With
SQLEND ARCHIVE, a database archive is automatically taken, then the
application server shuts down; with SQLEND UARCHIVE, the application
server shuts down immediately, then you take the user archive (using your own
facilities).
- Start the application server with STARTUP=W and LOGMODE=A.
To switch to LOGMODE=L:
- Start the application server with STARTUP=W, LOGMODE=Y, and
SYSMODE=M.
- Issue either an SQLEND ARCHIVE or an SQLEND UARCHIVE command. With
SQLEND ARCHIVE, a database archive is automatically taken, then the
application server shuts down; with SQLEND UARCHIVE, the application
server shuts down immediately, then you take the user archive.
The continuity of the log archives will have been interrupted by any work
that was done while LOGMODE was set to Y or N, so you must take a new database
archive. This database archive will serve as the starting point for
subsequent log archives.
- Start the application server with STARTUP=W and LOGMODE=L.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]