<?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>Techibee.com &#187; SQL</title>
	<atom:link href="http://techibee.com/category/sql/feed" rel="self" type="application/rss+xml" />
	<link>http://techibee.com</link>
	<description>A System Administrator&#039;s Blog</description>
	<lastBuildDate>Mon, 21 May 2012 14:13:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>SQL: Native backup compression failures</title>
		<link>http://techibee.com/sql/sql-native-backup-compression-failures/1600?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sql-native-backup-compression-failures</link>
		<comments>http://techibee.com/sql/sql-native-backup-compression-failures/1600#comments</comments>
		<pubDate>Fri, 20 Apr 2012 04:39:48 +0000</pubDate>
		<dc:creator>Sitaram Pamarthi</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL backup compression failures]]></category>
		<category><![CDATA[why sql backup compression is not enabled]]></category>

		<guid isPermaLink="false">http://techibee.com/?p=1600</guid>
		<description><![CDATA[You may notice the below error while configuring your SQL server to support backup compression by executing sp_configure &#8216;backup compression default&#8217; &#8217;1&#8242; SQL command. The configuration option &#8216;backup compression default&#8217; does not exist, or it may be an advanced option. The reason for this failure is, simple. You SQL server version is not supporting compression. [...]]]></description>
			<content:encoded><![CDATA[<p>You may notice the below error while configuring your SQL server to support backup compression by executing sp_configure &#8216;backup compression default&#8217; &#8217;1&#8242; SQL command.</p>
<blockquote><p><span style="color: #ff0000;">The configuration option &#8216;backup compression default&#8217; does not exist, or it may be an advanced option.</span></p></blockquote>
<p>The reason for this failure is, simple. You SQL server version is not supporting compression. Per Technet (<a href="http://technet.microsoft.com/en-us/library/bb964719.aspx">http://technet.microsoft.com/en-us/library/bb964719.aspx</a>), only SQL 2008 enterprise and later versions supports backup compression. That means, if you have any flavors of SQL server 2008 except enterprise version, you can not use backup compression feature. However, you can still use any version of SQL server 2008 to restore compressed backups. When it comes to SQL server 2008 R2(not that I earlier talked about only SQL 2008 &#8212; not R2), we can use any version to backup in compressed format and similarly the restorations.</p>
<p>To find the version of your SQL server, you can either check it from GUI or just use the below powershell code.</p>
<pre class="PowerShellColorizedScript">
<span style="color: #ff4500;">$SQLServer</span> <span style="color: #a9a9a9;">=</span> <span style="color: #8b0000;">"Myserver1"</span>
<span style="color: #008080;">[System.Reflection.Assembly]</span><span style="color: #a9a9a9;">::</span><span style="color: #000000;">LoadWithPartialName</span><span style="color: #000000;">(</span><span style="color: #8b0000;">'Microsoft.SqlServer.SMO'</span><span style="color: #000000;">)</span> <span style="color: #a9a9a9;">|</span> <span style="color: #0000ff;">Out-Null</span>
<span style="color: #ff4500;">$server</span> <span style="color: #a9a9a9;">=</span> <span style="color: #0000ff;">New-Object</span> <span style="color: #000000;">(</span><span style="color: #8b0000;">'Microsoft.SqlServer.Management.Smo.Server'</span><span style="color: #000000;">)</span> <span style="color: #ff4500;">$SQLServer</span>
<span style="color: #ff4500;">$server</span> <span style="color: #a9a9a9;">|</span> <span style="color: #0000ff;">Select</span> <span style="color: #8a2be2;">Name</span><span style="color: #a9a9a9;">,</span> <span style="color: #8a2be2;">Version</span></pre>
<p>This code returns the version number(like 10.0.2531). You can refer <a href="http://sqlserverbuilds.blogspot.in/">http://sqlserverbuilds.blogspot.in/</a> to know product name of this version.</p>
<p>Please feel free to post if you have any questions.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://techibee.com/sql/sql-native-backup-compression-failures/1600/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell Get Last Backup date/time of SQL databases</title>
		<link>http://techibee.com/sql/powershell-get-last-backup-datetime-of-sql-databases/971?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=powershell-get-last-backup-datetime-of-sql-databases</link>
		<comments>http://techibee.com/sql/powershell-get-last-backup-datetime-of-sql-databases/971#comments</comments>
		<pubDate>Tue, 19 Apr 2011 07:12:00 +0000</pubDate>
		<dc:creator>Sitaram Pamarthi</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://techibee.com/?p=971</guid>
		<description><![CDATA[While looking for a quick way to check when a SQL database was last backed up, the immediate thing that came into my mind is this post. I trolled around the parameters and functions of  &#8216;Microsoft.SqlServer.Management.smo.Server&#8217; object and developed below tiny script to list the last backup date time of databases in a SQL server. [...]]]></description>
			<content:encoded><![CDATA[<p>While looking for a quick way to check when a SQL database was last backed up, the immediate thing that came into my mind is <a href="http://techibee.com/powershell/powershell-query-databases-list-from-sql-server/960">this post</a>. I trolled around the parameters and functions of  &#8216;Microsoft.SqlServer.Management.smo.Server&#8217; object and developed below tiny script to list the last backup date time of databases in a SQL server.</p>
<blockquote><p>function Get-SQLLastBackupTime {</p>
<p>param(</p>
<p>[Parameter(mandatory=$true)]</p>
<p>[string]$DBServer</p>
<p>)</p>
<p>[System.Reflection.Assembly]::LoadWithPartialName(&#8216;Microsoft.SqlServer.SMO&#8217;) | <strong>Out-Null</strong></p>
<p>$server = <strong>New-Object</strong> (&#8216;Microsoft.SqlServer.Management.Smo.Server&#8217;) &#8220;$DBServer&#8221;</p>
<p>$server.databases | <strong>select</strong> Name, LastBackupDate</p>
<p>}</p></blockquote>
<p>Hope this help &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://techibee.com/sql/powershell-get-last-backup-datetime-of-sql-databases/971/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell Query databases list from SQL server</title>
		<link>http://techibee.com/powershell/powershell-query-databases-list-from-sql-server/960?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=powershell-query-databases-list-from-sql-server</link>
		<comments>http://techibee.com/powershell/powershell-query-databases-list-from-sql-server/960#comments</comments>
		<pubDate>Wed, 13 Apr 2011 15:43:37 +0000</pubDate>
		<dc:creator>Sitaram Pamarthi</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://techibee.com/?p=960</guid>
		<description><![CDATA[Below small function helps you to list databases in a given database server using powershell. This will come handy for you when you quickly want to check the databases list without logging on to the server. function Get-SQLDatabases { param( [Parameter(mandatory=$true)] [string]$DBServer ) [System.Reflection.Assembly]::LoadWithPartialName(&#8216;Microsoft.SqlServer.SMO&#8217;) &#124; Out-Null $server = New-Object (&#8216;Microsoft.SqlServer.Management.Smo.Server&#8217;) &#8220;$DBServer&#8221; $server.databases &#124; select Name [...]]]></description>
			<content:encoded><![CDATA[<p>Below small function helps you to list databases in a given database server using powershell. This will come handy for you when you quickly want to check the databases list without logging on to the server.</p>
<blockquote><p>function Get-SQLDatabases {<br />
param(<br />
[Parameter(mandatory=$true)]<br />
[string]$DBServer<br />
)<br />
[System.Reflection.Assembly]::LoadWithPartialName(&#8216;Microsoft.SqlServer.SMO&#8217;) | Out-Null</p>
<p>$server = New-Object (&#8216;Microsoft.SqlServer.Management.Smo.Server&#8217;) &#8220;$DBServer&#8221;<br />
$server.databases | select Name</p>
<p>}</p></blockquote>
<p><strong>Usage :</strong></p>
<blockquote><p>C:&gt;Get-SQLDatabases -DBServer MSSQLSRV1</p></blockquote>
<p>Hope this helps&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://techibee.com/powershell/powershell-query-databases-list-from-sql-server/960/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Free e-Book on Microsoft SQL 2008 R2 by MS Press</title>
		<link>http://techibee.com/sql/free-e-book-on-microsoft-sql-2008-r2-by-ms-press/437?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=free-e-book-on-microsoft-sql-2008-r2-by-ms-press</link>
		<comments>http://techibee.com/sql/free-e-book-on-microsoft-sql-2008-r2-by-ms-press/437#comments</comments>
		<pubDate>Mon, 19 Apr 2010 12:21:26 +0000</pubDate>
		<dc:creator>Sitaram Pamarthi</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://techibee.com/?p=437</guid>
		<description><![CDATA[As subject says, MS has released a new FREE e-book on MS SQL 2008 R2 a few days back. You can grab a copy of it from MS Press Blog]]></description>
			<content:encoded><![CDATA[<p>As subject says, MS has released a new FREE e-book on MS SQL 2008 R2 a few days back. You can grab a copy of it from <a href="http://blogs.msdn.com/microsoft_press/archive/2010/04/14/free-ebook-introducing-microsoft-sql-server-2008-r2.aspx" target="_blank">MS Press Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techibee.com/sql/free-e-book-on-microsoft-sql-2008-r2-by-ms-press/437/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unexpected error (0&#215;80070002) while installing SQL 2005 named instance</title>
		<link>http://techibee.com/sql/unexpected-error-0x80070002-while-installing-sql-2005-named-instance/129?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=unexpected-error-0x80070002-while-installing-sql-2005-named-instance</link>
		<comments>http://techibee.com/sql/unexpected-error-0x80070002-while-installing-sql-2005-named-instance/129#comments</comments>
		<pubDate>Mon, 19 Oct 2009 15:38:00 +0000</pubDate>
		<dc:creator>Sitaram Pamarthi</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://techibee.com/sysadmins/unexpected-error-0x80070002-while-installing-sql-2005-named-instance/129</guid>
		<description><![CDATA[While installing cluster instance, it is failing at the initial stage of setup with unexpected error message pop-up. I reviewed the “C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGsummary.txt” log file and it has the below error.Microsoft SQL Server 2005 9.00.4035.00 ============================== OS Version : Microsoft Windows Server 2003 family, Enterprise Edition Service Pack 2 (Build 3790) Time [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: Verdana, sans-serif;">While installing cluster instance, it is failing at the initial stage of setup with unexpected error message pop-up. I reviewed the “C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGsummary.txt” log file and it has the below error.</span><br /><span style="font-family: Verdana, sans-serif;"><br /></span><br /><em><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Microsoft SQL Server 2005 9.00.4035.00 </span></em><br /><em><span style="font-family: Verdana, sans-serif; font-size: xx-small;">============================== </span></em><br /><em><span style="font-family: Verdana, sans-serif; font-size: xx-small;">OS Version : Microsoft Windows Server 2003 family, Enterprise Edition Service Pack 2 (Build 3790) </span></em><br /><em><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Time : Fri Oct 16 12:53:22 2009 </span></em><br /><em><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;"></span></em><br /><em><span style="font-family: Verdana, sans-serif; font-size: xx-small;">NODE1 : To change an existing instance of Microsoft SQL Server 2005 to a different edition of SQL Server 2005, you must run SQL Server 2005 Setup from the command prompt and include the SKUUPGRADE=1 parameter.</span></em><br /><em><span style="font-family: Verdana, sans-serif; font-size: xx-small;">NODE1 : There was an unexpected failure during the setup wizard. You may review the setup logs and/or click the help button for more information.</span></em></p>
<p><span style="font-family: Verdana, sans-serif;">There can be two reasons here…</span><span style="font-family: Verdana, sans-serif;"><br /></span><br /><span style="font-family: Verdana, sans-serif;">1) Improper directory structure in SQL installation source</span><br /><span style="font-family: Verdana, sans-serif;">2) You are trying to install different version of SQL than what you have on cluster.</span><span style="font-family: Verdana, sans-serif;"><br /></span><br /><span style="font-family: Verdana, sans-serif;">If you find both the above are not applicable in your case, then go to “C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0018_<node -name>_Core(Patched).log” log file and see what it says. In my case, I have below error message in the logs which is indicating problems with reading one of the shared drive Q:. Sometime back I have moved system databases from one drive to another for a cluster instance and deleted the old drive. But the regkey(HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL ServerMSSQL.9SetupSetupDataRoot) is still containing the old drive letter. Cluster setup is trying to read this key and failing because it cannot find the cluster drive Q: which I deleted some time back.</node></span><span style="font-family: Verdana, sans-serif;"><br /></span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Failed to find property &#8220;ComputerList&#8221; {&#8220;SqlComputers&#8221;, &#8220;&#8221;, &#8220;&#8221;} in cache</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Source File Name: datastoreclusterinfocollector.cpp</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Compiler Timestamp: Mon Nov 17 17:05:55 2008</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Function Name: ClusterInfoCollector::collectClusterVSInfo</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Source Line Number: 888</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Failed to detect VS info due to datastore exception.</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Source File Name: datastoreclustergroupsproperties.cpp</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Compiler Timestamp: Mon Nov 17 17:05:55 2008</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Function Name: ClusterGroupScope.SharedDisks</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Source Line Number: 56</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Failed to find a cluster group that owned shared disk:Q:</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">WinException : 2</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Error Code: 0&#215;80070002 (2)</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">Windows Error Text: The system cannot find the file specified.</span><br /><span style="font-family: Verdana, sans-serif; font-size: xx-small;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span><br /><span style="font-family: Verdana, sans-serif;"><br /></span><br /><span style="font-family: Verdana, sans-serif;">Now I went ahead and changed the registry key value to new drive name in all cluster nodes and restarted the setup. It worked like a champ and I continued with my work. I am posting here it to help others who stuck with same problem. This may not be the cause always but I am just outlining the procedure for troubleshooting.</span><span style="font-family: Verdana, sans-serif;"><br /></span><br /><span style="font-family: Verdana, sans-serif;">Happy learning…,</span><br /><span style="font-family: Verdana, sans-serif;">Sitaram Pamarthi</span></p>
]]></content:encoded>
			<wfw:commentRss>http://techibee.com/sql/unexpected-error-0x80070002-while-installing-sql-2005-named-instance/129/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

