Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can not delete session in Database Engine Tuning Advisor

I'm currently using sql server 2008. I have a problem with DTA. Here is my steps:

  1. I created new session to analyze my query.

  2. I canceled the process because it took so long to complete (1+ hour/query). On the time I had canceled, this process was on the 4th step (generating report).

  3. I closed the session.

  4. I tried to delete the session but DTA did not allow me to delete. it said it was aborting in status tool bar. I understood this sentence but I've waited to delete this session for 6 hours. i don't see why it is aborting so long. It is just one small query.

Anyone can help me on this?

Thank you.

Edit: The solution is to kill the connection that is connecting to database first. That's it. Thank you.

like image 339
tong Avatar asked Feb 16 '11 15:02

tong


People also ask

What are options available for workloads in Database Engine Tuning Advisor?

Database Engine Tuning Advisor tasks Create a workload by specifying the plan cache, by creating a script, or by generating a trace file or trace table. Tune a database by using the Database Engine Tuning Advisor graphical user interface tool. Create XML input files to tune workloads.

What is tunning in SQL?

SQL tuning is the iterative process of improving SQL statement performance to meet specific, measurable, and achievable goals. SQL tuning implies fixing problems in deployed applications. In contrast, application design sets the security and performance goals before deploying an application.

What is SQL Tuning Advisor?

The SQL Tuning Advisor analyzes high-volume SQL statements and offers tuning recommendations. It takes one or more SQL statements as an input and invokes the Automatic Tuning Optimizer to perform SQL tuning on the statements. It can run against any given SQL statement.


2 Answers

Right click on the current session(with aborting status) and open it then click preview the vorkload file and then click quit, after open again database tuning advisor and youenter image description here will be able to delete it. please see the picture

like image 85
mamuka Avatar answered Jan 04 '23 18:01

mamuka


Execute on the msdb-Database

exec dbo.sp_DTA_help_session --<-- get the session id
exec dbo.sp_DTA_delete_session 2 --<-- this is the session id
like image 37
IliaJ Avatar answered Jan 04 '23 16:01

IliaJ