Restoring the Database

About Restoring Database

The Restore option provides the function of a full database restore to an empty database.

This task explains the procedure to restore the database:

  1. Login as aspadm and run edm.sh from $EDS_HOME/bin directory. For additional information, see Using CES Database Manager.

  2. From the EDM main window, select a database that is to be restored.

  3. Select Administration > Restore Database option.

    The Restore Database window appears
    .

     

    Name Description

    Backup Directory

    The directory in which the backup files are stored.

    Backup File(s)

    The list of existing backups appears. Only one entry appears for each database backup (a single database backup may consist of several backup files). For additional information about the characteristics of the backup files, see Backing up the Database.

    Note:

    Use the Export / Import utility to restore a database that was backed up on a different workstation platform or different version of DB2, else you might get similar error while restoring the database:
       
    06-13-2003 09:03:49 RESTORE DB SS601AD2 FROM /u/DB2Dumps/DSRMStrSouPatch TAKEN AT 20021219203703 INTO TEST REDIRECT WITHOUT PROMPTING 06-13-2003 09:03:51 SQL2570N

    A database cannot be restored on a platform that does not match the platform on which the backup image was created.

  4. Click the Select backup dump link and select a backup file from the "<OS>_a/resources/sdm/sdmdb/db2" directory.

  5. Database backup of CES is available in the form of a compressed tar (SDMGOLD.tar.Z) file under the "<OS>_a/resources/sdm/sdmdb/db2" directory, where OS refers to distribution for given Operating System (e.g.: For windows, it is intel and aix for IBM AIX).

    Steps to extract the CES database backup

    a) Uncompress the file 'SDMGOLD.tar.Z' in "<OS>_a/resources/sdm/sdmdb/db2" directory
    For example: On unix, use the command to uncompress SDMGOLD.tar.Z

    b) Extract the file from 'SDMGOLD.tar' in "<OS>_a/resources/sdm/sdmdb/db2" directory
    For example, On unix, use the command tar xvf SDMGOLD.tar

  6. Click Select backup dump and select a backup file from the list.

  7. Click Next or Tablespace details and enter the physical directory under which the actual tablespace files will reside.

    The Tablespace details window appears
    .


    For example, if you enter the physical directory as /data/i2inst/i2inst8, then the tablespace files will reside in the /data/i2inst/i2inst8/
    <DB_NAME>
    directory.

    Ensure that you enter the values of Physical directories for SMS and DMS tablespaces.

    Click Update All or Update Selection.

  8. Either Click Finish or Restore Database to start restoring the database. This message appears:
    Click Yes to start restoring the database. This may take sometime.

    The Restore Database window appears.

  9. When the restore is completed successfully, this message appears:

    Database restored successfully.....

    If it is not completed successfully, an error message appears and you can check the log files under $EDS_HOME/log.

    Click View Summary, to view the summary.

    The Summary window appears
    .

Note: There is a known DB2 bug in the database restore operation. After the database is restored from an offline backup, you may encounter the following errors while trying to connect to the database:

SQL2036N The path for the file or device <Backup directory/<backup file name> is not valid.
OR
SQL2048N An error occurred while accessing object SQL PROCEDURE FILES.
Reason code: 7.

To workaround this problem, the instance owner must delete the directory <instance home>/sqllib/function/routine/sqlproc/<database name>. This problem is being fixed through APAR 1Y19652 at a future date.