我是靠谱客的博主 真实棒棒糖,最近开发中收集的这篇文章主要介绍db2不一致状态恢复,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

[db2inst1@linux1 db2dump]$ db2 connect to sample
SQL1015N  The database is in an inconsistent state.  SQLSTATE=55025
[db2inst1@linux1 db2dump]$ db2 ? SQL1015N


SQL1015N  The database is in an inconsistent state.

Explanation:

The possible causes of the inconsistent state include:

1       

         The database is offline as a result of an abnormal termination
         of the previous session (for example, a power failure).


2       

         If the error was encountered when issuing the db2ckupgrade
         command:

         
         *  The database is online and SQL has been issued which
            modified data in the database.
         *  The database is online and HADR has been enabled.

User response:

Depending on the cause, the following apply:

1       

         Restart the database using the RESTART DATABASE command. In a
         partitioned database server environment, the command must be
         issued on all nodes. You may wish to warn users that database
         recovery needs to complete before the database becomes
         available.


2       

         Perform. a clean shutdown of the database. After shutdown, if
         HADR has been enabled on the database, issue the STOP HADR
         command on the database. Then re-issue the db2ckupgrade
         command.

sqlcode: -1015

 sqlstate: 55025

[db2inst1@linux1 db2dump]$ db2 deactivate db sample
SQL1496W  Deactivate database is successful, but the database was not
activated.
[db2inst1@linux1 db2dump]$ db2 activate db sample
SQL1015N  The database is in an inconsistent state.  SQLSTATE=55025
[db2inst1@linux1 db2dump]$ db2 restart db sample
DB20000I  The RESTART DATABASE command completed successfully.
[db2inst1@linux1 db2dump]$ db2 activate db sample
SQL1493N  The application is already connected to an active database.
[db2inst1@linux1 db2dump]$
[db2inst1@linux1 db2dump]$ more db2diag.log

2011-02-11-12.06.47.999360+480 I1G1700            LEVEL: Event
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-12                 APPID: 130.30.3.214.54027.110211040646
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, RAS/PD component, pdLogInternal, probe:120
START   : New Diagnostic Log file
DATA #1 : Build Level, 128 bytes
Instance "db2inst1" uses "32" bits and DB2 code release "SQL09071"
with level identifier "08020107".
Informational tokens are "DB2 v9.7.0.1", "s091114", "IP23033", Fix Pack "1".
DATA #2 : System Info, 436 bytes
System: Linux linux1 6 2 i686
CPU: total:1 online:1 Cores per socket:1 Threading degree per core:1
Physical Memory(MB): total:377 free:20
Virtual  Memory(MB): total:1405 free:947
Swap     Memory(MB): total:1028 free:927
Kernel   Params: msgMaxMessageSize:65535 msgMsgMap:65536 msgMaxQueueIDs:1024
                 msgNumberOfHeaders:65536 msgMaxQueueSize:65536
                 msgMaxSegmentSize:16 shmMax:268435456 shmMin:1 shmIDs:4096
                 shmSegments:4096 semMap:256000 semIDs:1024 semNum:256000
                 semUndo:256000 semNumPerID:250 semOps:32 semUndoSize:20
                 semMaxVal:32767 semAdjustOnExit:32767
Cur cpu time limit (seconds)  = 0xFFFFFFFF
Cur file size limit (bytes) = 0xFFFFFFFF
Cur data size (bytes)  = 0xFFFFFFFF
Cur stack size (bytes)  = 0xFFFFFFFF
Cur core size (bytes)  = 0x00000000
Cur memory size (bytes) = 0xFFFFFFFF
nofiles (descriptors)  = 0x0000FFFE

