CHAPTER 11 Backup and Data Recovery
413
Keep the results of this query some place other than the disk where the database
resides, so that you will have a complete list of dbspace names if you need
them.
You can also run the following script in DBISQL. This script produces an
output file that contains the set of rename clauses you would use if you did not
actually change the location of any files. You can substitute any new file
locations, and use the resulting file in your
RESTORE statement.
Note Because the database may not exist when you need to restore, you may
want to run this script after you back up your database.
-- This select statement will get names of IQ dbspaces
and file names
-- and add rename syntax including quotes
select ’rename’ , dbspace_name , ’to’ ,’’’’ + file_name
+ ’’’’
from SYSFILE where store_type =’IQ’;
-- output to file in proper format
-- no delimiters and no additional quotes
output to restore.tst delimited by ’ ’ quote ’’;
--this produces a file restore.tst looking like this:
--rename IQ_SYSTEM_MAIN to ’/dev/rdsk/c2t0d1s7’
--rename IQ_SYSTEM_TEMP to ’/dev/rdsk/c2t1d1s7’
--rename IQ_SYSTEM_MSG to ’all_types.iqmsg’
Determining your data backup and recovery strategy
To develop an effective strategy for backing up your system, you need to
determine the best combination of full, incremental, and incremental-since-full
backups for your site, and then set up a schedule for performing backups.
Consider the performance implications of various backup options, and how
they affect your ability to restore quickly in the event of a database failure.