SQL0902C A system error (reason code = "") occurred. Subsequent SQL statements cannot be processed. SQLSTATE=58005

Starting in DB2 V9.1 when you create a database, automatic storage tablespaces are created by default. Therefore, users may unknowingly create an “automatic storage database” when they first create the database. When the database is backed up with the intention to restore it under a new instance or on another server, users maybe unaware of the correct syntax to specify with the RESTORE DATABASE command. For example, a standard restore command like the following may fail:
db2 RESTORE DB db1 FROM e:backups

SQL0902C A system error (reason code = “”) occurred. Subsequent SQL
statements cannot be processed. SQLSTATE=58005

 

In the db2diag.log you may see messages similar to:


2009-09-01-10.11.12.130000-240 I1179349H458 LEVEL: Severe
PID : 2222 TID : 1111 PROC : db2syscs.exe
INSTANCE: DB2 NODE : 000
FUNCTION: DB2 UDB, buffer pool services, sqlbCopyStoragePathsFromDiskCB,
probe:20
MESSAGE : ZRC=0x87020002=-2029912062=SQLB_BPSE “Debug logic error
detected”
DIA8501C A buffer pool logic error has occurred.
DATA #1 : String, 29 bytes
Error copying paths from disk

2009-09-01-10.11.12.130000-240 I1179809H540 LEVEL: Severe
PID : 2222 TID : 1111 PROC : db2syscs.exe
INSTANCE: DB2 NODE : 000
FUNCTION: DB2 UDB, buffer pool services, sqlbReadStorageGroupEntry,
probe:30
MESSAGE : ZRC=0x87020002=-2029912062=SQLB_BPSE “Debug logic error
detected”
DIA8501C A buffer pool logic error has occurred.
DATA #1 : String, 38 bytes
Error reading from storage group files
DATA #2 : signed integer, 8 bytes
0
DATA #3 : Pointer, 4 bytes
0x03f7f054

2009-09-01-10.11.12.130000-240 I1183444H588 LEVEL: Severe
PID : 2222 TID : 1111 PROC : db2syscs.exe
INSTANCE: DB2 NODE : 000
FUNCTION: DB2 UDB, buffer pool services, sqlbInitStorageGroupTable,
probe:20
MESSAGE : ZRC=0x87020002=-2029912062=SQLB_BPSE “Debug logic error
detected”
DIA8501C A buffer pool logic error has occurred.
DATA #1 : String, 44 bytes
Failed to initialize the storage group table
DATA #2 : Pointer, 4 bytes
0x016e41d0
DATA #3 : Pointer, 4 bytes
0x016e898c
DATA #4 : Pointer, 4 bytes
0x03ed5c50

To correct this you must specify the “ON” clause with the RESTORE DATABASE command. The “ON” clause specifies the location where the automatic storage tablespaces will reside. Example:

db2 RESTORE DB db1 FROM e:backups ON e:autostoragepath

Furthermore, you can confirm you have automatic storage tablespaces by executing a tablespace snapshot or a “db2pd -db <dbname> -tablespaces” command.

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.