Restoring a Master Database

The interactive Restore Master Database wizard provides option selections and prompts to restore master database.

Prerequisites
See Prerequisites for Restoring a Master Database
Task
When restoring a master database, these options are available:
  1. In the command window, start sybrestore without specifying parameters.
    You see:
    <<<<<<==== Restore Database Menu ====>>>>>>>
    
    u : Restore Master Database
    m : Restore Master Database
    
  2. Enter:
    m

    You see:

    <<<<<<====Master Restore Database Menu ====>>>>>>>
    
    e : Edit Resource Files
    c : Edit Restore Tool Configuration File
    r : Restore Master Database
    
  3. Enter:
    r

    You see the Restore Master Database wizard.

  4. You are prompted to confirm the name and location of the SAP ASE installation directory. The utility defaults to the same machine on which the utility is running. The restoremaster.cfg located in this directory is used to determine the resource files, SAP ASE configuration file, and dump history file that will be used to restore the master database.
  5. Provide the system administrator login name and password. The sa login name and password must match those saved in the master database dump file.
    The sybrestore ulitity automatically detects password protected master database dumps. You are only prompted for a password if the master database dump is password protected.
  6. (Optional) To rebuild the SAP ASE server, enter y at the prompt.
    The SAP ASE server and Backup Server are rebuilt using sybatch on Windows or srvbuildres on UNIX/Linux. For UNIX/Linux, sqllocres is executed to install languages, character sets and the configuration of the sort order.
  7. (Optional) If rebuilding the server, you are prompted to confirm the removal of system database devices files that are listed in the resource file.
    You are not prompted when using raw disk files. Providing an answer of no to dropping any of the system devices will exist the wizard.
  8. Enter y when prompted to reload the master database.
    The SAP ASE server is shut down and the SAP ASE configuration file and dump history file is copied to the new SAP ASE instance. The SAP ASE server is re-started in master recover mode.
    The size of master database defined in the resource file must be greater than or equal to the size of the master database of the dump file. After comparing the size of the master databases, the master database is loaded from the latest dump and the SAP ASE server is shut down and re-started in normal mode.
  9. The wizard automatically opens the Complete Database Restore Menu. You can restore one or more user databases and system databases with the exception of the master database.
    • Enter s to continue and restore user and system databases. Available source databases are displayed. Enter the number associated with the databases you want to restore. Enter q when finished selecting databases.
    • Enter q to quit out of the Complete Database Restore Menu.
  10. (Optional) You are prompted as to whether you want to do a disk reinit and disk refit to recover an missing database device and databases.
    If yes, the server is shut down and re-started in master recovery mode. For each device you must provide the:
    • Device name
    • Physical name
    • Device size
    • Device option: dsync, directio, or none
    When finished, enter n at the prompt, "Do you have additional device to reinit?" You are returned to the Master Database Restore Menu.