Information in this record is only valid at the time when this file was
created (see this record's time stamp)

2011-02-11-12.06.47.999137+480 I1702G513          LEVEL: Severe
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-12                 APPID: 130.30.3.214.54027.110211040646
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::FirstConnect, probe:125
DATA #1 : Hexdump, 4 bytes
0x1093AE90 : 09FC FFFF                                  ....

2011-02-11-12.06.48.172680+480 E2216G471          LEVEL: Event
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-12                 APPID: 130.30.3.214.54027.110211040646
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (idle) 0
FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::TermDbConnect, probe:2000
STOP    : DATABASE: SAMPLE   : DEACTIVATED: NO

2011-02-11-12.07.01.661896+480 I2688G510          LEVEL: Severe
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-14                 APPID: *LOCAL.db2inst1.110211040701
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::FirstConnect, probe:125
DATA #1 : Hexdump, 4 bytes
0x1093AE90 : 09FC FFFF                                  ....

2011-02-11-12.07.01.762679+480 E3199G468          LEVEL: Event
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-14                 APPID: *LOCAL.db2inst1.110211040701
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (idle) 0
FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::TermDbConnect, probe:2000
STOP    : DATABASE: SAMPLE   : DEACTIVATED: NO

2011-02-11-12.08.27.332193+480 I3668G511          LEVEL: Error
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-15                 APPID: *LOCAL.db2inst1.110211040827
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, base sys utilities, sqeDBMgr::StartUsingLocalDatabase, probe:72
DATA #2 : Hexdump, 4 bytes
0x1093AE90 : D805 0000                                  ....

2011-02-11-12.08.32.784648+480 I4180G510          LEVEL: Severe
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-16                 APPID: *LOCAL.db2inst1.110211040832
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::FirstConnect, probe:125
DATA #1 : Hexdump, 4 bytes
0x1093AE90 : 09FC FFFF                                  ....

2011-02-11-12.08.32.860548+480 E4691G469          LEVEL: Event
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-16                 APPID: *LOCAL.db2inst1.110211040832
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (idle) 0
FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::TermDbConnect, probe:2000
STOP    : DATABASE: SAMPLE   : DEACTIVATED: YES

2011-02-11-12.08.39.414751+480 I5161G437          LEVEL: Warning
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-17                 APPID: *LOCAL.db2inst1.110211040839
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, base sys utilities, sqledint, probe:30
MESSAGE : Crash Recovery is needed.

2011-02-11-12.08.41.850190+480 E5599G467          LEVEL: Event
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-17                 APPID: *LOCAL.db2inst1.110211040839
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::FirstConnect, probe:1000
START   : DATABASE: SAMPLE   : ACTIVATED: NO

2011-02-11-12.08.41.917777+480 I6067G500          LEVEL: Warning
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-17                 APPID: *LOCAL.db2inst1.110211040839
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, recovery manager, sqlpresr, probe:410
MESSAGE : Crash recovery started. LowtranLSN 00000000032D3ACD MinbuffLSN
          00000000032C8010

2011-02-11-12.08.41.970778+480 E6568G454          LEVEL: Warning
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-17                 APPID: *LOCAL.db2inst1.110211040839
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, recovery manager, sqlpresr, probe:410
MESSAGE : ADM1530E  Crash recovery has been initiated.

2011-02-11-12.08.42.039482+480 I7023G495          LEVEL: Warning
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-17                 APPID: *LOCAL.db2inst1.110211040839
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, recovery manager, sqlprecm, probe:2000
DATA #1 :
Using parallel recovery with 3 agents 9 QSets 27 queues and 16 chunks

2011-02-11-12.08.46.121047+480 I7519G510          LEVEL: Warning
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-17                 APPID: *LOCAL.db2inst1.110211040839
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, recovery manager, sqlprecm, probe:4000
MESSAGE : DIA2051W Forward phase of crash recovery has completed.  Next LSN is
          "00000000033794CE".

2011-02-11-12.08.46.302506+480 E8030G463          LEVEL: Warning
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-17                 APPID: *LOCAL.db2inst1.110211040839
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, recovery manager, sqlpresr, probe:3170
MESSAGE : ADM1531E  Crash recovery has completed successfully.

2011-02-11-12.08.46.302945+480 I8494G465          LEVEL: Warning
PID     : 31124                TID  : 1225780112  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-17                 APPID: *LOCAL.db2inst1.110211040839
AUTHID  : DB2INST1
EDUID   : 19                   EDUNAME: db2agent (SAMPLE) 0
FUNCTION: DB2 UDB, recovery manager, sqlpresr, probe:3170
MESSAGE : Crash recovery completed. Next LSN is 00000000033794CE

2011-02-11-12.08.47.146523+480 E8960G464          LEVEL: Event
PID     : 31124                TID  : 1213197200  PROC : db2sysc 0
INSTANCE: db2inst1             NODE : 000         DB   : SAMPLE
APPHDL  : 0-18                 APPID: *LOCAL.DB2.110211040847
AUTHID  : DB2INST1
EDUID   : 46                   EDUNAME: db2stmm (SAMPLE) 0
FUNCTION: DB2 UDB, Self tuning memory manager, stmmLog, probe:1008
DATA #1 :
Starting STMM log from file number 0

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/665930/viewspace-687252/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/665930/viewspace-687252/

最后

以上就是真实棒棒糖为你收集整理的db2不一致状态恢复的全部内容,希望文章能够帮你解决db2不一致状态恢复所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(46)

评论列表共有 0 条评论

立即
投稿
返回
顶部