Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2012
    Posts
    177

    Unanswered: Not able to drop the database

    Hi all,

    In our setup db2 v9.7 with fixpack 4

    I am trying to drop the database but i can't i getting the below error.

    Even, i forced all the applications connected to the database.

    [db2inst1@vrptisdbhcl03 ~]$ db2 force application all
    DB20000I The FORCE APPLICATION command completed successfully.
    DB21024I This command is asynchronous and may not be effective immediately.

    [db2inst1@vrptisdbhcl03 ~]$ db2 drop db TIS_DWH
    SQL1035N The database is currently in use. SQLSTATE=57019

    Thanx,
    laxman..

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    try : db2 deactivate db TIS_DWH
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Sep 2012
    Posts
    177
    Hi guy,

    Thanks for your reply.

    As per your suggestion, i tried the deactivate command also, but i am getting the same error.

    [db2inst1@vrptisdbhcl03 ~]$ db2 deactivate db TIS_DWH
    SQL1495W Deactivate database is successful, however, there is still a
    connection to the database.


    [db2inst1@vrptisdbhcl03 ~]$ db2 drop db TIS_DWH
    SQL1035N The database is currently in use. SQLSTATE=57019


    Thanks,
    laxman.

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    now try to force all appl and if needed quiesce the db to avoid new connections
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by przytula_guy View Post
    now try to force all appl and if needed quiesce the db to avoid new connections
    ...which may not work anyway, if whoever is connecting has SYSADM or QUIESCE CONNECT authority. Changing SVCENAME is also an option.
    ---
    "It does not work" is not a valid problem statement.

  6. #6
    Join Date
    Apr 2008
    Posts
    39
    see database you are trying to drop is a local database or a remote
    database.

    Thanks
    Naval K Sarda

  7. #7
    Join Date
    Nov 2011
    Posts
    334
    Maybe you need to to run the command : "db2 terminate "
    after " db2 force application all" to terminate the db2bp process。

  8. #8
    Join Date
    Apr 2012
    Posts
    156
    Not sure on your environment but if there is only one database in the instance I would do the following:
    db2stop force
    if that hangs issue a db2kill
    then issue
    db2start
    db2 drop database TIS_DWH
    Yes I know it is a bit aggressive but you are dropping the database anyway so you do not have to worry about a crash recovery. Again, this is only if you have 1 database within the instance.

  9. #9
    Join Date
    Sep 2012
    Posts
    177
    Hi all,

    Finally i dropped the database..

    Thanks,
    laxman..

Posting Permissions

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