Вы находитесь на странице: 1из 3

DB2: Restoring the Database of the SAP System (SAP Library - DB2 ...

http://help.sap.com/saphelp_wp/helpdata/en/b5/2502a7aba011d283e6...

DB2: Restoring the Database of the SAP System


Use
This section describes how to restore the SAP database if containers or tablespaces have become unusable.

Procedure
1. Copy log files. The restore database procedure deletes all log files with an active or online retained status. This is why you should copy these log files to another hard disk directory before you start the restore procedure.

a. Start the Windows NT command prompt by choosing Start Programs Command


Prompt. b. Change to the following directory: F:\db2\<sid>\log_dir c. Enter the following command: copy *.* c:\temp\*.* 2. Restore database.

a. Open the Control Center by choosing Start Programs DB2 for Windows NT
b. Administration Tools Control Center. Select the system (<SID>SAP), instance (DB2<SID>) and the database of the SAP System (<SID>). Click the right mouse button. Choose Restore Database. Choose the option Select an entry from the list. Then choose the most recent backup from the list by clicking it. Start the database restore procedure by clicking OK. The system displays a message informing you that a restore job has been created. Click OK. The system also informs you that the restore procedure is active. When the procedure is complete, you should update the database to the latest version by restoring the log files. 3. Restore the log files. When the database has been restored, you must restore the saved log files.

c.
d. e.

a. Start the Windows NT command prompt by choosing Start Programs Command


Prompt. b. Change to the following directory: c:\temp c. Enter the following command: copy *.log F:\db2\<sid>\log_dir\*.* 4. Roll-forward database recovery:

a. Open the Control Center by choosing Start Programs DB2 for Windows NT
Administration Tools Control Center. b. Select the system (<SID>SAP), instance (DB2<SID>) and the database of the SAP System (<SID>). Click the right mouse button.

1 of 3

2/27/2012 9:47 PM

DB2: Restoring the Database of the SAP System (SAP Library - DB2 ...

http://help.sap.com/saphelp_wp/helpdata/en/b5/2502a7aba011d283e6...

c. Choose Roll-forward. On the next menu, select: Roll-forward (reapply the logs) Roll-forward to the end of the logs d. Start the database restore procedure by clicking OK. The system informs you that a job (job number) has been created. When this job is complete, the system displays a job log from which you can see if the job was successful. If you have already deleted the log files which are required for restore, however, the system displays an error message. The error message contains the name of a missing log file. Make a note of this log file (for example, S0000855.LOG). You now have to restore (from tape) all saved log files, starting with the file contained in the error message. 5. Restore log files.

If you have not yet deleted any log files since the previous database backup, you may skip the next step.

a. Open the Control Center by choosing Start Programs DB2 for Windows NT
Administration Tools Control Center. b. Select the system (<SID>SAP), instance (DB2<SID>) and the database of the SAP System (<SID>). Click the right mouse button.

If you are not logged on as user db2<sid> a dialog box appears. Enter the password for user db2<sid>. c. Choose Logfile Management Restore. Then choose the Restore tab. You can now choose the log files you need to restore the database. d. As the First logfile choose the log file contained in the error message of step 4 (above). As the Last logfile choose the last file in the list. The Storage locations field displays the tape on which the log files are stored. e. Insert that tape into the tape drive for the log files. When the tape drive is ready, click Restore. f. Check if the log files were successfully restored. To do this, click the Journal tab. In the menu that appears, choose Restore. g. If the log files were successfully restored, repeat step 4. See also: For more information, see DB2: Restoring the Admin Database.

2 of 3

2/27/2012 9:47 PM

DB2: Restoring the Database of the SAP System (SAP Library - DB2 ...

http://help.sap.com/saphelp_wp/helpdata/en/b5/2502a7aba011d283e6...

3 of 3

2/27/2012 9:47 PM

Вам также может понравиться