You are on page 1of 2

Moving both the database and recovery log

You can move the database, active log, and archive logs that are on the same file system to various
directories on different file systems for better protection.

1. Back up the database. For example:


backup db type=full devclass=files
2. Halt the server.
3. Create directories for the database, active logs, and archive logs. The directories must be
accessible to the user ID of the database manager. For example:

mkdir /tsmdb005
mkdir /tsmdb006
mkdir /tsmdb007
mkdir /tsmdb008
mkdir /activelog2
mkdir /archivelog2

mkdir l:\tsm\db005
mkdir m:\tsm\db006
mkdir n:\tsm\db007
mkdir o:\tsm\db008
mkdir p:\tsm\activelog
mkdir q:\tsm\archivelog
4. Create a file that lists the locations of the database directories. This file will be used if the
database must be restored. Enter each location on a separate line. For example, here are
the contents of the dbdirs.txt file:

/tsmdb005
/tsmdb006
/tsmdb007
/tsmdb008

l:\tsm\db005
m:\tsm\db006
n:\tsm\db007
o:\tsm\db008
5. Remove the database instance.
dsmserv removedb TSMDB1
6. Issue the DSMSERV RESTORE DB utility to move the database and create the new active
log. For example:

dsmserv restore db todate=today on=dbdirs.txt


activelog=/activelog2

dsmserv restore db todate=today on=dbdirs.txt


activelog=p:\tsm\activelog
7. Restart the server.
8. Move the archive logs from the old directory to the new directory. Ensure that you preserve
any subdirectory structure. Use and verify a recursive copy directory command:

cp -r /archivelog/* /archivelog2

xcopy /s k:\tsm\archivelog\* q:\tsm\archivelog

You might also like