<?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>Edwin M Sarmiento&gt;Cleaing up your Maintenance Plans in SQL Server 2005 &#8211; Edwin M Sarmiento</title>
	<atom:link href="https://www.edwinmsarmiento.com/cleaing-up-your-maintenance-plans-in-sql-server-2005/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.edwinmsarmiento.com</link>
	<description>Intentional Excellence</description>
	<lastBuildDate>Mon, 13 Apr 2026 21:00:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">84283043</site>		<item>
		<title>&gt;Cleaing up your Maintenance Plans in SQL Server 2005</title>
		<link>https://www.edwinmsarmiento.com/cleaing-up-your-maintenance-plans-in-sql-server-2005/</link>
		<comments>https://www.edwinmsarmiento.com/cleaing-up-your-maintenance-plans-in-sql-server-2005/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 10:10:00 +0000</pubDate>
		<dc:creator>Edwin M Sarmiento</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://bassplayerdoc.wordpress.com/2008/03/08/cleaing-up-your-maintenance-plans-in-sql-server-2005</guid>

				<description><![CDATA[&#62;Being a lazy guy that I always am, I try to find ways to make my life easier. When we finished fixing all the issues in our test server, I recommended that we simply backup the MSDB database and restore it on the production server. This way, I don&#8217;t have to recreate the jobs on [&#8230;]]]></description>
					<content:encoded><![CDATA[<p>&gt;<span style="font-family:arial;">Being a lazy guy that I always am, I try to find ways to make my life easier.  When we finished fixing all the issues in our test server, I recommended that we simply backup the <strong><span style="font-size:85%;">MSDB</span></strong> database and restore it on the production server.  This way, I don&#8217;t have to recreate the jobs on the production server.  Well, that&#8217;s just what hapened.  I didn&#8217;t have to recreate the jobs.  Unfortunately, I had a database maintenance plan which I created in the test server and that got in my production server as well.  I needed to either modify the maintenance plan to point to the correct server &#8211; which is my production server &#8211; or delete it and recreate another.  I tried the easiest path &#8211; deleting the maintenance plan.  When I did that, it was throwing me an error similar to the one below</span><br /><span style="font-family:Arial;"></span><br /><span style="font-family:lucida grande;font-size:85%;color:#cc0000;"><strong>TITLE: Microsoft SQL Server Management Studio</strong></span><br /><span style="font-family:lucida grande;font-size:85%;color:#cc0000;"><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</strong></span><br /><span style="font-family:lucida grande;font-size:85%;color:#cc0000;"><strong>Exception has been thrown by the target of an invocation. (mscorlib)</strong></span><br /><span style="font-family:lucida grande;font-size:85%;color:#cc0000;"><strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</strong></span><br /><span style="font-family:lucida grande;font-size:85%;color:#cc0000;"><strong>ADDITIONAL INFORMATION:</strong></span><br /><span style="font-family:arial;"><strong><span style="font-family:lucida grande;font-size:85%;color:#cc0000;">An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.(provider: Named Pipes Provider, error: 40 &#8211; Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)</span></strong>  </span><br /><span style="font-family:Arial;"></span><br /><span style="font-family:Arial;">I checked the maintenance plan and verified the connections and saw that it was the instance name of my test server. I checked the SQL Server logs on my test server and noticed that my production server&#8217;s SQL Server service account was trying to connect.  Good thing I applied best practice here or I would end up deleting the database maintenance plan on the test server from the production server.  So, how do I do it?  The workaround is to check the <strong><span style="font-size:85%;">dbo.sysmaintplan_plans</span></strong> table of the <strong><span style="font-size:85%;">MSDB</span></strong> database.  The ID column can be used as a value for us to delete records in the <strong><span style="font-size:85%;">dbo.sysmaintplan_log</span></strong>, <strong><span style="font-size:85%;">dbo.sysmaintplan_subplans</span></strong> and <strong><span style="font-size:85%;">dbo.sysmaintplan_plans</span></strong> tables. Once those records have been deleted, you can refresh your <strong><span style="font-size:85%;">Maintenance Plans</span></strong> folder in <strong><span style="font-size:85%;">SQL Server Management Studio </span></strong>and notice the maintenance plans disappear.  This does not delete the jobs created by these maintenance plans. You still have to manually delete those jobs.</span></p>
<div class="blogger-post-footer"><img width='1' height='1' src='' alt='' /></div>
]]></content:encoded>
			

		<wfw:commentRss>https://www.edwinmsarmiento.com/cleaing-up-your-maintenance-plans-in-sql-server-2005/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
				<post-id xmlns="com-wordpress:feed-additions:1">77</post-id>	</item>
	</channel>
</rss>