CHAPTER 11 Backup and Data Recovery
401
• To move any other database file, you use the
RENAME option.
Note The DBTRAN utility is not supported by Adaptive Server IQ because it
regenerates only those parts of the transaction log that are specific to Adaptive
Server Anywhere.
Example 2 — Moving
the Catalog Store
This example restores the same database as Example 1. In Example 2, however,
you move the Catalog Store file and any database files that were created
relative it. To do so, you replace the original file name with its new location,
c:\newdir, as follows:
RESTORE DATABASE ’c:\\newdir\\asiqnew.db’
FROM ’c:\\asiq\\backup1’
FROM ’c:\\asiq\\backup2’
Adaptive Server IQ moves database files other than the Catalog Store as
follows:
• If you specify a
RENAME clause, the file is moved to that location.
• If you do not specify a
RENAME clause, and the file was created using a
relative pathname, it is restored relative to the new location of that
database file. In other words, files originally created relative to the
SYSTEM dbspace, which holds the Catalog Store file, are restored relative
to the Catalog Store file. Files originally created relative to the
IQ_SYSTEM_MAIN dbspace, which holds the main IQ Store file, are
restored relative to the main IQ Store file.
• If you do not specify a
RENAME clause, and the file was created using an
absolute pathname, the file is restored to its original location.
In other words, if you want to move an entire database, you should specify in
a
RENAME clause the new location for every IQ dbspace in the database—
required, temporary, and user-defined. The SYSTEM dbspace is the only one
you do not include in a
RENAME clause.
If you only want to move some of the files, and overwriting the original files is
not a problem, then you only need to rename the files you actually want to
move.
You specify each dbspace_name as it appears in the
SYSFILE table. You
specify new_dbspace_path as the new raw partition, or the new full or relative
pathname, for that dbspace.
You cannot use the
RENAME option to specify a partial restore.