Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - Database Administration » Maintaining Your Database » Backup and data recovery » Recovering your database

 

Restore from an archive backup

The following procedure assumes that you do not have any incremental backups of the transaction log that you need to apply as part of the recovery process. For information about recovering a database when you have backed up multiple copies of the transaction log, see Recovering a database with multiple transaction logs.

♦  To restore a database from an archive backup (Sybase Central)
  1. Start a personal database server.

    For example, the following command starts a database server named restore:

    dbeng11 -n restore
  2. Start Sybase Central and connect to the utility database.

    1. On the Identification tab of the Connect window, enter a user ID of DBA and a password of sql. Leave all other fields on this tab blank.

    2. Click the Database tab and enter a database name of utility_db. Leave all other fields on this tab blank.

    3. Click OK.

  3. Choose Tools » SQL Anywhere 11 » Restore Database.

  4. Follow the instructions in the wizard.

♦  To restore a database from an archive backup (Interactive SQL)
  1. Start a personal database server.

    For example, the following command starts a database server named restore:

    dbeng11 -n restore
  2. Start Interactive SQL and connect to the utility database.

    1. On the Identification tab of the Connect window, enter a user ID of DBA and a password of sql. Leave all other fields on this tab blank.

    2. Click the Database tab and enter a database name of utility_db. Leave all other fields on this tab blank.

    3. Click OK.

  3. Execute the RESTORE DATABASE statement, specifying the archive root.

    At this time, you can choose to restore an archived database to its original location (the default), or to a different computer with different device names using the RENAME clause. See RESTORE DATABASE statement.

Example

The following statement restores a database from a tape archive to the database file c:\newdb\newdb.db.

RESTORE DATABASE 'c:\\newdb\\newdb.db'
FROM '\\\\.\\tape0';

The following statement restores a database from an archive backup in file c:\backup\archive.1 to the database file c:\newdb\newdb.db. The transaction log name and location are specified in the database.

RESTORE DATABASE 'c:\\newdb\\newdb.db'
FROM 'c:\\backup\\archive';
See also