![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Drop database .... --> SQL1371W The database is currently in use SQLSTATE=57019 Who, what, where ?? Maitenance utility? |
#3
| |||
| |||
|
|
What is the output of 'db2pd -edus' and 'ps -fL'? ps -fL |
#4
| |||
| |||
|
|
What is the output of 'db2pd -edus' and 'ps -fL'? ps -fL UID PID PPID LWP C NLWP STIME TTY TIME CMD vkoprod 5901 5900 5901 0 1 May27 pts/0 00:00:00 -bash vkoprod 10153 5901 10153 0 1 07:44 pts/0 00:00:00 ps -fL db2pd -edus Database Partition 0 -- Active -- Up 38 days 23:17:10 List of all EDUs for database partition 0 db2sysc PID: 26330 db2wdog PID: 26063 db2acd PID: 26665 EDU ID TID Kernel TID EDU Name USR SYS ================================================== ================================================== 131206 189536397664 9812 db2agnta (PROD_DB) 0 0.000000 0.000000 131188 189842581856 9669 db2agnta (PROD_DB) 0 0.000000 0.000000 131187 186583607648 9668 db2agnta (PROD_DB) 0 0.000000 0.000000 128378 189825804640 32453 db2agntdp (PROD_DB ) 0 0.000000 0.000000 128377 183211387232 32452 db2agntdp (PROD_DB ) 0 0.010000 0.000000 128369 188861114720 32444 db2agent (PROD_DB) 0 0.220000 0.040000 123845 183194610016 26172 db2agntdp (PROD_DB ) 0 23.360000 6.050000 121136 189079218528 10218 db2agent (PROD_DB) 0 56.870000 12.500000 120564 188869503328 4552 db2agent (PROD_DB) 0 98.430000 23.420000 120240 189221824864 1105 db2agntdp (PROD_DB ) 0 0.130000 0.080000 114112 189196659040 20818 db2agent (PROD_DB) 0 0.720000 0.140000 113838 183127501152 13082 db2agent (PROD_DB) 0 0.880000 0.150000 66696 188911446368 28606 db2agent (PROD_DB) 0 3.350000 0.300000 257206 186550053216 20158 db2agent (PROD_DB) 0 21.910000 0.570000 244111 189142133088 14251 db2agent (PROD_DB) 0 60.620000 14.020000 223125 183303661920 26915 db2agent (PROD_DB) 0 132.190000 21.820000 220222 188882086240 7527 db2agent (PROD_DB) 0 53.650000 4.280000 217965 183110723936 31131 db2pfchr (PROD_DB) 0 0.000000 0.000000 217964 188949195104 31130 db2pfchr (PROD_DB) 0 0.000000 0.000000 217963 188835948896 31129 db2pfchr (PROD_DB) 0 0.000000 0.000000 217962 183202998624 31128 db2pfchr (PROD_DB) 0 0.010000 0.010000 217961 189796444512 31127 db2pfchr (PROD_DB) 0 6.200000 2.560000 217960 186722019680 31126 db2pfchr (PROD_DB) 0 11.020000 5.620000 217959 183228164448 31125 db2pfchr (PROD_DB) 0 23.850000 14.450000 217958 186709436768 31124 db2pfchr (PROD_DB) 0 34.490000 20.540000 217957 189083412832 31123 db2pfchr (PROD_DB) 0 51.280000 30.400000 217956 189217630560 31122 db2pclnr (PROD_DB) 0 0.010000 0.020000 217955 183098141024 31121 db2pclnr (PROD_DB) 0 0.010000 0.030000 217954 183219775840 31120 db2dlock (PROD_DB) 0 0.000000 0.000000 217953 188986943840 31119 db2glock (PROD_DB) 0 0.000000 0.000000 217952 188877891936 31118 db2lfr (PROD_DB) 0 0.010000 0.150000 217951 183106529632 31117 db2loggw (PROD_DB) 0 0.660000 2.080000 217950 186734602592 31116 db2loggr (PROD_DB) 0 0.060000 0.250000 217949 186654910816 31115 db2logmgr (PROD_DB) 0 0.080000 1.120000 217948 188856920416 31114 db2logts (PROD_DB) 0 0.080000 0.020000 209873 183144278368 22886 db2evmgi (DB2DETAILDEADLOCK) 0 21.810000 2.120000 205920 189049858400 9989 db2wlmd (PROD_DB) 0 0.220000 0.020000 205120 189066635616 8390 db2agent (PROD_DB) 0 0.080000 0.010000 203848 189502843232 5115 db2agent (PROD_DB) 0 219.210000 56.860000 203068 189175687520 2935 db2agent (PROD_DB) 0 55.410000 1.520000 168340 189372819808 4841 db2taskd (PROD_DB) 0 9.400000 1.510000 165545 188840143200 29548 db2agent (PROD_DB) 0 110.160000 17.760000 56 183307856224 26663 db2resync 0 0.000000 0.000000 22 183312050528 26590 db2tcpcm 0 2.270000 0.790000 21 183316244832 26589 db2tcpcm 0 2.360000 0.800000 20 183320439136 26577 db2ipccm 0 4.530000 2.800000 19 183324633440 26576 db2licc 0 0.000000 0.000000 18 183328827744 26575 db2pdbc 0 0.220000 0.050000 17 183333022048 26572 db2extev 0 3.820000 36.860000 16 183337216352 26569 db2fcmr 0 83.430000 49.560000 15 183341410656 26568 db2extev 0 0.000000 0.000000 14 183345604960 26564 db2fcms 0 0.010000 0.010000 13 183349799264 26556 db2thcln 0 3.350000 7.410000 12 183353993568 26552 db2alarm 0 0.020000 0.010000 11 183093946720 26374 db2sysc 0 49.560000 18.920000 /dg |
#5
| |||
| |||
|
|
Hi! (db2 UDB V9.5.5 Linux RedHat 4) I want to drop a database before doing a restore into it from another database. db2 get db cfg: Database is consistent * YES Rollforward pending * * *NO Restore pending * * * * *NO Automatic maintenance * *ON Deactivate database --> Success but database was not activated Quiesce database .... --> Database is already quiesced list active databases *--> not listed list applications * * *--> not listed Drop database .... --> SQL1371W The database is currently in use SQLSTATE=57019 |
#6
| |||
| |||
|
|
As you can see from the db2pd output, there are connections to the database. Therefore the database is in use. ps -fL should give you all processes and threads from the instance user. Where are the db2sysc processes/threads? You said db2 list applications did not return any applications. How can it be that there are agents connected to the database then? I also asked, if HADR was running. Is it running? On 10.06.10 1:46 , danfan wrote: -- Helmut K. C. Tessarek DB2 Performance and Development /* * *Thou shalt not follow the NULL pointer for chaos and madness * *await thee at its end. */ |
#7
| |||
| |||
|
|
On Jun 9, 2:23*pm, danfan46 <danfa... (AT) hotmail (DOT) com> wrote: Hi! (db2 UDB V9.5.5 Linux RedHat 4) I want to drop a database before doing a restore into it from another database. db2 get db cfg: Database is consistent * YES Rollforward pending * * *NO Restore pending * * * * *NO Automatic maintenance * *ON Deactivate database --> Success but database was not activated Quiesce database .... --> Database is already quiesced list active databases *--> not listed list applications * * *--> not listed Drop database .... --> SQL1371W The database is currently in use SQLSTATE=57019 You can't drop a quiesced database. *You have to unquiesce it first, then drop it. Ian |
#8
| ||||
| ||||
|
|
ps -fL returns process from the current login only. |
|
ps -efL returns all db2sys processes. |
|
My guess is that "restore" had some flag set (in one or more partitions) indicating that the restore was still in progress although the database was online and fully available. |
|
Question: Must "db2 restore db incremental ABORT" be run with db2_all in a partitioned database? |
![]() |
| Thread Tools | |
| Display Modes | |
| |