SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)
Table 5 Backup and Restore of SQL/MX and OSS Objects (continued)
RESTORE CommandBACKUP Command
SQL/MX or OSS
Object
Use OSS backup objects to restore program
executables or user modules in one or more sets
of OSS directories and subdirectories.
Does not automatically back up program
executables or user modules. You back up
program files or executables by specifying OSS
OSS program
executable file or
user module
backup objects. See “Backing Up and Restoring
Program Executables and User Modules”
(page 66).
A trigger cannot be restored with Backup and
Restore 2. To restore a trigger, run the OBEY
A trigger is automatically backed up when you
back up the associated catalog, schema, or
table.
Trigger
command file for the trigger generated by the
RESTORE SHOWDDL ON command. See
“Using the RESTORE SHOWDDL ON Option to
Re-Create Objects” (page 67).
A view cannot be restored with Backup and
Restore 2. To restore a view, run the OBEY
A view is automatically backed up when you
back up the associated catalog or schema.
View
command file for the view generated by the
RESTORE SHOWDDL ON command. See
“Using the RESTORE SHOWDDL ON Option to
Re-Create Objects” (page 67).
A sequence generator is automatically restored
when you restore its associated catalog or
schema.
A sequence generator is automatically backed
up when you back up its associated catalog or
schema.
Sequence
Generator
Frequency of Backups
Although you cannot know with certainty whether you will ever need to use your backup tapes,
you should schedule backups regularly as a general precaution. In addition, you should back up
affected volumes or possibly the entire system when special events take place, such as equipment
changes, configuration changes, and major software changes.
NOTE: You can use the BRCOM BACKUP command to back up all supported SQL/MX objects
(all catalogs and all subordinate objects) on your system with the “CAT[ALOG] *” SQL/MX object
specification.
Daily Backups
To provide a high degree of protection, you can use Backup and Restore 2 to perform daily
backups. Then the maximum amount of data lost from a failure never exceeds one working day.
A daily backup should either be a full backup of all database objects or a limited backup of specific
objects. If you use limited daily backups, you should also perform periodic full backups, as explained
in “Periodic Full Backups” (page 63).
Periodic Full Backups
A full backup performed periodically might be adequate for protecting your database. The time
between periodic backups should not exceed the maximum amount of work that would be
acceptable to lose or redo if a catastrophic failure occurred.
This command performs a full backup on all database objects:
BR> BACKUP $tape-drive, (MX(CATALOG*));
Daily Timestamp Backups
For large databases, a full backup can be inefficient. For some applications, the amount of change
to database files is uneven. Some files might change frequently, while other files seldom change
from day to day.
Using Backup and Restore 2 for SQL/MX Database Recovery 63










