The dump database, dump transaction, load database, and load transaction commands have parallel syntax. Routine dumps and loads require the name of a database and at least one dump device. The commands can also include the following options:
compress::compression_level:: to compress your dump files
at server_name to specify the remote Backup Server
density, blocksize, and capacity to specify tape storage characteristics
dumpvolume to specify the volume name of the ANSI tape label
file = file_name to specify the name of the file to dump to or load from
stripe on stripe_device to specify additional dump devices
dismount, unload, init, and retaindays to specify tape handling
notify to specify whether Backup Server messages are sent to the client that initiated the dump or load or to the operator_console
When a user database is dumped, its database options are not dumped because they are stored in the sysdatabases table of the master databases. This is not a problem if you load a previously dumped database onto itself because rows in sysdatabases describing this database still exist in master. However, if you drop the database before you perform the load database, or if you load the database dump on a new server, these database options are not restored. To restore the image of a user database, you must also recreate the database options.
Table 27-1 shows the syntax for routine database and log dumps and for dumping the log after a device failure. It indicates what type of information is provided by each part of the dump database or dump transaction statement.
Information provided |
Task |
|
---|---|---|
Routine database or log dump |
Log dump after device failure |
|
Command |
dump {database | transaction} |
dump transaction |
Database name |
database_name |
database_name |
Compression |
to [compress::[compression_level::]] |
to [compress::[compression_level::]] |
Dump device |
stripe_device |
stripe_device |
Remote Backup Server |
[at server_name] |
[at server_name] |
Tape device characteristics |
[density = density, blocksize = number_bytes, capacity = number_kilobytes] |
[density = density, blocksize = number_bytes, capacity = number_kilobytes] |
Volume name |
[, dumpvolume = volume_name] |
[, dumpvolume = volume_name] |
File name |
[, file = file_name] |
[, file = file_name] |
Characteristics of additional devices (up to 31 devices; one set per device) |
[stripe on [compress::[compression_ level::]] stripe_device [at server_name] [density = density, blocksize = number_bytes, capacity = number_kilobytes, file = file_name, dumpvolume = volume_name]]... |
[stripe on [compress::[compression_ level::]] stripe_device [at server_name] [density = density, capacity = number_kilobytes, file = file_name, dumpvolume = volume_name]]... |
Options that apply to entire dump |
[with { density = density, blocksize = number_bytes, capacity = number_kilobytes, file = file_name, [nodismount | dismount], [nounload | unload], [retaindays = number_days], [noinit | init], file = file_name, dumpvolume = volume_name standby_access |
[with { density = density, blocksize = number_bytes, capacity = number_kilobytes, file = file_name, [nodismount | dismount], [nounload | unload], [retaindays = number_days], [noinit | init], file = file_name, dumpvolume = volume_name, standby_access |
Do not truncate log |
no_truncate |
|
Message destination |
[, notify = {client | operator_console}]}] |
[, notify = {client | operator_console}]}] |
Table 27-2 shows the syntax for loading a database, applying transactions from the log, and returning information about dump headers and files.
Information provided |
Task |
|
---|---|---|
Load database or apply recent transactions |
Return header or file information but do not load backup |
|
Command |
load {database | transaction} |
load {database | transaction} |
Database name |
database_name |
database_name |
Compression |
from [compress::] |
from [compress::] |
Dump device |
stripe_device |
stripe_device |
Remote Backup Server |
[at server_name] |
[at server_name] |
Tape device characteristics |
[density = density, |
[density = density, |
Volume name |
[, dumpvolume = volume_name] |
[, dumpvolume = volume_name] |
File name |
[, file = file_name] |
[, file = file_name] |
Characteristics of additional devices (up to 31 devices; one set per device) |
[stripe on [compress::]stripe_device [at server_name] [density = density, file = file_name, dumpvolume = volume_name]]... |
[stripe on [compress::]stripe_device [at server_name] [density = density, file = file_name, dumpvolume = volume_name]]... |
Tape handling |
[with{ [density = density, dumpvolume = volume_name, file = file_name, [nodismount | dismount], [nounload | unload] |
[with{ [density = density, dumpvolume = volume_name, file = file_name, [nodismount | dismount], [nounload | unload] |
Provide header information |
[, headeronly] |
|
List dump files |
[, listonly [= full]] |
|
Message destination |
[, notify = {client | operator_console}]}] |
[, notify = {client | operator_console}]}] |
Do not load open transactions |
standby_access |
Table 27-3 shows the syntax for truncating a log:
That is not on a separate segment
Without making a backup copy
With insufficient free space to successfully complete a dump transaction or dump transaction with truncate_only command
Information provided |
Task |
||
---|---|---|---|
Truncate log on same segment as data |
Truncate log without making a copy |
Truncate log with insufficient free space |
|
Command |
dump transaction |
dump transaction |
dump transaction |
Database name |
database_name |
database_name |
database_name |
Do not copy log |
with truncate_only |
with truncate_only |
with no_log |
The remainder of this chapter provides greater detail about the information specified in dump and load commands and volume change messages. Routine dumps and loads are described first, followed by log dumps after device failure and the special syntax for truncating logs without making a backup copy.
For information about the permissions required to execute the dump and load commands, refer to “Designating responsibility for backups”.