Dump and load command syntax

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:

NoteWhen 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.

Table 27-1: Syntax for routine dumps and log dumps after device failure

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.

Table 27-2: Syntax for load commands

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:

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”.