Using the interactive command line

StepsRestoring a database

  1. In the command window, start sybrestore:

    sybrestore -Usa -P -serverName:portNumber
    

    Once the Restore Database wizard starts, you see the Restore Database menu.

    <<<<<<====Restore Database 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. Enter:

    g
    

    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.

  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. See “Providing a mapping directory”.

  5. Specify whether the name of the target database is the same as the source database:

  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:

    NoteProvide 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. See “Compatibility geometry check”.

    In Adaptive Server 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:

  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.

StepsRestoring a database to a point in time

  1. In the command window, start sybrestore.

    sybrestore -Usa -P -serverName -t
    

    Once the Restore Database wizard starts, you see the Restore Database menu.

    <<<<<<====Restore Database Menu ====>>>>>>>
    
    s : Select Database
    t : Target Server
    r : Recreate Database
    i : Point-In-Time
    c : Check Geometry
    o : Online Database
    p : Preview
    g : Go
    
  2. Enter:

    g
    

    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.

  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. See “Providing 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.

  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. The dates and times of the dumped database are given.

    First, specify the range of time from which to restore the database. You then see the low and high time ranges. Specify a point in time that falls within the available range. See “Restore to a point-in-time example”.

  8. A geometry check is performed. See “Compatibility geometry check” for more information. If dump files do not exist or the geometry check fails, the session is terminated.

  9. Specify whether to bring the database online after the restore.

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

  10. Specify whether you want to execute the SQL.

    You see any progress or error messages.