Dumping and loading databases with password protection

You can protect your database dump from unauthorized loads using the password parameter of the dump database command. If you include the password parameter when you make a database dump, you must also include this password when you load the database.

Table 12-17 shows the syntax for tape handling options.

Table 12-17: Password options

Backing up a database or log

Loading a database or log

dump {database | tran} database_name  to [compress::[compression_level::]]    stripe_device   [at backup_server_name]   [density = density,    blocksize = number_bytes,    capacity = number_kilobytes,    dumpvolume = volume_name,    file = file_name]  [stripe on   [compress::[compression_level::]]    stripe_device   [at backup_server_name]   [density = density,    blocksize = number_bytes,    capacity = number_kilobytes,    dumpvolume = volume_name,    file = file_name] ...]  [with{    density = density,    blocksize = number_bytes,    compression = compress_level,    capacity = number_kilobytes,    dumpvolume = volume_name,    file = file_name,    [nodismount | dismount],    [nounload | unload],    retaindays = number_days,    [noinit | init],

load {database | tran} database_name  from [compress::]stripe_device   [at backup_server_name]   [density = density,    dumpvolume = volume_name    file = file_name]    [compress::]stripe_device    [at backup_server_name]    [density = density,    dumpvolume = volume_name,    file = file_name] ...]  [with{    density = density,    compression,    dumpvolume = volume_name,    file = file_name,    nodismount | dismount],    [nounload | unload],

Password Option

   passwd = password,

   passwd = password,

   standby_access}    [notify = {client |       operator_console}]]

   [notify = {client |       operator_console}]

The partial syntax for the password-protected dump database and load database commands are:

dump database database_name to file_name 
	[ with passwd = password ]
load database database_name from file_name 
	[ with passwd = password ]

Where:

Your password must be between 6 and 30 characters long. If you provide a password that is less than 6 or greater than 30 characters, Adaptive server issues an error message. If you issue an incorrect password when you attempt to load the database, Adaptive Server issues an eror message and the command fails.

Examples

Example 1 Uses the password “bluesky” to protect the database dump of the pubs2 database:

dump database pubs2 to "/Syb_backup/mydb.db" with passwd = "bluesky"

Example 2 Loads the database dump using the same password:

load database pubs2 from "/Syb_backup/mydb.db" with passwd = "bluesky"