关于我们
技术分享
技术分享
NBU备份到逻辑带库异常导致进程挂起及表空间状态异常
NBU备份到逻辑带库异常导致进程挂起及表空间状态异常
2021-07-12
[原创] NBU备份到逻辑带库异常导致进程挂起及表空间状态异常
NBU备份命令没有问题
----------------------------
CMD_LINE="db2 BACKUP DATABASE $MY_DB2 online $MY_SCHED LOAD $MY_LIB OPEN 4 SESSIONS BUFFER 1024"
备份异常后的表空间信息如下:
/dbonl>db2 connect to posdbonl
Database Connection Information
Database server = DB2/AIX64 9.1.8
SQL authorization ID = POSDBONL
Local database alias = POSDBONL
/dbonl>db2 list tablespaces show detail|grep State
State = 0x0800
State = 0x0000
State = 0x0800
State = 0x0800
State = 0x0800
State = 0x0800
State = 0x0800
State = 0x0800
State = 0x0000
/dbonl>db2 list tablespaces show detail
Tablespaces for Current Database
Tablespace ID = 0
Name = SYSCATSPACE
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0800
Detailed explanation:
Backup in progress
Total pages = 261000
Useable pages = 260960
Used pages = 33728
Free pages = 227232
High water mark (pages) = 33728
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
Tablespace ID = 1
Name = TEMPSPACE1
Type = Database managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 523000
Useable pages = 522944
Used pages = 64
Free pages = 522880
High water mark (pages) = 64
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
Tablespace ID = 2
Name = USERSPACE1
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0800
Detailed explanation:
Backup in progress
Total pages = 261000
Useable pages = 260960
Used pages = 1792
Free pages = 259168
High water mark (pages) = 1792
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
Tablespace ID = 3
Name = TMPSPACE01
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0800
Detailed explanation:
Backup in progress
Total pages = 130000
Useable pages = 129952
Used pages = 352
Free pages = 129600
High water mark (pages) = 352
Page size (bytes) = 8192
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
... ...
Database Connection Information
Database server = DB2/AIX64 9.1.8
SQL authorization ID = POSDBONL
Local database alias = POSDBONL
/dbonl>db2 list tablespaces show detail|grep State
State = 0x0800
State = 0x0000
State = 0x0800
State = 0x0800
State = 0x0800
State = 0x0800
State = 0x0800
State = 0x0800
State = 0x0000
/dbonl>db2 list tablespaces show detail
Tablespaces for Current Database
Tablespace ID = 0
Name = SYSCATSPACE
Type = Database managed space
Contents = All permanent data. Regular table space.
State = 0x0800
Detailed explanation:
Backup in progress
Total pages = 261000
Useable pages = 260960
Used pages = 33728
Free pages = 227232
High water mark (pages) = 33728
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
Tablespace ID = 1
Name = TEMPSPACE1
Type = Database managed space
Contents = System Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 523000
Useable pages = 522944
Used pages = 64
Free pages = 522880
High water mark (pages) = 64
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
Tablespace ID = 2
Name = USERSPACE1
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0800
Detailed explanation:
Backup in progress
Total pages = 261000
Useable pages = 260960
Used pages = 1792
Free pages = 259168
High water mark (pages) = 1792
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
Tablespace ID = 3
Name = TMPSPACE01
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0800
Detailed explanation:
Backup in progress
Total pages = 130000
Useable pages = 129952
Used pages = 352
Free pages = 129600
High water mark (pages) = 352
Page size (bytes) = 8192
Extent size (pages) = 32
Prefetch size (pages) = 32
Number of containers = 1
... ...
表空间状态是backup in progress,说明备份进程已经异常挂起,没有释放。查看进程信息:
dbhis /dbhis >db2 list applications show detail
CONNECT Auth Id Application Name Appl. Application Id Seq# Number of Coordinating DB Coordinator Status Status Change Time DB Name DB Path
Handle Agents partition number pid/thread
------------------------------ -------------------- ---------- -------------------------------------------------------------- ----- ---------- ---------------- --------------- ------------------------------ -------------------------- -------- --------------------
DBHIS db2jcc_application 753 BC003F0F.P1C6.120106144029 00002 1 0 630974 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2bp 205 *LOCAL.dbhis.120106143640 00006 1 0 623042 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 1313 BC003F0F.AC19.120106142535 00002 1 0 184594 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 37 BC003F0F.AC18.120106142534 00002 1 0 131160 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 897 BC003F0F.AC17.120106142533 00002 1 0 479732 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 119 BC003F0F.AC16.120106142532 00002 1 0 913538 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 167 BC003F0F.AC15.120106142531 00002 1 0 1269822 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 656 BC003F0F.AC14.120106142530 00002 1 0 221422 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 365 BC003F0F.AC13.120106142529 00002 1 0 270574 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 1129 BC003F0F.O518.120106141030 00002 1 0 667758 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 1268 BC003F0F.O517.120106141029 00002 1 0 704656 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2bp 624 *LOCAL.dbhis.120106100210 00001 1 0 520620 Performing a Backup Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2evmg_DB2DETAILDEA 359 *LOCAL.DB2.111226065738 00001 1 0 377150 Connect Completed Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2taskd 535 *LOCAL.DB2.111226065737 00001 1 0 274926 Connect Completed Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2stmm 729 *LOCAL.DB2.111226065736 00001 1 0 664050 Connect Completed Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
CONNECT Auth Id Application Name Appl. Application Id Seq# Number of Coordinating DB Coordinator Status Status Change Time DB Name DB Path
Handle Agents partition number pid/thread
------------------------------ -------------------- ---------- -------------------------------------------------------------- ----- ---------- ---------------- --------------- ------------------------------ -------------------------- -------- --------------------
DBHIS db2jcc_application 753 BC003F0F.P1C6.120106144029 00002 1 0 630974 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2bp 205 *LOCAL.dbhis.120106143640 00006 1 0 623042 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 1313 BC003F0F.AC19.120106142535 00002 1 0 184594 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 37 BC003F0F.AC18.120106142534 00002 1 0 131160 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 897 BC003F0F.AC17.120106142533 00002 1 0 479732 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 119 BC003F0F.AC16.120106142532 00002 1 0 913538 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 167 BC003F0F.AC15.120106142531 00002 1 0 1269822 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 656 BC003F0F.AC14.120106142530 00002 1 0 221422 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 365 BC003F0F.AC13.120106142529 00002 1 0 270574 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 1129 BC003F0F.O518.120106141030 00002 1 0 667758 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2jcc_application 1268 BC003F0F.O517.120106141029 00002 1 0 704656 UOW Waiting Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2bp 624 *LOCAL.dbhis.120106100210 00001 1 0 520620 Performing a Backup Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2evmg_DB2DETAILDEA 359 *LOCAL.DB2.111226065738 00001 1 0 377150 Connect Completed Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2taskd 535 *LOCAL.DB2.111226065737 00001 1 0 274926 Connect Completed Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
DBHIS db2stmm 729 *LOCAL.DB2.111226065736 00001 1 0 664050 Connect Completed Not Collected DBHIS /dbhis/dbhis/NODE0000/SQL00001/
此时通过force application(<agent_id>) 无法杀除相关进程,通过KILL -9在OS级别可以杀除,但经测试会导致实例CRASH。
dbhis /dbhis >ps -ef|grep 520620
dbhis 335908 1077414 0 23:50:41 - 0:00 db2bm.520620.9 0
dbhis 385080 1028488 0 Jan 03 - 2:16 db2bm.520620.6 0
dbhis 729162 1097844 0 18:02:10 - 0:00 db2med.520620.3 0
dbhis 831604 1097844 0 18:02:10 - 0:00 db2med.520620.1 0
dbhis 917694 1028488 0 23:50:41 - 0:00 db2bm.520620.2 0
dbhis 1114266 1065020 0 22:43:08 pts/2 0:00 grep 520620
dbhis 1278010 1368558 0 Dec 25 - 16:11 db2bm.520620.0 0
dbhis 201164 1097844 0 18:02:10 - 0:00 db2med.520620.0 0
dbhis 450938 1060916 0 23:50:41 - 0:04 db2bm.520620.4 0
dbhis 520620 1077414 0 Dec 26 - 4:45 db2agent (idle) 0
dbhis 561558 1060916 0 23:50:41 - 0:44 db2bm.520620.7 0
dbhis 606688 1060916 0 Jan 02 - 1:21 db2bm.520620.8 0
dbhis 803162 1077414 0 Jan 03 - 0:54 db2bm.520620.5 0
dbhis 1073660 1097844 0 18:02:10 - 0:00 db2med.520620.2 0
dbhis 1106282 1028488 0 23:50:42 - 0:00 db2bm.520620.3 0
dbhis 1159458 1077414 0 Jan 03 - 0:55 db2bm.520620.1 0
dbhis /dbhis >kill -9 520620
dbhis /dbhis >ps -ef|grep 520620
dbhis 1356052 1065020 0 22:44:31 pts/2 0:00 grep 520620
dbhis /dbhis >db2 connect to dbhis
SQL1032N No start database manager command was issued. SQLSTATE=57019
dbhis /dbhis >id
uid=3004(dbhis) gid=500(db2grp1) groups=1(staff),502(dasadm1)
dbhis /dbhis >db2 connect to dbhis
SQL1032N No start database manager command was issued. SQLSTATE=57019
dbhis /dbhis >db2start
01/06/2012 22:45:08 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
dbhis /dbhis >
dbhis /dbhis >db2 connect to dbhis
Database Connection Information
Database server = DB2/AIX64 9.1.8
SQL authorization ID = DBHIS
Local database alias = DBHIS
dbhis 335908 1077414 0 23:50:41 - 0:00 db2bm.520620.9 0
dbhis 385080 1028488 0 Jan 03 - 2:16 db2bm.520620.6 0
dbhis 729162 1097844 0 18:02:10 - 0:00 db2med.520620.3 0
dbhis 831604 1097844 0 18:02:10 - 0:00 db2med.520620.1 0
dbhis 917694 1028488 0 23:50:41 - 0:00 db2bm.520620.2 0
dbhis 1114266 1065020 0 22:43:08 pts/2 0:00 grep 520620
dbhis 1278010 1368558 0 Dec 25 - 16:11 db2bm.520620.0 0
dbhis 201164 1097844 0 18:02:10 - 0:00 db2med.520620.0 0
dbhis 450938 1060916 0 23:50:41 - 0:04 db2bm.520620.4 0
dbhis 520620 1077414 0 Dec 26 - 4:45 db2agent (idle) 0
dbhis 561558 1060916 0 23:50:41 - 0:44 db2bm.520620.7 0
dbhis 606688 1060916 0 Jan 02 - 1:21 db2bm.520620.8 0
dbhis 803162 1077414 0 Jan 03 - 0:54 db2bm.520620.5 0
dbhis 1073660 1097844 0 18:02:10 - 0:00 db2med.520620.2 0
dbhis 1106282 1028488 0 23:50:42 - 0:00 db2bm.520620.3 0
dbhis 1159458 1077414 0 Jan 03 - 0:55 db2bm.520620.1 0
dbhis /dbhis >kill -9 520620
dbhis /dbhis >ps -ef|grep 520620
dbhis 1356052 1065020 0 22:44:31 pts/2 0:00 grep 520620
dbhis /dbhis >db2 connect to dbhis
SQL1032N No start database manager command was issued. SQLSTATE=57019
dbhis /dbhis >id
uid=3004(dbhis) gid=500(db2grp1) groups=1(staff),502(dasadm1)
dbhis /dbhis >db2 connect to dbhis
SQL1032N No start database manager command was issued. SQLSTATE=57019
dbhis /dbhis >db2start
01/06/2012 22:45:08 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
dbhis /dbhis >
dbhis /dbhis >db2 connect to dbhis
Database Connection Information
Database server = DB2/AIX64 9.1.8
SQL authorization ID = DBHIS
Local database alias = DBHIS
- 标签:
-
网络安全
您可能感兴趣的新闻 换一批
热门文章
现在下载,可享30天免费试用