Difference between revisions of "Recovery as Normal Files(DB2)"
(Created page with " Below documentation shows how to restore DB2 data after it has been recovered as normal files using steps as shown in Recovery as Normal Files(FileSystem) | Recovery as No...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
Recovered filename will have a naming convention as shown below. | Recovered filename will have a naming convention as shown below. | ||
− | e.g. SAMPLE.0.DB2.NODE0000. | + | e.g. SAMPLE.0.DB2.NODE0000.CATN0000.20210105171743.001 |
Database Name = Sample | Database Name = Sample | ||
Instance Name = DB2 | Instance Name = DB2 | ||
− | Timestamp = | + | Timestamp = 20210105171743 |
Catalog Name = CATN000 | Catalog Name = CATN000 | ||
− | |||
− | |||
We are demonstrating recovery for SAMPLE database (shown in below picture). | We are demonstrating recovery for SAMPLE database (shown in below picture). | ||
Line 21: | Line 19: | ||
{|style="padding: 5px; width: 85%;" | {|style="padding: 5px; width: 85%;" | ||
− | | style="width: 1%;"|[[File:Note.png|30px]]|| style="padding: 10px; width: 85%;"|'''Note:''' There are more ways to perform DB2 restore. | + | | style="width: 1%;"|[[File:Note.png|30px]]|| style="padding: 10px; width: 85%;"|'''Note:''' There are more ways to perform DB2 restore.For more detailed information please refer to the DB2 Restore Documentation. |
− | For more detailed information please refer to the DB2 Restore Documentation. | ||
| | | | ||
|} | |} | ||
− | + | Once you have the files, please follow the steps to restore. | |
===Step 1=== | ===Step 1=== | ||
Line 48: | Line 45: | ||
{| class="wikitable" style="padding-left: auto; color:#FFFFFF; background-color: black; width: 1100px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; | {| class="wikitable" style="padding-left: auto; color:#FFFFFF; background-color: black; width: 1100px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; | ||
| | | | ||
− | db2 => restore database sample from "C:\ | + | db2 => restore database sample from "C:\Temp\RestoredData" taken at 20210105171743 with 2 buffers buffer 1024 parallelism 1 without prompting |
SQL2540W Restore is successful, however a warning "2539" was encountered during Database Restore while processing in No Interrupt mode. | SQL2540W Restore is successful, however a warning "2539" was encountered during Database Restore while processing in No Interrupt mode. | ||
|} | |} | ||
Line 56: | Line 53: | ||
===Step 3=== | ===Step 3=== | ||
− | + | Roll the logs forward to the end of the backup to make sure the database is in a consistent state. | |
+ | {| class="wikitable" style="padding-left: auto; color:#FFFFFF; background-color: black; width: 1100px; FONT-FAMILY:monospace,monospace; LINE-HEIGHT:15px; white-space: pre-wrap; | ||
+ | | | ||
+ | db2 => rollforward db sample to end of backup | ||
− | + | Rollforward Status | |
+ | Input database alias = sample | ||
+ | Number of nodes have returned status = 1 | ||
− | + | Node number = 0 | |
+ | Rollforward status = DB working | ||
+ | Next log file to be read = S0000000.LOG | ||
+ | Log files processed = - | ||
+ | Last committed transaction = 2021-01-05-17.17.46.000000 UTC | ||
+ | DB20000I The ROLLFORWARD command completed successfully. | ||
+ | |} | ||
− | + | '''Note :''' If log files are not included in backup images, the rollforward recovery needs to be done as per the method used for backing up logs. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[ DP/DataProtector Recovery | Return to DP/DataProtector Recovery ]] | [[ DP/DataProtector Recovery | Return to DP/DataProtector Recovery ]] |
Latest revision as of 09:56, 6 January 2021
Below documentation shows how to restore DB2 data after it has been recovered as normal files using steps as shown in Recovery as Normal Files . Please recover the DB2 database files.
Recovered filename will have a naming convention as shown below.
e.g. SAMPLE.0.DB2.NODE0000.CATN0000.20210105171743.001
Database Name = Sample Instance Name = DB2 Timestamp = 20210105171743 Catalog Name = CATN000
We are demonstrating recovery for SAMPLE database (shown in below picture).
Note: There are more ways to perform DB2 restore.For more detailed information please refer to the DB2 Restore Documentation. |
Once you have the files, please follow the steps to restore.
Step 1
Login to DB2 Server and connect to the SAMPLE database.
db2 => connect to sample Database Connection Information Database server = DB2/NT64 9.7.0 SQL authorization ID = ADMINIST... Local database alias = SAMPLE |
Step 2
db2 => restore database sample from "C:\Temp\RestoredData" taken at 20210105171743 with 2 buffers buffer 1024 parallelism 1 without prompting SQL2540W Restore is successful, however a warning "2539" was encountered during Database Restore while processing in No Interrupt mode. |
Step 3
Roll the logs forward to the end of the backup to make sure the database is in a consistent state.
db2 => rollforward db sample to end of backup Rollforward Status Input database alias = sample Number of nodes have returned status = 1 Node number = 0 Rollforward status = DB working Next log file to be read = S0000000.LOG Log files processed = - Last committed transaction = 2021-01-05-17.17.46.000000 UTC DB20000I The ROLLFORWARD command completed successfully. |
Note : If log files are not included in backup images, the rollforward recovery needs to be done as per the method used for backing up logs.