Restoring User and System Databases

Follow these steps to restore user and system databases, with the exception of the master database.

  1. Start sybrestore:
    • To restore a user database, enter:
      sybrestore -Usa -P -ShostName:portNumber
    • To restore both user and system databases, enter:
      sybrestore -Usa -P -ShostName:portNumber -s
    You see the Complete Database Restore menu.
    <<<<<<====Complete Database Restore Menu ====>>>>>>>
    s : Select Database
    t : Target Server
    r : Recreate Database
    e : Use External Dump
    c : Check Geometry
    d : Dump Directory
    o : Online Database
    p : Preview
    g : Go
  2. To proceed through the menu, enter:

    You see a list of available source databases.

  3. Select a database by entering the number associated with the database or the name of the database.

    You must provide the password for dump files that are password protected.

  4. Specify whether the target server to be restored is the same as the source server.

    If the target server is not the same as the source server, you are prompted to specify a target server by providing the server name (or hostname:port number), login, and password. You can then provide a mapping directory.

  5. Specify whether the name of the target database is the same as the source database:
    • If the target database name is not the same as the source database name, select a target database.

    • If the target database does not exist, a database is created, and you must specify devices and devices sizes and log devices and log sizes.

    • If the database is offline and its devices do not exist, you are prompted to reinitialize the database devices.

  6. Specify whether to drop and re-create the database.

    When re-creating the database, you are prompted to specify devices and devices sizes, and log devices and log sizes.

  7. If you choose to restore the database from dump history files, specify whether to use the current dump files or external dump files.

    If you are using external backup files to restore the database:

    • Specify the archive directory for the dump database file location and the dump database file name, including respective stripe names.

    • Specify the dump transaction log file location and multiple dump transaction log file names, including respective stripes names.

    Note: Provide the transaction log files in the same time sequence as they were dumped.

    If you have selected dump history files, a geometry check verifies that the database dump can be loaded successfully into the target database.

    In SAP ASE versions 15.7 ESD #2 and earlier, specify external dump files; no geometry check is performed.

  8. Specify whether to dump the last transaction of the source database, provided that:
    • The status of the database is not "for load," or "offline."

    • The database passes the tran_dumpable_status check.

  9. Use the archive directory as the location of the dump directory, or specify a different location for dumping the transaction.
  10. Specify whether to bring the database online after the restore.

    You see a preview of the SQL statements to be executed for restoring the database.

  11. Specify whether to execute the SQL.

    You see any progress or error messages.

Related concepts
Providing a Mapping Directory
Compatibility Geometry Check