IBM Support

DB2 Backup fails with SQL2048N RC 4 when the recovery history file is corrupted.

Troubleshooting


Problem

DB2 Backup fails with SQL2048N RC 4 when the recovery history file is corrupted

Symptom

Following errors will be noticed in the db2diag.log about DB2 Backup failure due to damaged history file:


2014-06-21-00.32.19.304000-420 I85598107H614 LEVEL: Error          
PID     : 2580                 TID  : 6948        PROC : db2syscs.exe              
INSTANCE: DB2                  NODE : 000         DB   : SAMPLE                    
APPHDL  : 0-6998               APPID: XXXX                      
AUTHID  : TEST                                                                    
EDUID   : 6948                 EDUNAME: db2bm.4380.0 (SAMPLE)                      
FUNCTION: DB2 UDB, database utilities, sqluhVerifyHistoryFiles,                    
probe:254                                                                          
MESSAGE : SQL2161N A damaged recovery history file could not be fixed.            
The                                                                                
          specified action failed.                                                
DATA #1 : String, 48 bytes                                                        
Error encountered in verifying the history file.                                  
                                                                                   
2014-06-21-00.32.19.304000-420 E85598723H640      LEVEL: Severe                    
PID     : 2580                 TID  : 6948        PROC : db2syscs.exe              
INSTANCE: DB2                  NODE : 000         DB   : SAMPLE                    
APPHDL  : 0-6998               APPID: XXXX                      
AUTHID  : TEST                                                                    
EDUID   : 6948                 EDUNAME: db2bm.4380.0 (SAMPLE)                      
FUNCTION: DB2 UDB, database utilities, sqlubProcessHistoryFile,                    
probe:484                                                                          
DATA #1 : Sqlcode, PD_TYPE_SQLCODE, 4 bytes                                        
-2048                                                                              
DATA #2 : Hexdump, 21 bytes                                                        
0x39611714 : 00F8 FFFF 6462 3272 6869 7374 2E61 7363    ....db2rhist.asc          
0x39611724 : 0004 0000 00                               .....                      
                                                                                   
2014-06-21-00.32.19.304000-420 E85599365H961      LEVEL: Severe                    
PID     : 2580                 TID  : 6948        PROC : db2syscs.exe              
INSTANCE: DB2                  NODE : 000         DB   : SAMPLE                    
APPHDL  : 0-6998               APPID: XXXX                      
AUTHID  : TEST                                                                    
EDUID   : 6948                 EDUNAME: db2bm.4380.0 (SAMPLE)                      
FUNCTION: DB2 UDB, database utilities, sqlubProcessHistoryFile,                    
probe:484                                                                          
MESSAGE : SQL2048N An error occurred while accessing object "". Reason            
code:                                                                              
          "".                                                                      
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes                                      
 sqlcaid : SQLCA     sqlcabc: 136   sqlcode: -2048   sqlerrml: 14                  
 sqlerrmc: db2rhist.asc 4                                                          
 sqlerrp : sqlubPro                                                                
 sqlerrd : (1) 0x00000000      (2) 0x00000000      (3) 0x00000000                  
           (4) 0x00000000      (5) 0x00000000      (6) 0x00000000                  
 sqlwarn : (1)      (2)      (3)      (4)        (5)       (6)                    
           (7)      (8)      (9)      (10)        (11)                            
 sqlstate:                                                                        
                                                                                   
2014-06-21-00.32.19.304000-420 E85600328H553      LEVEL: Severe                    
PID     : 2580                 TID  : 6948        PROC : db2syscs.exe              
INSTANCE: DB2                  NODE : 000         DB   : SAMPLE                    
APPHDL  : 0-6998               APPID: XXXX                      
AUTHID  : TEST                                                                    
EDUID   : 6948                 EDUNAME: db2bm.4380.0 (SAMPLE)                      
FUNCTION: DB2 UDB, database utilities, sqlubbuf, probe:327                        
DATA #1 : Sqlcode, PD_TYPE_SQLCODE, 4 bytes                                        
-2044                                                                              
DATA #2 : Hexdump, 8 bytes                                                        
0x39611714 : 04F8 FFFF 0200 0000                        ........                  
                                                                                   
2014-06-21-00.32.19.772000-420 E85600883H433      LEVEL: Severe                    
PID     : 2580                 TID  : 4380        PROC : db2syscs.exe              
INSTANCE: DB2                  NODE : 000         DB   : SAMPLE                    
APPHDL  : 0-6998               APPID: XXXX                      
AUTHID  : TEST                                                                    
EDUID   : 4380                 EDUNAME: db2agent (SAMPLE)                          
FUNCTION: DB2 UDB, database utilities, sqlubcka, probe:848                        
MESSAGE : Backup terminated.    

Cause

Damaged history file - db2rhist.asc

Resolving The Problem


Rename or move the db2rhist.asc and db2rhist.bak files under the Database directory.

Example:

- cd ~/db2inst1/db2inst1/NODE0000/SQL00001
- mv db2rhist.asc db2rhist_backup.asc
- mv db2rhist.bak db2rhist_backup.bak
- The db2rhist.asc and db2rhist.bak files will be automatically created when ever we next run a backup, restore, load a table, reorganize a table and alter a table space.


Related Information

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Recovery - Logging","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.7;9.5;10.1;10.5","Edition":"Advanced Enterprise Server;Advanced Workgroup Server;Enterprise Server;Express;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21677560