If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Error Droppimg Databse

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-23-09, 11:55
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Error Droppimg Databse

Hi

One of our Mirror is restored everyday from production backup image.

The scheduler script used is a batch file that runs with db2cmd.exe.

For some of times that database cannot be dropped because the error

"database in use"

In Diaglog I find this


Code:
2009-04-23-05.00.02.028000-240 I4148940F375       LEVEL: Severe
PID     : 3592                 TID  : 5632        PROC : db2syscs.exe
INSTANCE: DB2                  NODE : 000         DB   : ECX
APPHDL  : 0-982                APPID: GA4602E2.H110.090422201042
FUNCTION: DB2 UDB, routine_infrastructure, sqlerDisassociateWithFmp, probe:30
RETCODE : ZRC=0xFFFFFB95=-1131

2009-04-23-05.00.02.028000-240 I4149317F394       LEVEL: Severe
PID     : 3592                 TID  : 5632        PROC : db2syscs.exe
INSTANCE: DB2                  NODE : 000         DB   : ECX
APPHDL  : 0-982                APPID: GA4602E2.H110.090422201042
MESSAGE : dissassociate failed
DATA #1 : Hexdump, 4 bytes
0x000000003E0E8378 : EEFB FFFF
Does this mean to relate to the issue.

Even after forcing applications all and there are no applications with LIST APPLICATIONS

DB2TOP does not help so have to use DB2STOP FORCE

DB2STOP FORCE and DB2START woks and database can be dropped.

But this cannot be used as there is another DB which is being used at the time.

DB2 Deactivate DB does not work.

Any help to Correct or work around ??

DBFinder

Last edited by DBFinder; 04-24-09 at 04:12.
Reply With Quote
  #2 (permalink)  
Old 04-23-09, 12:01
rdutton rdutton is offline
Registered User
 
Join Date: Dec 2008
Posts: 76
Platform and version please
Reply With Quote
  #3 (permalink)  
Old 04-23-09, 12:09
dbadam dbadam is offline
Registered User
 
Join Date: Sep 2004
Posts: 12
Before forcing of all applications connected to database. Revoke copnnect privileges from all users to that database, then force applications and wait for 20 secs then do a deactivate database.
Reply With Quote
  #4 (permalink)  
Old 04-23-09, 12:09
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Sorry

Here is it

Code:
C:\SQLLIB\BIN>db2level
DB21085I  Instance "DB2" uses "64" bits and DB2 code release "SQL08025" with
level identifier "03060106".
Informational tokens are "DB2 v8.1.12.99", "s060429", "WR21370", and FixPak
"12".
Product is installed at "C:\SQLLIB".


C:\SQLLIB\BIN>
Reply With Quote
  #5 (permalink)  
Old 04-23-09, 12:19
rdutton rdutton is offline
Registered User
 
Join Date: Dec 2008
Posts: 76
Also, check to see it any utils are hung up
Reply With Quote
  #6 (permalink)  
Old 04-24-09, 04:05
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Quote:
Originally Posted by rdutton
Also, check to see it any utils are hung up
Well, no utilities of course, and also no app.
Should I have seen any of these, I wouldn't have posted.

Quote:
Originally Posted by dbadam
Before forcing of all applications connected to database. Revoke copnnect privileges from all users to that database, then force applications and wait for 20 secs then do a deactivate database.
Yes, this seems to make sense, When I will have next chance, I will try this.


Is this possible that there may be some db2 or op system services running in background, not letting it drop ??
Diaglog dump suggests that there was an error dropping instance directory.

Thanks for your effort guys
DBFinder
Reply With Quote
  #7 (permalink)  
Old 04-28-09, 09:44
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Following steps help.

Code:
Connect to MyDB;

Connect Reset;

Force Applications All;

:
:

. . . .  20 sec delay . . .

:
:
Deactivate Database MyDB;

Drop Database MyDB;

:
:
I am not as expert as to explain, but this DB used to give me hard time during nightly restore job. And even some times I had to DB2STOP FORCE which I did not like to use on daily basis. Even because this server has 2 databases.

Thanks all for help

DBFinder
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On