dbTalk Databases Forums  

killing queries

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss killing queries in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Zoltan Grose
 
Posts: n/a

Default killing queries - 07-19-2004 , 01:34 PM






Is there anyway to list and kill MD queries? The use case is:

User X starts a query that, in hindsight, takes 30 minutes to execute.
But User X gave up after 4 minutes and tries to run the query again.

So now there are 2 queries fighting for CPU and resources and the
performance just drops from there.

I happen to be running these queries over XMLA but the problem may be
wider and that is how does one stop executing a query that one is no
longer interested in?

Stopping and starting the whole server seems a little extreme, is that
the only answer?

-z

Reply With Quote
  #2  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: killing queries - 07-21-2004 , 12:35 PM






Look in the Analysis Services Operations Guide:
http://www.microsoft.com/technet/pro.../anservog.mspx
It has a section called "Monitoring User Access" on this topic.

To kill a query, all you need to do is to disconnect the underlying TCP/IP
connection (I think that I suggested using the http://www.sysinternals.com
TCPView utility to do this) -- but I should warn you, that this just signals
the service that the user has gone away, if there are outstanding SQL or
internal Analysis Services operations that are currently active, it won't be
until they have been satisfied that the service detects that the user has
gone away and will clear up resources. So this can take some time for the
"KILL" to really happen, and in some cases, it might not happen for the
equivalent time needed to satisfy the query anyway.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Zoltan Grose" <zgrose (AT) mac (DOT) com> wrote

Quote:
Is there anyway to list and kill MD queries? The use case is:

User X starts a query that, in hindsight, takes 30 minutes to execute.
But User X gave up after 4 minutes and tries to run the query again.

So now there are 2 queries fighting for CPU and resources and the
performance just drops from there.

I happen to be running these queries over XMLA but the problem may be
wider and that is how does one stop executing a query that one is no
longer interested in?

Stopping and starting the whole server seems a little extreme, is that
the only answer?

-z



Reply With Quote
  #3  
Old   
Zoltan Grose
 
Posts: n/a

Default Re: killing queries - 07-21-2004 , 01:04 PM



OK. Gives me a place to start.

My hope is that these large queries are performing at lot of OLAP <->
relational back and forth and that during one of those cycles, SQL
Server will notice the dead connection and abort the query.

Related, is there any kind of command or setting to tell the MSAS to
give up on a query if it runs for X minutes? Something along the lines
of the Server timeout for Processing but for queries? I know XMLA has a
timeout property but I suspect that is implemented in the msxisapi.dll
itself and not a feature of MSAS.

-z

Dave Wickert [MSFT] wrote:

Quote:
Look in the Analysis Services Operations Guide:
http://www.microsoft.com/technet/pro.../anservog.mspx
It has a section called "Monitoring User Access" on this topic.

To kill a query, all you need to do is to disconnect the underlying TCP/IP
connection (I think that I suggested using the http://www.sysinternals.com
TCPView utility to do this) -- but I should warn you, that this just signals
the service that the user has gone away, if there are outstanding SQL or
internal Analysis Services operations that are currently active, it won't be
until they have been satisfied that the service detects that the user has
gone away and will clear up resources. So this can take some time for the
"KILL" to really happen, and in some cases, it might not happen for the
equivalent time needed to satisfy the query anyway.

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.