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.
Backing up a database or log |
Loading a database or log |
|
---|---|---|
|
|
|
Password Option |
|
|
|
|
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:
database_name – is the name of the database that is being dump or loaded.
file_name – is the name of the dump file.
password – is the password you provide to protect the dump file from unauthorized users.
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.
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"