<?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, 06 Feb 2012 09:40:40 +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>PowerShell Get Last Backup date/time of SQL databases</title>
		<link>http://techibee.com/sql/powershell-get-last-backup-datetime-of-sql-databases/971</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[<div class="rw-right"><div class="rw-ui-container rw-class-blog-post rw-urid-9720"></div></div><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</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[<div class="rw-right"><div class="rw-ui-container rw-class-blog-post rw-urid-9610"></div></div><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</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[<div class="rw-right"><div class="rw-ui-container rw-class-blog-post rw-urid-4380"></div></div><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</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[<div class="rw-right"><div class="rw-ui-container rw-class-blog-post rw-urid-1300"></div></div><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>

