Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Posts
    8

    Unanswered: Kill Long-running Query

    Hello,

    How can we kill a long running query in DB2? In the front end, we have one cancel button.When the user clicks cancel button, the query should stop processing.

    Regards,
    Siva

  2. #2
    Join Date
    Feb 2002
    Posts
    96
    What is your OS???

    If it is UNIX, you can kill it from backend by using "db2 force application (agentid)". But for this you should be a member of 'sysadm or sysctrl'.

  3. #3
    Join Date
    Aug 2003
    Posts
    8

    Kill long-Running Query

    Hello,

    Our Operating system is AIX (Production). rightnow the development is going on in Windows 2000 Server.We are using DB2 UDB v8.1

    we have one web application and this application has one archiving process.When the user clicks start button in the page, the archiving process will start running. We will be having one cancel button also in the page, and if the user clicks the cancel button or close the web page, we have to kill the archiving process(It has both insert and select). In this case, how can we kill the whole process from the front end?

    Please help........

    regards,
    Siva

  4. #4
    Join Date
    Feb 2002
    Posts
    96
    Since you are developing your own front-end, may be you can write a code "force application (agentid)" to force/kill that application when you click cancel button. Your program/code should capture the particular 'agentid'.

    If you are not developing front-end web application, (eg, vedor supplied application), even if you press cancel button, sometime(not always) the application will not be forced/killed. So you have to call your DBA to terminate that connection.

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I guess you could close the connection that is running the query, and the query will eventually be cancelled. It won't work though if you use some kind of connection pooling in your application server.

Posting Permissions

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