Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655

    Unanswered: 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 05:12.

  2. #2
    Join Date
    Dec 2008
    Posts
    76
    Platform and version please

  3. #3
    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.

  4. #4
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    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>

  5. #5
    Join Date
    Dec 2008
    Posts
    76
    Also, check to see it any utils are hung up

  6. #6
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    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

  7. #7
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •