Before you can restore a database, make sure that the following conditions are met:
You must have DBA privileges.
The server and database that you wish to restore must be shut down.
You must be connected to the utility_db database. For information on utility_db and how to set privileges for using it, see the Sybase IQ Installation and Configuration Guide for your platform. For instructions on starting utility_db, see “Creating a database with SQL”.
No user can be connected to the database being restored. RESTORE exits with an error if there are any active Read Only or Read/Write users of the specified database.
You must restore the database to the appropriate server, and that server must have the archive devices you need. When you use the Sybase-provided restore, you need the same number of archive devices (that is, the disk files or tape drives) as when the backup was created.
For a full restore, the Catalog Store (by default the .db file) and the transaction log (by default the .log file) must not exist in the location you are restoring to. If either of these files exists, you must delete it or move it to a different directory before doing the full restore.
When a full restore begins, it destroys all old database files and then recreates them. The requirement that you manually delete the Catalog Store and transaction log files protects you from doing a full restore accidentally.
For any incremental restore, the Catalog Store (.db) must exist. If it exists, but in a different location than the one you are restoring to, you must follow the procedure described in “Moving database files”. If it does not exist, you can only do a full restore. (If you do a full restore before any incremental restore, the correct files will be in place.)
For any incremental restore, the database must not have changed since the last restore.
For restoring a multiplex database, the server must be started with the multiplex override switch, -iqmpx_ov 1
Restore requires exclusive access to the database. The default database server startup option -gd DBA guarantees that only the DBA can start a database. To ensure exclusive access, start the database server with the -gd DBA option set, but do not start the database you are restoring. RESTORE automatically starts the database in such a way that no other users can connect to it.
You must restore an entire backup or set of backups. Restoring individual files is not supported. However, you can move database files to a new location, using the RENAME clause of the RESTORE command.