<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sergiu Damian's Blog &#187; problem solving</title>
	<atom:link href="http://www.sese.ro/archives/tag/problem-solving/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sese.ro</link>
	<description>on .net, life and places</description>
	<lastBuildDate>Sat, 26 Jun 2010 15:36:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Running Database Engine Tuning Advisor 2008 on a SQL Server 2008 upgraded from 2005</title>
		<link>http://www.sese.ro/archives/82</link>
		<comments>http://www.sese.ro/archives/82#comments</comments>
		<pubDate>Tue, 05 Jan 2010 14:31:17 +0000</pubDate>
		<dc:creator>Sergiu</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[problem solving]]></category>

		<guid isPermaLink="false">http://www.sese.ro/?p=82</guid>
		<description><![CDATA[Problem
I run into an issue today. When trying to run Database Engine Tuning Advisor (part of SQL Server Management Studio 2008) on a SQL Server 2008 instance that was upgraded form a SQL Server 2005 instance, I got the error below:
Cannot initialize tuning. (.Net SqlClient Data Provider)
===================================
User does not have enough permissions to tune one [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong></p>
<p>I run into an issue today. When trying to run Database Engine Tuning Advisor (part of SQL Server Management Studio 2008) on a SQL Server 2008 instance that was upgraded form a SQL Server 2005 instance, I got the error below:</p>
<p><code>Cannot initialize tuning. (.Net SqlClient Data Provider)</code></p>
<p><code>===================================</code></p>
<p><code>User does not have enough permissions to tune one or more of the databases specified. (.Net SqlClient Data Provider)</code></p>
<p><code>------------------------------<br />
For help, click: <a title="here" href="http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&#038;ProdVer=10.00.2531&#038;EvtSrc=MSSQLServer&#038;EvtID=31003&#038;LinkId=20476" target="_blank">here</a></code></p>
<p><code> </code></p>
<p><code>------------------------------<br />
Server Name: {removed}<br />
Error Number: 31003<br />
Severity: 16<br />
State: 1<br />
Procedure: sp_DTA_add_session<br />
Line Number: 88</code></p>
<p>Of course, the error message is quite obscure, misleading you towards believing that it&#8217;s a permissions issue. However, documentation clearly states that a db_owner can run the tool. Investigating the issue I found out that some DTA-related tables and stored procedures from the MSDB database differ between 2005 and 2008 and they were not upgraded during the migration to 2008.</p>
<p><strong>Solution</strong></p>
<p>So, it&#8217;s pretty clear what the solution is:</p>
<p><strong>Option A</strong>. Delete all DTA-related objects from the MSDB database and run the Database Engine Tuning Advisor using a sysadmin user so that it re-creates the structures.</p>
<p><strong>Option B</strong>. Compare the schemas and create and run an update script yourself. Keeping your DTA history requires some tweaking.</p>
<p>I opted for option A as I found it less of a hack than option B.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sese.ro/archives/82/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
