<?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>Michael Phillips Blog &#187; SQL</title>
	<atom:link href="http://nukeitmike.com/blog/category/sql/feed" rel="self" type="application/rss+xml" />
	<link>http://nukeitmike.com/blog</link>
	<description>My place to speak about things</description>
	<lastBuildDate>Fri, 03 Feb 2012 22:55:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The stub received bad data &#8211; DPM backup of a SQL DB</title>
		<link>http://nukeitmike.com/blog/2009/03/26/the-stub-received-bad-data-dpm-backup-of-a-sql-db/</link>
		<comments>http://nukeitmike.com/blog/2009/03/26/the-stub-received-bad-data-dpm-backup-of-a-sql-db/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 13:27:54 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Data Protection Manager]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[DPM]]></category>

		<guid isPermaLink="false">http://nukeitmike.com/blog/2009/03/26/the-stub-received-bad-data-dpm-backup-of-a-sql-db/</guid>
		<description><![CDATA[My DPM Server: Server 2008 x64 DPM 2007 SP1 SQL 2005 SP3 (local to DPM) Protecting: Server 2003 SP2 x64 SQL 2005 SP3 I have about 30 databases being backed up from the one client machine.&#160; All of them backup just fine except one.&#160; Every time I try to do a synchronization or a full [...]]]></description>
			<content:encoded><![CDATA[<p>My DPM Server:    <br />Server 2008 x64     <br />DPM 2007 SP1    <br />SQL 2005 SP3 (local to DPM)    </p>
<p> Protecting:    <br /> Server 2003 SP2 x64    <br /> SQL 2005 SP3    </p>
<p> I have about 30 databases being backed up from the one client machine.&#160; All of them backup just fine except one.&#160; Every time I try to do a synchronization or a full backup I get the following error: </p>
<blockquote><p>Triggering synchronization on *myserver\mydatabase* failed: Error 46: DPM failed to perform the operation because too many objects have been selected. Select fewer objects and then retry this operation. </p>
<p>Error details: The stub received bad data (0x800706F7) </p>
<p>Recommended action: Select fewer objects. 1) If you are trying to protect a large number of data sources on a volume, consider protecting the whole volume instead of individual data sources. 2)If you are trying to recover a large number of folders or files from a volume, consider recovering the parent folder, or divide the recovery into multiple operations. </p>
</blockquote>
<p>This happens even if I just select the one database.&#160; All the other databases backup correctly.</p>
<p>After posting in the <a title="The stub received bad data" href="http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?dg=microsoft.public.dataprotectionmanager&amp;mid=e2aa6c05-b4bc-4792-a33d-9e8b8c6d49fd" target="_blank">news group</a>, I got a question from a Microsoft person whether full text indexing was enabled, and if so how many catalogs.&#160; Upon investigation, it appears that this is one of the only databases that i have that has full text indexing enabled.&#160; It has 32 indexes.&#160; </p>
<p>So with the suggestion of a colleague, I did a rebuild of the indexes:</p>
<ol>
<ol>
<li>In SQL Server Management Studio (SSMS) expand the database/Storage/Full Text Catalogs</li>
<li>Right click on the Full Text Catalogs folder and select Rebuild All</li>
</ol>
</ol>
<p>Then I went back to my DPM server, to the protection group and selected the database in question.&#160; I did a “Create recovery point – Disk”, “Create a recovery point by using express full backup”.</p>
<p>That worked, so maybe that means the problem is fixed…</p>
]]></content:encoded>
			<wfw:commentRss>http://nukeitmike.com/blog/2009/03/26/the-stub-received-bad-data-dpm-backup-of-a-sql-db//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Queries</title>
		<link>http://nukeitmike.com/blog/2009/03/24/sql-queries/</link>
		<comments>http://nukeitmike.com/blog/2009/03/24/sql-queries/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 15:45:21 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Blogs]]></category>

		<guid isPermaLink="false">http://nukeitmike.com/blog/2009/03/24/sql-queries/</guid>
		<description><![CDATA[I don’t usually do a lot with SQL, but lately I have found myself having to look at, and work with SQL a good bit.&#160; It seems that things come in waves.&#160; Anyway, I was looking for a quick way to copy a table from one Database to another and came across this blog which [...]]]></description>
			<content:encoded><![CDATA[<p>I don’t usually do a lot with SQL, but lately I have found myself having to look at, and work with SQL a good bit.&#160; It seems that things come in waves.&#160; </p>
<p>Anyway, I was looking for a quick way to copy a table from one Database to another and came across this blog which I think has a lot of good queries just waiting to be tinkered with:</p>
<blockquote><p><a title="http://www.sqlservercurry.com/" href="http://www.sqlservercurry.com/">http://www.sqlservercurry.com/</a></p>
</blockquote>
<p>And the particular post that got me there was:</p>
<blockquote><h5><a href="http://www.sqlservercurry.com/2008/03/copy-table-from-one-database-to-another.html">Copy a table from one database to another in SQL Server 2005</a></h5>
<p>4:09 AM Posted by Suprotim Agarwal      <br />Labels: <a href="http://www.sqlservercurry.com/search/label/SQL%20Server%20Administration">SQL Server Administration</a> </p>
<p>If you have a table in a database and you would like to copy the table to another database, use this query:      <br />SELECT * INTO AdventureWorks.dbo.CustomersTemp FROM Northwind.dbo.Customers       <br />Just remember that using this query will only transfer the schema and data. It does not transfer the indexes, foreign keys, statistics etc.       <br />If you want to transfer all the objects from one database to another, open Sql Server Management Studio &gt; Right click on your database &gt; All Tasks &gt; Generate SQL Scripts. Then run these scripts against the new database.       <br /><strong>Transfer both schema and data</strong>       <br />To copy both data and schema, use the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&amp;displaylang=en">Microsoft SQL Server Database Publishing Wizard 1.1.</a> This tool works for both SQL 2000 and SQL 2005 and generates a single SQL script file which can be used to recreate a database (both schema and data). </p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://nukeitmike.com/blog/2009/03/24/sql-queries//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DPM could not connect to SQL reporting services because of IIS connectivity</title>
		<link>http://nukeitmike.com/blog/2008/12/04/dpm-could-not-connect-to-sql-reporting-services-because-of-iis-connectivity/</link>
		<comments>http://nukeitmike.com/blog/2008/12/04/dpm-could-not-connect-to-sql-reporting-services-because-of-iis-connectivity/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 20:50:17 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Data Protection Manager]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Server 2008]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Web Stuff]]></category>

		<guid isPermaLink="false">http://www.nukeitmike.com/blog/2008/12/04/DPMCouldNotConnectToSQLReportingServicesBecauseOfIISConnectivity.aspx</guid>
		<description><![CDATA[I am running Data Protection Manager 2007 on Windows Server 2008 (x64).&#160; I have not been able to use the reporting piece, and haven&#8217;t been running DPM long enough to wonder much about it, but when I went to finally figure it out the answer was rather simple.&#160; If you want to fix it, the [...]]]></description>
			<content:encoded><![CDATA[<p> I am running Data Protection Manager 2007 on Windows Server 2008 (x64).&nbsp; I have not been able to use the reporting piece, and haven&#8217;t been running DPM long enough to wonder much about it, but when I went to finally figure it out the answer was rather simple.&nbsp; If you want to fix it, the answer is here, but for more about what the problem is, you can go to the forum post below.</p>
<blockquote><p>This problem occurs because of a new permission requirement in IIS 7.0. This <br />permission requirement is for ISAPI extensions that use a wildcard (*) script <br />mapping. </p>
<p>To work around this problem, follow these steps: <br />1. Click Start, click Run, type inetmgr, and then click OK. <br />2. In Internet Information Services (IIS) Manager, expand Web Sites, expand <br />Default Web Site, and then click the virtual directory for the report server. <br />3. Under Features View, double-click Handler Mappings. <br />4. Under Actions, click Edit Feature Permissions. <br />5. Click to select the Scripts check box, and then click OK.  </p>
</blockquote>
<p><a href="http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.dataprotectionmanager&amp;cat=&amp;lang=&amp;cr=&amp;sloc=&amp;p=1&amp;mid=684ce72b-ecca-4965-82f6-40c399967380&amp;tid=335ffae9-bd96-4459-82bf-9a75a8279b65">How to fix&#8212; Data Protection Manager error 3013&nbsp; SQL reporting tab&nbsp; ? in Data Protection Manager</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nukeitmike.com/blog/2008/12/04/dpm-could-not-connect-to-sql-reporting-services-because-of-iis-connectivity//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL for Tivoli Storage Manager</title>
		<link>http://nukeitmike.com/blog/2007/08/28/sql-for-tivoli-storage-manager/</link>
		<comments>http://nukeitmike.com/blog/2007/08/28/sql-for-tivoli-storage-manager/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 12:52:31 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tivoli Storage Manager]]></category>

		<guid isPermaLink="false">http://www.nukeitmike.com/blog/2007/08/28/SQLForTivoliStorageManager.aspx</guid>
		<description><![CDATA[&#160;Found this web page that has sample queries for TSM. This page has a collection of useful SQL statements for IBM Tivoli Storage Manager (TSM). Here you can find out a lot of selects that will help you to get information from TSM and to construct your own SQL statements. SQL for Tivoli Storage Manager]]></description>
			<content:encoded><![CDATA[<p>&nbsp;Found this web page that has sample queries for TSM.</p>
<blockquote><p><em>This page has a collection of useful SQL statements for IBM Tivoli Storage Manager (TSM). Here you can find out a lot of selects that will help you to get information from TSM and to construct your own SQL statements.</em> </p>
</blockquote>
<p><a href="http://thobias.org/tsm/sql/index.html">SQL for Tivoli Storage Manager</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nukeitmike.com/blog/2007/08/28/sql-for-tivoli-storage-manager//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL and ODBC</title>
		<link>http://nukeitmike.com/blog/2007/07/05/sql-and-odbc/</link>
		<comments>http://nukeitmike.com/blog/2007/07/05/sql-and-odbc/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 19:16:52 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.nukeitmike.com/blog/2007/07/05/SQLAndODBC.aspx</guid>
		<description><![CDATA[I was trying to figure out how to get some data from an ODBC source and put it into SQL, and found a post with an interesting possible answer:&#160; Recently, I&#160;discovered an issue&#160;with SQL Server Integration Services (SSIS)&#160;regarding how the Execute SQL Task item handles returning a result set to the control flow.&#160;Lets start by [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to figure out how to get some data from an ODBC source and put it into SQL, and found a post with an interesting possible answer:&nbsp;</p>
<blockquote><p><em>Recently, I&nbsp;discovered an issue&nbsp;with SQL Server Integration Services (SSIS)&nbsp;regarding how the Execute SQL Task item handles returning a result set to the control flow.&nbsp;Lets start by demonstrating&nbsp;an existing issue with the Execute SQL Task using ODBC then I&#8217;ll present a solution. First, create a new DSN that points to the database using the ODBC Data Sources Administrator (Control Panel | Administrator Tools | ODBC Data Sources).&nbsp;If&nbsp;you are only dealing with SQL Server you can still&nbsp;test this out by&nbsp;creating a DSN that uses the SQL Server ODBC&nbsp;driver.</em></p>
<p><a href="http://blogs.simplifi.com/brucet/archive/2006/01/27/668.aspx">Sql Server Integration Service (SSIS) Execute SQL Task ODBC Result Set Bug/Workaround</a></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://nukeitmike.com/blog/2007/07/05/sql-and-odbc//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Processing the date can be a pain&#8230;</title>
		<link>http://nukeitmike.com/blog/2007/07/05/processing-the-date-can-be-a-pain/</link>
		<comments>http://nukeitmike.com/blog/2007/07/05/processing-the-date-can-be-a-pain/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 19:04:26 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.nukeitmike.com/blog/2007/07/05/ProcessingTheDateCanBeAPain.aspx</guid>
		<description><![CDATA[&#160;I was trying to migrate a table from one database to another using a script.&#160; It shouldn&#8217;t have been too complicated.&#160; It probably wouldn&#8217;t be for someone who has done it before.&#160; I had a problem getting some of the fields to copy over.&#160; They all involved date/time information.&#160; My search led me to this [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;I was trying to migrate a table from one database to another using a script.&nbsp; It shouldn&#8217;t have been too complicated.&nbsp; It probably wouldn&#8217;t be for someone who has done it before.&nbsp; I had a problem getting some of the fields to copy over.&nbsp; They all involved date/time information.&nbsp; My search led me to this interesting post:</p>
<blockquote><h6>SSIS: What&#8217;s the difference between DT_DATE and DT_DBTIMESTAMP </h6>
<p>Database people don&#8217;t generally like date values too much. They&#8217;re too fiddly. There&#8217;s god-knows-how-many ways of representing them&#8230;and don&#8217;t even get me started on regional date settings!!</p>
</blockquote>
<p><a href="http://blogs.conchango.com/jamiethomson/archive/2005/11/15/SSIS_3A00_-What_2700_s-the-difference-between-DT_5F00_DATE-and-DT_5F00_DBTIMESTAMP.aspx">SSIS Junkie : SSIS: What&#8217;s the difference between DT_DATE and DT_DBTIMESTAMP</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nukeitmike.com/blog/2007/07/05/processing-the-date-can-be-a-pain//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Product instance &#8230; has had update 3054 installed&#8230;</title>
		<link>http://nukeitmike.com/blog/2007/07/05/product-instance-has-had-update-3054-installed/</link>
		<comments>http://nukeitmike.com/blog/2007/07/05/product-instance-has-had-update-3054-installed/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 17:10:07 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.nukeitmike.com/blog/2007/07/05/ProductInstanceHasHadUpdate3054Installed.aspx</guid>
		<description><![CDATA[So when I tried to install the update that I downloaded in my earlier post, I got the following message: The product instance SQL Tools has had update 3054 installed. You do not need to install this update. An update equal to or greater than 3159 should be downloaded. Isn&#8217;t that special&#8230;&#160; Guess I need [...]]]></description>
			<content:encoded><![CDATA[<p>So when I tried to install the update that I downloaded in my <a href="http://www.nukeitmike.com/blog/PermaLink.aspx?guid=0bc20d07-4f6a-45b6-aed5-7c660c571bb2" target="_blank">earlier post</a>, I got the following message:</p>
<blockquote><p><em>The product instance SQL Tools has had update 3054 installed. You do not need to install this update. An update equal to or greater than 3159 should be downloaded.</em></p>
</blockquote>
<p>Isn&#8217;t that special&#8230;&nbsp; </p>
<p>Guess I need to do some more searching&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://nukeitmike.com/blog/2007/07/05/product-instance-has-had-update-3054-installed//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Please visit the IDE in Script Task Editor&#8230;</title>
		<link>http://nukeitmike.com/blog/2007/07/05/please-visit-the-ide-in-script-task-editor/</link>
		<comments>http://nukeitmike.com/blog/2007/07/05/please-visit-the-ide-in-script-task-editor/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 16:35:14 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.nukeitmike.com/blog/2007/07/05/PleaseVisitTheIDEInScriptTaskEditor.aspx</guid>
		<description><![CDATA[I was trying to build a tool to move some data between a TSM Database and a SQL 2005 Database.&#160; Mostly so that I can create a few reports to impress people who don&#8217;t have any idea what it is that I am reporting on.&#160; There are a number of issues with trying to do [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to build a tool to move some data between a TSM Database and a SQL 2005 Database.&nbsp; Mostly so that I can create a few reports to impress people who don&#8217;t have any idea what it is that I am reporting on.&nbsp; </p>
<p>There are a number of issues with trying to do this, not the least of which is the fact that I have no idea what I am really doing.&nbsp; The fact that I am working with a mixture of x32 and x64 operating systems and applications isn&#8217;t helping.&nbsp; The fact that Microsoft doesn&#8217;t really like to work with ODBC drivers and Tivoli doesn&#8217;t provide x64 ODBC Drivers makes it more complicated.</p>
<p>I did some searching and I am not the only one who has tried to use ODBC to move data around.&nbsp; There is a nice blog post here:</p>
<p><a title="http://blogs.simplifi.com/brucet/archive/2006/01/27/668.aspx" href="http://blogs.simplifi.com/brucet/archive/2006/01/27/668.aspx">http://blogs.simplifi.com/brucet/archive/2006/01/27/668.aspx</a></p>
<p>But when I tried that I kept getting this error:</p>
<blockquote><p>Package Validation Error<br />Error at ImportTastk: The task is configured to pre-compile the script, but binary code is not found. Please visit the IDE in Script Task Editor by clicking Design Script button to cause binary code to be generated.<br />&nbsp;(Microsoft.DataTransformationServices.VsIntegration) </p>
</blockquote>
<p>I did a google on that and came up with a hotfix that is supposed to fix the issue:
<p><a title="http://www.microsoft.com/downloads/details.aspx?familyid=8AF6C597-0F18-4E61-B3D2-AAD66CDCACF5&amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?familyid=8AF6C597-0F18-4E61-B3D2-AAD66CDCACF5&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?familyid=8AF6C597-0F18-4E61-B3D2-AAD66CDCACF5&amp;displaylang=en</a>
<p>I will be applying that and see what I get&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://nukeitmike.com/blog/2007/07/05/please-visit-the-ide-in-script-task-editor//feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

