Recovery as Normal Files(SAP MaxDB)
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> |