Difference between revisions of "Recovery as Normal Files(SAP MaxDB)"
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Below documentation shows how to restore SAP MaxDB data after it has been recovered as normal files using steps as shown in [[ Recovery as Normal Files | Recovery as Normal Files ]]. Please recover the SAP MaxDB data and log file. Once you have the files, please follow the steps to restore. | + | Below documentation shows how to restore SAP MaxDB data after it has been recovered as normal files using steps as shown in [[ Recovery as Normal Files(FileSystem) | Recovery as Normal Files ]]. Please recover the SAP MaxDB data and log file. Once you have the files, please follow the steps to restore. |
We are demonstrating recovery of data file (shown in below picture) in examples but same procedure could be followed for log backup recovery. | We are demonstrating recovery of data file (shown in below picture) in examples but same procedure could be followed for log backup recovery. | ||
Line 61: | Line 61: | ||
− | e.g. In our case we have copied the mediumRestore data file to the DATA CONTENT location and renamed it to DAT0001 | + | e.g. In our case we have copied the mediumRestore data file to the DATA CONTENT location and renamed it to DAT0001. |
+ | |||
+ | {| class="wikitable" style="padding-left: 20px; color:#FFFFFF; background-color: black; width: 800px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; " | ||
+ | | | ||
+ | dbmcli.exe on MAXDB>db_admin | ||
+ | OK | ||
+ | |||
+ | --- | ||
+ | dbmcli.exe on MAXDB>service_connect | ||
+ | OK | ||
+ | |||
+ | --- | ||
+ | dbmcli.exe on MAXDB>recover_check d1 DATA | ||
+ | OK | ||
+ | Returncode 0 | ||
+ | Date 20201103 | ||
+ | Time 00093853 | ||
+ | Server NBU-SAPMaxDB | ||
+ | Database MAXDB | ||
+ | Kernel Version Kernel 7.9.09 Build 005-123-259-005 | ||
+ | Pages Transferred 616 | ||
+ | Pages Left 0 | ||
+ | Volumes 1 | ||
+ | Medianame d1 | ||
+ | Location C:\MaxDB\Backup\DAT0001 | ||
+ | Errortext | ||
+ | Label DAT_000000013 | ||
+ | Is Consistent true | ||
+ | First LOG Page 29792 | ||
+ | Last LOG Page | ||
+ | DB Stamp 1 Date 20190121 | ||
+ | DB Stamp 1 Time 00112051 | ||
+ | DB Stamp 2 Date | ||
+ | DB Stamp 2 Time | ||
+ | Page Count 598 | ||
+ | Devices Used 1 | ||
+ | Database ID NBU-SAPMaxDB:MAXDB_20190121_112051 | ||
+ | Max Used Data Page 0 | ||
+ | Converter Page Count 10 | ||
+ | |||
+ | --- | ||
+ | dbmcli.exe on MAXDB> | ||
+ | |} | ||
+ | |||
+ | |||
+ | ==='''Step 5'''=== | ||
+ | If the outputs from these commands show a return code of 0, the information was checked successfully. | ||
+ | |||
+ | To start the restore of this data, use the following commands; | ||
+ | |||
+ | {| class="wikitable" style="padding-left: 20px; color:#FFFFFF; background-color: black; width: 800px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; " | ||
+ | | | ||
+ | dbmcli on DB1> service_release | ||
+ | dbmcli on DB1> db_connect | ||
+ | dbmcli on DB1> recover_start <backup_template> <backup_type> | ||
+ | |} | ||
+ | |||
+ | e.g. We ran our restore and it's return code is also 0 , so our restore is successful. | ||
+ | {| class="wikitable" style="padding-left: 20px; color:#FFFFFF; background-color: black; width: 800px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; " | ||
+ | | | ||
+ | dbmcli.exe on MAXDB>service_release | ||
+ | OK | ||
+ | |||
+ | --- | ||
+ | dbmcli.exe on MAXDB>db_connect | ||
+ | OK | ||
+ | |||
+ | --- | ||
+ | dbmcli.exe on MAXDB>recover_start d1 DATA | ||
+ | OK | ||
+ | Returncode 0 | ||
+ | Date 20201103 | ||
+ | Time 00094127 | ||
+ | Server NBU-SAPMaxDB | ||
+ | Database MAXDB | ||
+ | Kernel Version Kernel 7.9.09 Build 005-123-259-005 | ||
+ | Pages Transferred 616 | ||
+ | Pages Left 0 | ||
+ | Volumes 1 | ||
+ | Medianame d1 | ||
+ | Location C:\MaxDB\Backup\DAT0001 | ||
+ | Errortext | ||
+ | Label DAT_000000013 | ||
+ | Is Consistent true | ||
+ | First LOG Page 29792 | ||
+ | Last LOG Page | ||
+ | DB Stamp 1 Date 20190121 | ||
+ | DB Stamp 1 Time 00112051 | ||
+ | DB Stamp 2 Date | ||
+ | DB Stamp 2 Time | ||
+ | Page Count 598 | ||
+ | Devices Used 1 | ||
+ | Database ID NBU-SAPMaxDB:MAXDB_20190121_112051 | ||
+ | Max Used Data Page 0 | ||
+ | Converter Page Count 10 | ||
+ | |||
+ | --- | ||
+ | |} | ||
+ | |||
+ | |||
+ | [[ DP/DataProtector Recovery | Return to DP/DataProtector Recovery ]] |
Latest revision as of 14:27, 30 November 2020
Below documentation shows how to restore SAP MaxDB data after it has been recovered as normal files using steps as shown in Recovery as Normal Files . Please recover the SAP MaxDB data and log file. Once you have the files, please follow the steps to restore.
We are demonstrating recovery of data file (shown in below picture) in examples but same procedure could be followed for log backup recovery.
Step 1
Create a database session to the database.
dbmcli -u <database_user>,<database_password> -d <database_name>
e.g. In our case database name is MAXDB.
C:\Program Files\sdb\globalprograms\pgm>dbmcli.exe -u dbadmin,Password1 -d MAXDB dbmcli.exe on MAXDB> |
Step 2
Create a backup template. The format to follow will be;
- backup_template_create <backup_template> to <backup_destination> <backup_content>
dbmcli on DB1> backup_template_create d1 to FILE C:\MaxDB\Backup\DAT0001 CONTENT DATA |
Step 3
If you are also restoring logs then create a template for the log too.
dbmcli on DB1> backup_template_create l1 to FILE C:\MaxDB\Backup\LOG CONTENT LOG |
Step 4
Copy the recovered files to the location of the templates.
Check if the backup can be accessed and that data reading will work. A service session is requires as follows;
dbmcli on DB1> db_admin dbmcli on DB1> service_connect dbmcli on DB1> recover_check d1 DATA |
e.g. In our case we have copied the mediumRestore data file to the DATA CONTENT location and renamed it to DAT0001.
dbmcli.exe on MAXDB>db_admin OK --- dbmcli.exe on MAXDB>service_connect OK --- dbmcli.exe on MAXDB>recover_check d1 DATA OK Returncode 0 Date 20201103 Time 00093853 Server NBU-SAPMaxDB Database MAXDB Kernel Version Kernel 7.9.09 Build 005-123-259-005 Pages Transferred 616 Pages Left 0 Volumes 1 Medianame d1 Location C:\MaxDB\Backup\DAT0001 Errortext Label DAT_000000013 Is Consistent true First LOG Page 29792 Last LOG Page DB Stamp 1 Date 20190121 DB Stamp 1 Time 00112051 DB Stamp 2 Date DB Stamp 2 Time Page Count 598 Devices Used 1 Database ID NBU-SAPMaxDB:MAXDB_20190121_112051 Max Used Data Page 0 Converter Page Count 10 --- dbmcli.exe on MAXDB> |
Step 5
If the outputs from these commands show a return code of 0, the information was checked successfully.
To start the restore of this data, use the following commands;
dbmcli on DB1> service_release dbmcli on DB1> db_connect dbmcli on DB1> recover_start <backup_template> <backup_type> |
e.g. We ran our restore and it's return code is also 0 , so our restore is successful.
dbmcli.exe on MAXDB>service_release OK --- dbmcli.exe on MAXDB>db_connect OK --- dbmcli.exe on MAXDB>recover_start d1 DATA OK Returncode 0 Date 20201103 Time 00094127 Server NBU-SAPMaxDB Database MAXDB Kernel Version Kernel 7.9.09 Build 005-123-259-005 Pages Transferred 616 Pages Left 0 Volumes 1 Medianame d1 Location C:\MaxDB\Backup\DAT0001 Errortext Label DAT_000000013 Is Consistent true First LOG Page 29792 Last LOG Page DB Stamp 1 Date 20190121 DB Stamp 1 Time 00112051 DB Stamp 2 Date DB Stamp 2 Time Page Count 598 Devices Used 1 Database ID NBU-SAPMaxDB:MAXDB_20190121_112051 Max Used Data Page 0 Converter Page Count 10 --- |