community.borland.com

Article #25214: Stopping a lengthy query.

Problem:
When a query is running on the InterBase Server it is not possible to stop, halt or terminate the query.


Solution:
Since it is not possible to stop or terminate a query,  there are a few alternatives available to address
when this situation happens:

 - Open another connection.  This implies that the client program is a
   threaded application and can detect a lengthy query in a thread.  
   Starting another connection will apply to the number of maximum 
   connections allowed.  Do not abandon the old connection or InterBase 
   will make a decision on when to sever the connection.  InterBase will
   continue processing the query, however new tasks can be done.

 - Open another instance of the application.  Starting another instance 
   of the application will likely open more connections that will apply 
   to the number of maximum connections allowed.  Do not abandon the old 
   connection(s) or InterBase will make a decision on when to sever the 
   connection.  InterBase will continue processing the query, however 
   new tasks can be done.

 - Shutdown the database.  Shutting down the database will close all
   connections to the database.  While this can be extreme, this will 
   stop the query from being processed further.  To shutdown the 
   database,  use the syntax below with the gfix utility:
	 gfix -shut -force 0 
   to shutdown the database.  In Windows, Windows NT, and Windows95 the 
   Server Manager utility can be used to forcibly shutdown the database.

Last Modified: 02-OCT-00