<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title></title>
	<atom:link href="http://sqldbpool.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sqldbpool.com</link>
	<description></description>
	<lastBuildDate>Sun, 28 Apr 2013 13:14:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='sqldbpool.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/61033c99c4f07025d9a57671bd6aa687?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title></title>
		<link>http://sqldbpool.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sqldbpool.com/osd.xml" title="" />
	<atom:link rel='hub' href='http://sqldbpool.com/?pushpress=hub'/>
		<item>
		<title>How to make Lite Speed Central database and Local repository in sync?</title>
		<link>http://sqldbpool.com/2013/03/25/how-to-make-lite-speed-central-database-and-local-repository-in-sync/</link>
		<comments>http://sqldbpool.com/2013/03/25/how-to-make-lite-speed-central-database-and-local-repository-in-sync/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 01:17:49 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[DB Articles]]></category>
		<category><![CDATA[DB Notes]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2011 (Denali)]]></category>
		<category><![CDATA[Central]]></category>
		<category><![CDATA[litespeed]]></category>
		<category><![CDATA[Sync]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2100</guid>
		<description><![CDATA[If you have configured the LiteSpeed in your environment using the Lite Speed Central repository option, there will be a scenario when Lite Speed Central repository misses some data. To make the data available in central repository you can use the LiteSpeed local database and execute the below procedure to ensure that cenral repository comes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2100&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>If you have configured the LiteSpeed in your environment using the <strong>Lite Speed Central repository option</strong>, there will be a scenario when Lite Speed Central repository misses some data. To make the data available in central repository you can use the LiteSpeed local database and execute the below procedure to ensure that cenral repository comes in sync with the local repository.</p>
<p><strong>exec dbo.xp_replicate_activity_statistics</strong></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/database/'>Database</a>, <a href='http://sqldbpool.com/category/notes/db-articles/'>DB Articles</a>, <a href='http://sqldbpool.com/category/notes/db-notes/'>DB Notes</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a> Tagged: <a href='http://sqldbpool.com/tag/central/'>Central</a>, <a href='http://sqldbpool.com/tag/litespeed/'>litespeed</a>, <a href='http://sqldbpool.com/tag/sync/'>Sync</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2100&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2013/03/25/how-to-make-lite-speed-central-database-and-local-repository-in-sync/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>
	</item>
		<item>
		<title>Permission required for SP_UpdateStats</title>
		<link>http://sqldbpool.com/2013/03/19/permission-required-for-sp_updatestats/</link>
		<comments>http://sqldbpool.com/2013/03/19/permission-required-for-sp_updatestats/#comments</comments>
		<pubDate>Tue, 19 Mar 2013 22:43:48 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[DB Articles]]></category>
		<category><![CDATA[DB Notes]]></category>
		<category><![CDATA[Microsoft Technologies]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2011 (Denali)]]></category>
		<category><![CDATA[DBO]]></category>
		<category><![CDATA[SP_UpdateStats]]></category>
		<category><![CDATA[SysAdmin]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2094</guid>
		<description><![CDATA[To update the statistics on the database you should either be DBO of that database or SysAdmin on SQL instance. If you want to grant the least permission instead of server level permission you make the user DBO of the database. You can do it from database properties windows as below. You can also make [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2094&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>To update the statistics on the database you should either be DBO of that database or SysAdmin on SQL instance.<br />
<a href="http://sqldbpool.files.wordpress.com/2013/03/spupdatestats.jpg"><img src="http://sqldbpool.files.wordpress.com/2013/03/spupdatestats.jpg?w=660" alt="SPUpdateStats"   class="alignnone size-full wp-image-2095" /></a></p>
<p>If you want to grant the least permission instead of server level permission you make the user DBO of the database. You can do it from database properties windows as below.</p>
<p><a href="http://sqldbpool.files.wordpress.com/2013/03/dbo1.jpg"><img src="http://sqldbpool.files.wordpress.com/2013/03/dbo1.jpg?w=660&#038;h=131" alt="DBO" width="660" height="131" class="alignnone size-full wp-image-2097" /></a></p>
<p>You can also make the user DBO using below command.</p>
<p>USE [My_Policy]<br />
GO<br />
EXEC dbo.sp_changedbowner @loginame = N&#8217;jugal&#8217;, @map = false<br />
GO</p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/database/'>Database</a>, <a href='http://sqldbpool.com/category/notes/db-articles/'>DB Articles</a>, <a href='http://sqldbpool.com/category/notes/db-notes/'>DB Notes</a>, <a href='http://sqldbpool.com/category/notes/microsoft-technologies/'>Microsoft Technologies</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a> Tagged: <a href='http://sqldbpool.com/tag/dbo/'>DBO</a>, <a href='http://sqldbpool.com/tag/sp_updatestats/'>SP_UpdateStats</a>, <a href='http://sqldbpool.com/tag/sysadmin/'>SysAdmin</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2094/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2094/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2094&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2013/03/19/permission-required-for-sp_updatestats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2013/03/spupdatestats.jpg" medium="image">
			<media:title type="html">SPUpdateStats</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2013/03/dbo1.jpg" medium="image">
			<media:title type="html">DBO</media:title>
		</media:content>
	</item>
		<item>
		<title>ORIGINAL_LOGIN() and SUSER_SNAME() functions</title>
		<link>http://sqldbpool.com/2013/02/25/original_login-and-suser_sname-functions/</link>
		<comments>http://sqldbpool.com/2013/02/25/original_login-and-suser_sname-functions/#comments</comments>
		<pubDate>Mon, 25 Feb 2013 23:36:29 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2011 (Denali)]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2088</guid>
		<description><![CDATA[ORIGINAL_LOGIN() function returns the name of the original login that connected to the instance of SQL Server and is used to identify original login in all sessions. Even though you will do the security context switch it will return the original login name. SUSER_SNAME returns the name of user in the current security context. Check [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2088&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>ORIGINAL_LOGIN()</strong> function returns the name of the original login that connected to the instance of SQL Server and is used to identify original login in all sessions.  Even though you will do the security context switch it will return the original login name.</p>
<p><strong>SUSER_SNAME</strong> returns the name of user in the current security context. </p>
<pre class="brush: sql; title: ; notranslate">
--connect SQL Using LoginDEMO account
SELECT ORIGINAL_LOGIN() Original_Login_func, SUSER_SNAME() Suser_Name_Login_Func

--Executing query using LoginTest account
execute as login = 'LoginTest'
SELECT ORIGINAL_LOGIN() Original_Login_func, SUSER_SNAME() Suser_Name_Login_Func
revert

--Again executing query be reverting the change
SELECT ORIGINAL_LOGIN() Original_Login_func, SUSER_SNAME() Suser_Name_Login_Func
</pre>
<p>Check below output image for more information. I connected SQL Server using LoginDemo account.<br />
<a href="http://sqldbpool.files.wordpress.com/2013/02/capture1.jpg"><img src="http://sqldbpool.files.wordpress.com/2013/02/capture1.jpg?w=660&#038;h=453" alt="New" width="660" height="453" class="alignnone size-full wp-image-2090" /></a></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/sql-scripts/'>SQL Scripts</a>, <a href='http://sqldbpool.com/category/notes/sql-server-notes/'>SQL Server</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a> Tagged: <a href='http://sqldbpool.com/tag/script/'>Script</a>, <a href='http://sqldbpool.com/tag/t-sql/'>T-SQL</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2088/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2088/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2088&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2013/02/25/original_login-and-suser_sname-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2013/02/capture1.jpg" medium="image">
			<media:title type="html">New</media:title>
		</media:content>
	</item>
		<item>
		<title>Script to get the Last Backup Date of database full and t-log backup</title>
		<link>http://sqldbpool.com/2013/02/25/script-to-get-the-last-backup-date-of-database-full-and-t-log-backup/</link>
		<comments>http://sqldbpool.com/2013/02/25/script-to-get-the-last-backup-date-of-database-full-and-t-log-backup/#comments</comments>
		<pubDate>Mon, 25 Feb 2013 22:50:23 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2011 (Denali)]]></category>
		<category><![CDATA[SQL Server 2012]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2084</guid>
		<description><![CDATA[To get the max backup date of the database or to check whether database is backed up or not. You can execute below script to check the last backup date. Filed under: SQL Server 2008, SQL Server 2008 R2, SQL Server 2011 (Denali), SQL Server 2012<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2084&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>To get the max backup date of the database or to check whether database is backed up or not. You can execute below script to check the last backup date.</p>
<pre class="brush: sql; title: ; notranslate">
SELECT   d.name,
         MAX(b.backup_finish_date) AS backupfinishdate
FROM     master.sys.sysdatabases d
         LEFT OUTER JOIN msdb..backupset b
         ON       b.database_name = d.name
         AND      b.type          = 'D'
GROUP BY d.name
ORDER BY backup_finish_date DESC


SELECT   d.name,
         MAX(b.backup_finish_date) AS backupfinishdate
FROM     master.sys.sysdatabases d
         LEFT OUTER JOIN msdb..backupset b
         ON       b.database_name = d.name
         AND      b.type          = 'L'
GROUP BY d.name
ORDER BY backup_finish_date DESC
</pre>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a>, <a href='http://sqldbpool.com/category/sql-server-2012/'>SQL Server 2012</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2084/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2084/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2084&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2013/02/25/script-to-get-the-last-backup-date-of-database-full-and-t-log-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>
	</item>
		<item>
		<title>Script to get the database backup history</title>
		<link>http://sqldbpool.com/2013/02/25/script-to-get-the-database-backup-history/</link>
		<comments>http://sqldbpool.com/2013/02/25/script-to-get-the-database-backup-history/#comments</comments>
		<pubDate>Mon, 25 Feb 2013 22:46:52 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2011 (Denali)]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[backup history]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2082</guid>
		<description><![CDATA[For the point time recovery or in case of failure it is essential that you should have the backup history of the database. You can execute the below query against the database to get the backup history. Filed under: SQL Scripts, SQL Server 2008, SQL Server 2008 R2, SQL Server 2011 (Denali), SQL Server 2012 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2082&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>For the point time recovery or in case of failure it is essential that you should have the backup history of the database. You can execute the below query against the database to get the backup history.</p>
<pre class="brush: sql; title: ; notranslate">
SELECT  
   CONVERT(CHAR(100), SERVERPROPERTY('Servername')) AS Server, 
   msdb.dbo.backupset.database_name,  
   msdb.dbo.backupset.backup_start_date,  
   msdb.dbo.backupset.backup_finish_date, 
   msdb.dbo.backupset.expiration_date, 
   CASE msdb..backupset.type  
       WHEN 'D' THEN 'Database'  
       WHEN 'L' THEN 'Log'  
   END AS backup_type,  
   msdb.dbo.backupmediafamily.logical_device_name,  
   msdb.dbo.backupmediafamily.physical_device_name,   
   msdb.dbo.backupset.name AS backupset_name, 
   msdb.dbo.backupset.description 
FROM   msdb.dbo.backupmediafamily  
   INNER JOIN msdb.dbo.backupset ON msdb.dbo.backupmediafamily.media_set_id = msdb.dbo.backupset.media_set_id 
WHERE 
(CONVERT(datetime, msdb.dbo.backupset.backup_start_date, 102) &gt;= '2013-01-08 00:04:49.000')  and (CONVERT(datetime, msdb.dbo.backupset.backup_start_date, 102) &lt;= '2013-01-08 23:59:59')  
and  msdb.dbo.backupset.database_name = 'Mention the database name'
ORDER BY  
   msdb.dbo.backupset.backup_finish_date desc
</pre>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/sql-scripts/'>SQL Scripts</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a>, <a href='http://sqldbpool.com/category/sql-server-2012/'>SQL Server 2012</a> Tagged: <a href='http://sqldbpool.com/tag/backup-history/'>backup history</a>, <a href='http://sqldbpool.com/tag/script/'>Script</a>, <a href='http://sqldbpool.com/tag/t-sql/'>T-SQL</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2082/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2082/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2082&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2013/02/25/script-to-get-the-database-backup-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>
	</item>
		<item>
		<title>SA account property/password change</title>
		<link>http://sqldbpool.com/2013/02/05/sa-account-propertypassword-change/</link>
		<comments>http://sqldbpool.com/2013/02/05/sa-account-propertypassword-change/#comments</comments>
		<pubDate>Tue, 05 Feb 2013 01:09:25 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[DB Articles]]></category>
		<category><![CDATA[DB Notes]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[password change]]></category>
		<category><![CDATA[SA Account]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2069</guid>
		<description><![CDATA[You can use below script to get an idean when was the last time SA account property/password changed. Filed under: Database, DB Articles, DB Notes, SQL Scripts, SQL Server, SQL Server 2008, SQL Server 2008 R2 Tagged: password change, SA Account, T-SQL<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2069&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>You can use below script to get an idean when was the last time SA account property/password changed.</p>
<pre class="brush: sql; title: ; notranslate">
USE Master
GO
SELECT [name], sid, create_date, modify_date
FROM sys.sql_logins
WHERE [name] = 'sa'
GO
</pre>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/database/'>Database</a>, <a href='http://sqldbpool.com/category/notes/db-articles/'>DB Articles</a>, <a href='http://sqldbpool.com/category/notes/db-notes/'>DB Notes</a>, <a href='http://sqldbpool.com/category/notes/sql-scripts/'>SQL Scripts</a>, <a href='http://sqldbpool.com/category/notes/sql-server-notes/'>SQL Server</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a> Tagged: <a href='http://sqldbpool.com/tag/password-change/'>password change</a>, <a href='http://sqldbpool.com/tag/sa-account/'>SA Account</a>, <a href='http://sqldbpool.com/tag/t-sql/'>T-SQL</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2069/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2069/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2069&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2013/02/05/sa-account-propertypassword-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>
	</item>
		<item>
		<title>Important Trace Flags for DBA</title>
		<link>http://sqldbpool.com/2013/02/05/important-trace-flags-for-dba/</link>
		<comments>http://sqldbpool.com/2013/02/05/important-trace-flags-for-dba/#comments</comments>
		<pubDate>Tue, 05 Feb 2013 01:00:35 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[DB Articles]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2011 (Denali)]]></category>
		<category><![CDATA[DBCC]]></category>
		<category><![CDATA[Trace flag]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2066</guid>
		<description><![CDATA[A trace flag is used to set specific server characteristics or to switch off a particular behavior of the SQL Server. You can enable the trace flag from Startup Parameters, Session and Global Session level. Trace Flag 610 : Minimally logged DML operations into Indexed tables, transaction log and allow bulk loading Trace Flag 4199 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2066&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A trace flag is used to set specific server characteristics or to switch off a particular behavior of the SQL Server.</p>
<p>You can enable the trace flag from Startup Parameters, Session and Global Session level.</p>
<pre class="brush: sql; title: ; notranslate">
DBCC TraceON(Flag Number) – at session level
DBCC TraceON(Flag Number, -1) -- Global
</pre>
<p>Trace Flag 610  : Minimally logged DML operations into Indexed tables, transaction log and allow bulk loading<br />
Trace Flag 4199 : enable query optimizer fixes<br />
Trace Flag 1222 : writes the deadlock information in XML format into error log<br />
Trace flag 835  : Enable the Lock Pages in memory for standard edition<br />
Trace flag 1118 : Directs SQL Server to allocate full extents to each tempDB objects<br />
Trace flag 1204 : Write information about the deadlock in text format<br />
Trace flag 1211 : Disable the lock escalation based on the memory pressure<br />
Trace flag 3226 : Prevents successful backup operation being logged<br />
Trace flag 3014 : Returns more information to error log about backup operation<br />
Trace flag 3502 : Write information about the checkpoint in the error log<br />
Trace flag 3505 : Disables automatic checkpoint<br />
Trace flag 3004 : Returns more information about the instant file initialization<br />
Trace flag 1806 : Disables the instant file initialization</p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/database/'>Database</a>, <a href='http://sqldbpool.com/category/notes/db-articles/'>DB Articles</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a> Tagged: <a href='http://sqldbpool.com/tag/dbcc/'>DBCC</a>, <a href='http://sqldbpool.com/tag/trace-flag/'>Trace flag</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2066/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2066/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2066&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2013/02/05/important-trace-flags-for-dba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>
	</item>
		<item>
		<title>How to monitor SQL Server Services of multiple instances?</title>
		<link>http://sqldbpool.com/2013/01/28/how-to-monitor-sql-server-services-of-multiple-instances/</link>
		<comments>http://sqldbpool.com/2013/01/28/how-to-monitor-sql-server-services-of-multiple-instances/#comments</comments>
		<pubDate>Mon, 28 Jan 2013 13:11:11 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[Monitor]]></category>
		<category><![CDATA[Power Shell]]></category>
		<category><![CDATA[Server Down]]></category>
		<category><![CDATA[SQL Services]]></category>
		<category><![CDATA[Unable to Connect]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2063</guid>
		<description><![CDATA[Problem: I have a need to monitor the SQL Server Services in my environment. Are there any programmatic options to do so? Check out this tip to learn more. Solution: http://www.mssqltips.com/sqlservertip/2867/steps-to-monitor-the-sql-server-services/ Filed under: SQL Server, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 Tagged: Monitor, Power Shell, Server Down, SQL Services, Unable to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2063&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>Problem:</strong><br />
I have a need to monitor the SQL Server Services in my environment.  Are there any programmatic options to do so?  Check out this tip to learn more.</p>
<p><strong>Solution:</strong><br />
<a href="http://www.mssqltips.com/sqlservertip/2867/steps-to-monitor-the-sql-server-services/">http://www.mssqltips.com/sqlservertip/2867/steps-to-monitor-the-sql-server-services/</a></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/sql-server-notes/'>SQL Server</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a>, <a href='http://sqldbpool.com/category/sql-server-2012/'>SQL Server 2012</a> Tagged: <a href='http://sqldbpool.com/tag/monitor/'>Monitor</a>, <a href='http://sqldbpool.com/tag/power-shell/'>Power Shell</a>, <a href='http://sqldbpool.com/tag/server-down/'>Server Down</a>, <a href='http://sqldbpool.com/tag/sql-services/'>SQL Services</a>, <a href='http://sqldbpool.com/tag/unable-to-connect/'>Unable to Connect</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2063/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2063/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2063&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2013/01/28/how-to-monitor-sql-server-services-of-multiple-instances/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>
	</item>
		<item>
		<title>Get the List Of DBCC Commands &amp; Syntax</title>
		<link>http://sqldbpool.com/2013/01/08/get-the-list-of-dbcc-commands/</link>
		<comments>http://sqldbpool.com/2013/01/08/get-the-list-of-dbcc-commands/#comments</comments>
		<pubDate>Tue, 08 Jan 2013 01:25:27 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[DB Articles]]></category>
		<category><![CDATA[DB Notes]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2011 (Denali)]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SQL Script]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2054</guid>
		<description><![CDATA[If you don&#8217;t remember all the DBCC commands &#8220;NO Issue&#8221; execute the DBCC HELP command to get the list of all the DBCC. checkalloc checkcatalog checkconstraints checkdb checkfilegroup checkident checktable cleantable dbreindex dropcleanbuffers free freeproccache freesessioncache freesystemcache help indexdefrag inputbuffer opentran outputbuffer pintable proccache show_statistics showcontig shrinkdatabase shrinkfile sqlperf traceoff traceon tracestatus unpintable updateusage useroptions [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2054&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>If you don&#8217;t remember all the <strong>DBCC commands</strong> <strong>&#8220;NO Issue&#8221;</strong> execute the <strong>DBCC HELP</strong> command to get the list of all the DBCC.</p>
<pre class="brush: sql; title: ; notranslate">
DBCC HELP('?')
</pre>
<p>checkalloc<br />
checkcatalog<br />
checkconstraints<br />
checkdb<br />
checkfilegroup<br />
checkident<br />
checktable<br />
cleantable<br />
dbreindex<br />
dropcleanbuffers<br />
free<br />
freeproccache<br />
freesessioncache<br />
freesystemcache<br />
help<br />
indexdefrag<br />
inputbuffer<br />
opentran<br />
outputbuffer<br />
pintable<br />
proccache<br />
show_statistics<br />
showcontig<br />
shrinkdatabase<br />
shrinkfile<br />
sqlperf<br />
traceoff<br />
traceon<br />
tracestatus<br />
unpintable<br />
updateusage<br />
useroptions</p>
<p>DBCC execution completed. If DBCC printed error messages, contact your system administrator.</p>
<p>Don&#8217;t remember syntax, execute below command to get the syntax.</p>
<pre class="brush: sql; title: ; notranslate">
DBCC HELP('checktable')
</pre>
<p><a href="http://sqldbpool.files.wordpress.com/2013/01/dbcc.jpg"><img src="http://sqldbpool.files.wordpress.com/2013/01/dbcc.jpg?w=660" alt="DBCC"   class="alignnone size-full wp-image-2057" /></a></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/database/'>Database</a>, <a href='http://sqldbpool.com/category/notes/db-articles/'>DB Articles</a>, <a href='http://sqldbpool.com/category/notes/db-notes/'>DB Notes</a>, <a href='http://sqldbpool.com/category/notes/sql-scripts/'>SQL Scripts</a>, <a href='http://sqldbpool.com/category/notes/sql-server-notes/'>SQL Server</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a>, <a href='http://sqldbpool.com/category/sql-server-2012/'>SQL Server 2012</a> Tagged: <a href='http://sqldbpool.com/tag/sql-script/'>SQL Script</a>, <a href='http://sqldbpool.com/tag/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://sqldbpool.com/tag/tsql/'>TSQL</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2054/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2054/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2054&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2013/01/08/get-the-list-of-dbcc-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2013/01/dbcc.jpg" medium="image">
			<media:title type="html">DBCC</media:title>
		</media:content>
	</item>
		<item>
		<title>Script to get the SQL Agent Properties</title>
		<link>http://sqldbpool.com/2013/01/08/script-to-get-the-sql-agent-properties/</link>
		<comments>http://sqldbpool.com/2013/01/08/script-to-get-the-sql-agent-properties/#comments</comments>
		<pubDate>Tue, 08 Jan 2013 01:16:51 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[DB Articles]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2011 (Denali)]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SQL Script]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2051</guid>
		<description><![CDATA[You can use the sp_get_sqlagent_properties undocumented stored procedure to retrieve the SQL Agent properties of a SQL Instance. It is available in SQL Server MSDB database. This procedure only works if the SQL Agetn Service is started. Filed under: Database, DB Articles, SQL Server, SQL Server 2008, SQL Server 2008 R2, SQL Server 2011 (Denali), [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2051&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>You can use the <strong>sp_get_sqlagent_properties</strong> undocumented stored procedure to retrieve the SQL Agent properties of a SQL Instance. It is available in SQL Server MSDB database. This procedure only works if the SQL Agetn Service is started.</p>
<p><a href="http://sqldbpool.files.wordpress.com/2013/01/sqlagent.jpg"><img src="http://sqldbpool.files.wordpress.com/2013/01/sqlagent.jpg?w=660" alt="SQLAgent"   class="alignnone size-full wp-image-2052" /></a></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/database/'>Database</a>, <a href='http://sqldbpool.com/category/notes/db-articles/'>DB Articles</a>, <a href='http://sqldbpool.com/category/notes/sql-server-notes/'>SQL Server</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a>, <a href='http://sqldbpool.com/category/sql-server-2012/'>SQL Server 2012</a> Tagged: <a href='http://sqldbpool.com/tag/sql-script/'>SQL Script</a>, <a href='http://sqldbpool.com/tag/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://sqldbpool.com/tag/t-sql/'>T-SQL</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2051/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2051/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2051&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2013/01/08/script-to-get-the-sql-agent-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2013/01/sqlagent.jpg" medium="image">
			<media:title type="html">SQLAgent</media:title>
		</media:content>
	</item>
		<item>
		<title>sys.dm_server_registry</title>
		<link>http://sqldbpool.com/2013/01/08/sys-dm_server_registry/</link>
		<comments>http://sqldbpool.com/2013/01/08/sys-dm_server_registry/#comments</comments>
		<pubDate>Tue, 08 Jan 2013 01:08:02 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[Tips for SQL Server Developer]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2048</guid>
		<description><![CDATA[sys.dm_server_registry DMV gives information about installation and configuration data that is stored in the windows registry for the current instance of SQL server. You can use to check the start up parameters, protocols, error log configuration, agent log configuration and IP Addresses. Filed under: SQL Server 2012 Tagged: Script, SQL Tips and Tricks, T-SQL, Tips [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2048&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>sys.dm_server_registry</strong> DMV gives information about installation and configuration data that is stored in the windows registry for the current instance of SQL server.</p>
<p>You can use to check the start up parameters, protocols, error log configuration, agent log configuration and IP Addresses.</p>
<p><a href="http://sqldbpool.files.wordpress.com/2013/01/sqlreg.jpg"><img src="http://sqldbpool.files.wordpress.com/2013/01/sqlreg.jpg?w=660" alt="SQLReg"   class="alignnone size-full wp-image-2049" /></a></p>
<br />Filed under: <a href='http://sqldbpool.com/category/sql-server-2012/'>SQL Server 2012</a> Tagged: <a href='http://sqldbpool.com/tag/script/'>Script</a>, <a href='http://sqldbpool.com/tag/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://sqldbpool.com/tag/t-sql/'>T-SQL</a>, <a href='http://sqldbpool.com/tag/tips-for-sql-server-developer/'>Tips for SQL Server Developer</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2048/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2048/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2048&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2013/01/08/sys-dm_server_registry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2013/01/sqlreg.jpg" medium="image">
			<media:title type="html">SQLReg</media:title>
		</media:content>
	</item>
		<item>
		<title>Happy New Year &#8211; 2013</title>
		<link>http://sqldbpool.com/2013/01/01/happy-new-year-2013/</link>
		<comments>http://sqldbpool.com/2013/01/01/happy-new-year-2013/#comments</comments>
		<pubDate>Tue, 01 Jan 2013 03:22:47 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2044</guid>
		<description><![CDATA[Wish you &#38; your family very happy &#38; prosperous new year 2013. Filed under: SQL Server<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2044&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Wish you &amp; your family very happy &amp; prosperous new year 2013.</p>
<p><a href="http://sqldbpool.com/2013/01/01/happy-new-year-2013/13065389-happy-new-year-2013/" rel="attachment wp-att-2045"><img src="http://sqldbpool.files.wordpress.com/2013/01/13065389-happy-new-year-2013.jpg?w=660" alt="13065389-happy-new-year-2013"   class="alignnone size-full wp-image-2045" /></a></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/sql-server-notes/'>SQL Server</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2044/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2044/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2044&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2013/01/01/happy-new-year-2013/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2013/01/13065389-happy-new-year-2013.jpg" medium="image">
			<media:title type="html">13065389-happy-new-year-2013</media:title>
		</media:content>
	</item>
		<item>
		<title>Steps to Move SQL Server Log Shipping Secondary Database Files</title>
		<link>http://sqldbpool.com/2012/12/28/steps-to-move-sql-server-log-shipping-secondary-database-files/</link>
		<comments>http://sqldbpool.com/2012/12/28/steps-to-move-sql-server-log-shipping-secondary-database-files/#comments</comments>
		<pubDate>Fri, 28 Dec 2012 16:20:30 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2011 (Denali)]]></category>
		<category><![CDATA[SQL Server 2012]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2040</guid>
		<description><![CDATA[Problem With SQL Server is it possible to move the secondary database involved with Log Shipping to a different drive without disturbing the Log Shipping configuration? If so, what are the steps to accomplish this task? Check out this tip to learn more. Solution http://www.mssqltips.com/sqlservertip/2836/steps-to-move-sql-server-log-shipping-secondary-database-files/ Filed under: Database, SQL Server 2008, SQL Server 2008 R2, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2040&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>Problem</strong><br />
With SQL Server is it possible to move the secondary database involved with Log Shipping to a different drive without disturbing the Log Shipping configuration?  If so, what are the steps to accomplish this task?  Check out this tip to learn more.</p>
<p><strong>Solution</strong><br />
<a href="http://www.mssqltips.com/sqlservertip/2836/steps-to-move-sql-server-log-shipping-secondary-database-files/" target="_blank">http://www.mssqltips.com/sqlservertip/2836/steps-to-move-sql-server-log-shipping-secondary-database-files/</a></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/database/'>Database</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a>, <a href='http://sqldbpool.com/category/sql-server-2012/'>SQL Server 2012</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2040/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2040/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2040&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/12/28/steps-to-move-sql-server-log-shipping-secondary-database-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>
	</item>
		<item>
		<title>sys.dm_server_services</title>
		<link>http://sqldbpool.com/2012/12/20/sys-dm_server_services/</link>
		<comments>http://sqldbpool.com/2012/12/20/sys-dm_server_services/#comments</comments>
		<pubDate>Thu, 20 Dec 2012 00:26:20 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2011 (Denali)]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SQL Services]]></category>
		<category><![CDATA[sys.dm_server_services]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2036</guid>
		<description><![CDATA[sys.dm_server_services DMV is available in SQL Server 2008 R2 SP1 and SQL Server 2012. It will return the information about the below SQL Services on the current instance. SQL Server (2008 R2 SP1 and SQL Server 2012) SQL Server Agent services(2008 R2 SP1 and SQL Server 2012) Full-Text(SQL Server 2012) Filed under: SQL Server 2008 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2036&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>sys.dm_server_services</strong> DMV is available in SQL Server 2008 R2 SP1 and SQL Server 2012. It will return the information about the below SQL Services on the current instance.</p>
<ul>
<li>SQL Server (2008 R2 SP1 and SQL Server 2012)</li>
<li>SQL Server Agent services(2008 R2 SP1 and SQL Server 2012)</li>
<li>Full-Text(SQL Server 2012)</li>
</ul>
<p><a href="http://sqldbpool.com/2012/12/20/sys-dm_server_services/ps-2/" rel="attachment wp-att-2037"><img src="http://sqldbpool.files.wordpress.com/2012/12/ps1.jpg?w=660" alt="PS"   class="alignnone size-full wp-image-2037" /></a></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a>, <a href='http://sqldbpool.com/category/sql-server-2012/'>SQL Server 2012</a> Tagged: <a href='http://sqldbpool.com/tag/sql-services/'>SQL Services</a>, <a href='http://sqldbpool.com/tag/sys-dm_server_services/'>sys.dm_server_services</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2036/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2036/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2036&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/12/20/sys-dm_server_services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2012/12/ps1.jpg" medium="image">
			<media:title type="html">PS</media:title>
		</media:content>
	</item>
		<item>
		<title>Powershell Script to get the Operating System Infomrmation</title>
		<link>http://sqldbpool.com/2012/12/13/powershell-script-to-get-the-operating-system-infomrmation/</link>
		<comments>http://sqldbpool.com/2012/12/13/powershell-script-to-get-the-operating-system-infomrmation/#comments</comments>
		<pubDate>Thu, 13 Dec 2012 05:50:07 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[Windows OS]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2032</guid>
		<description><![CDATA[You can use the Win32_OperatingSystem class to get the Operating system info. Filed under: Windows OS<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2032&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>You can use the Win32_OperatingSystem class to get the Operating system info.</p>
<pre class="brush: sql; title: ; notranslate">
$hostname = &quot;Enter Computer Name&quot;
Get-WmiObject -class win32_operatingsystem -computer $hostname | select-object *
</pre>
<p><a href="http://sqldbpool.com/2012/12/13/powershell-script-to-get-the-operating-system-infomrmation/ps/" rel="attachment wp-att-2033"><img class="alignnone size-full wp-image-2033" alt="PS" src="http://sqldbpool.files.wordpress.com/2012/12/ps.jpg?w=660"   /></a></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/windows-os/'>Windows OS</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2032/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2032/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2032&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/12/13/powershell-script-to-get-the-operating-system-infomrmation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2012/12/ps.jpg" medium="image">
			<media:title type="html">PS</media:title>
		</media:content>
	</item>
		<item>
		<title>Logical function &#8211; Choose &#8211; SQL Server 2012</title>
		<link>http://sqldbpool.com/2012/12/13/logical-function-choose-sql-server-2012/</link>
		<comments>http://sqldbpool.com/2012/12/13/logical-function-choose-sql-server-2012/#comments</comments>
		<pubDate>Thu, 13 Dec 2012 05:19:10 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[Choose]]></category>
		<category><![CDATA[logical function]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2030</guid>
		<description><![CDATA[CHOOSE function is the logical function. It is similar to SWITCH function in .NET. Choose function will return the item at the specified index from the list of values . Filed under: SQL Server 2012 Tagged: Choose, logical function<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2030&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>CHOOSE function is the logical function. It is similar to SWITCH function in .NET. Choose function will return the item at the specified index from the list of values .</p>
<pre class="brush: sql; title: ; notranslate">
-- below query will return &quot;SQLDBPool-2&quot;as output
Select CHOOSE(2,'SQLDBPool','SQLDBPool-2','SQLDBPool-3')

-- below query will return &quot;Thursday&quot;as output
DECLARE @day as int
set @day = 5
SELECT Choose(@day,'Sunday','Monday', 'Tuesday', 'Wednesday','Thursday','Friday','Saturday')
</pre>
<br />Filed under: <a href='http://sqldbpool.com/category/sql-server-2012/'>SQL Server 2012</a> Tagged: <a href='http://sqldbpool.com/tag/choose/'>Choose</a>, <a href='http://sqldbpool.com/tag/logical-function/'>logical function</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2030/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2030/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2030&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/12/13/logical-function-choose-sql-server-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>
	</item>
		<item>
		<title>Link to download Sample SQL Server Databsae</title>
		<link>http://sqldbpool.com/2012/11/27/link-to-download-sample-sql-server-databsae/</link>
		<comments>http://sqldbpool.com/2012/11/27/link-to-download-sample-sql-server-databsae/#comments</comments>
		<pubDate>Tue, 27 Nov 2012 17:24:31 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2011 (Denali)]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2025</guid>
		<description><![CDATA[Filed under: SQL Server 2008, SQL Server 2008 R2, SQL Server 2011 (Denali)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2025&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="attachment_2026" class="wp-caption alignnone" style="width: 678px"><a href="http://msftdbprodsamples.codeplex.com/"><img src="http://sqldbpool.files.wordpress.com/2012/11/sample-db.jpg?w=660" alt="" title="download"   class="size-full wp-image-2026" /></a><p class="wp-caption-text">Click Me to download sample database</p></div>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2025/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2025/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2025&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/11/27/link-to-download-sample-sql-server-databsae/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2012/11/sample-db.jpg" medium="image">
			<media:title type="html">download</media:title>
		</media:content>
	</item>
		<item>
		<title>Script to check &#8211; Login Name and Password are same</title>
		<link>http://sqldbpool.com/2012/11/27/script-to-check-login-name-and-password-are-same/</link>
		<comments>http://sqldbpool.com/2012/11/27/script-to-check-login-name-and-password-are-same/#comments</comments>
		<pubDate>Tue, 27 Nov 2012 01:37:47 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[DB Articles]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2011 (Denali)]]></category>
		<category><![CDATA[Login]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SQL Security]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2023</guid>
		<description><![CDATA[It is always a risk if the user name &#38; password is equal. You can run the below script to find out the list of User/Login name &#38; password which are equal. Filed under: Database, DB Articles, SQL Scripts, SQL Server, SQL Server 2008, SQL Server 2008 R2, SQL Server 2011 (Denali) Tagged: Login, Password, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2023&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>It is always a risk if the user name &amp; password is equal. You can run the below script to find out the list of User/Login name &amp; password which are equal.</p>
<pre class="brush: sql; title: ; notranslate">
select  
cast(@@SERVERNAME as varchar(150)) as SQLInstanceName
,name as [LoginName]
,'Password is same as Login Name' [Description]
from sys.syslogins
WHERE PWDCOMPARE (name,password) = 1
</pre>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/database/'>Database</a>, <a href='http://sqldbpool.com/category/notes/db-articles/'>DB Articles</a>, <a href='http://sqldbpool.com/category/notes/sql-scripts/'>SQL Scripts</a>, <a href='http://sqldbpool.com/category/notes/sql-server-notes/'>SQL Server</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a> Tagged: <a href='http://sqldbpool.com/tag/login/'>Login</a>, <a href='http://sqldbpool.com/tag/password/'>Password</a>, <a href='http://sqldbpool.com/tag/security/'>Security</a>, <a href='http://sqldbpool.com/tag/sql-security/'>SQL Security</a>, <a href='http://sqldbpool.com/tag/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://sqldbpool.com/tag/t-sql/'>T-SQL</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2023/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2023/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2023&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/11/27/script-to-check-login-name-and-password-are-same/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>
	</item>
		<item>
		<title>Script to check the database Properties</title>
		<link>http://sqldbpool.com/2012/11/25/script-to-check-the-database-properties/</link>
		<comments>http://sqldbpool.com/2012/11/25/script-to-check-the-database-properties/#comments</comments>
		<pubDate>Sun, 25 Nov 2012 21:46:45 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2020</guid>
		<description><![CDATA[It is always good to have the idea about the database properties while doing the migration, performance tuning or configuration. You can execute the below script to get the database property information. Filed under: SQL Scripts, SQL Server, SQL Server 2008, SQL Server 2008 R2 Tagged: Script, SQL Tips and Tricks<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2020&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>It is always good to have the idea about the database properties while doing the migration, performance tuning or configuration.</p>
<p>You can execute the below script to get the database property information.</p>
<pre class="brush: sql; title: ; notranslate">
select 
 sysDB.database_id,
 sysDB.Name as 'Database Name',
 syslogin.Name as 'DB Owner',
 sysDB.state_desc,
 sysDB.recovery_model_desc,
 sysDB.collation_name, 
 sysDB.user_access_desc,
 sysDB.compatibility_level, 
 sysDB.is_read_only,
 sysDB.is_auto_close_on,
 sysDB.is_auto_shrink_on,
 sysDB.is_auto_create_stats_on,
 sysDB.is_auto_update_stats_on,
 sysDB.is_fulltext_enabled,
 sysDB.is_trustworthy_on
from sys.databases sysDB
INNER JOIN sys.syslogins syslogin ON sysDB.owner_sid = syslogin.sid
</pre>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/sql-scripts/'>SQL Scripts</a>, <a href='http://sqldbpool.com/category/notes/sql-server-notes/'>SQL Server</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a> Tagged: <a href='http://sqldbpool.com/tag/script/'>Script</a>, <a href='http://sqldbpool.com/tag/sql-tips-and-tricks/'>SQL Tips and Tricks</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2020/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2020/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2020&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/11/25/script-to-check-the-database-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>
	</item>
		<item>
		<title>Monitoring and Troubleshooting using sys.dm_os_ring_buffers</title>
		<link>http://sqldbpool.com/2012/11/25/monitoring-and-troubleshooting-using-sys-dm_os_ring_buffers/</link>
		<comments>http://sqldbpool.com/2012/11/25/monitoring-and-troubleshooting-using-sys-dm_os_ring_buffers/#comments</comments>
		<pubDate>Sun, 25 Nov 2012 19:57:28 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[Ring Buffer]]></category>
		<category><![CDATA[Security Issue]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T-SQL Script]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=2015</guid>
		<description><![CDATA[sys.dm_os_ring_buffers: You can use the undocumented Ring Buffer DMV to troubleshoot the below issues. Security Exceptions Exception raised at SQL Operating System level Connection Dropped By the Server System Resource Utilization Memory Pressure CLR Integration Scheduler State Extended Events Subsystems State Execute the below query to get the distinct ring buffer type. RING_BUFFER_RESOURCE_MONITOR RING_BUFFER_SCHEDULER_MONITOR RING_BUFFER_MEMORY_BROKER [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2015&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>sys.dm_os_ring_buffers:</strong> You can use the undocumented Ring Buffer DMV to troubleshoot the below issues.</p>
<ul>
<li>Security Exceptions</li>
<li>Exception raised at SQL Operating System level</li>
<li>Connection Dropped By the Server</li>
<li>System Resource Utilization</li>
<li>Memory Pressure</li>
<li>CLR Integration Scheduler State</li>
<li>Extended Events Subsystems State</li>
</ul>
<p>Execute the below query to get the distinct <strong>ring buffer type</strong>.</p>
<pre class="brush: sql; title: ; notranslate">
select distinct ring_buffer_type from sys.dm_os_ring_buffers
</pre>
<ul>
<li>RING_BUFFER_RESOURCE_MONITOR</li>
<li>RING_BUFFER_SCHEDULER_MONITOR</li>
<li>RING_BUFFER_MEMORY_BROKER</li>
<li>RING_BUFFER_SECURITY_ERROR</li>
<li>RING_BUFFER_XE_BUFFER_STATE</li>
<li>RING_BUFFER_SCHEDULER</li>
<li>RING_BUFFER_CONNECTIVITY</li>
<li>RING_BUFFER_EXCEPTION</li>
<li>RING_BUFFER_XE_LOG</li>
</ul>
<p>Check below script as example to troubleshoot the Security Issue using ring buffer. You can change the ring buffer type in below script to troubleshoot the different issues.</p>
<pre class="brush: sql; title: ; notranslate">
-- Check the Ring Buffer in SQL Server 2008

SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_WARNINGS ON
SET ANSI_PADDING ON

SELECT CONVERT (varchar(30), GETDATE(), 121) as Run_Time,
dateadd (ms, (ST.[RecordTime] - sys.ms_ticks), GETDATE()) as [Notification_Time],
ST.* , sys.ms_ticks AS [Current Time]
FROM
(SELECT
RBXML.value('(//Record/Error/ErrorCode)[1]', 'varchar(30)') AS [ErrorCode],
RBXML.value('(//Record/Error/CallingAPIName)[1]', 'varchar(255)') AS [CallingAPIName],
RBXML.value('(//Record/Error/APIName)[1]', 'varchar(255)') AS [APIName],
RBXML.value('(//Record/Error/SPID)[1]', 'int') AS [SPID],
RBXML.value('(//Record/@id)[1]', 'bigint') AS [Record Id],
RBXML.value('(//Record/@type)[1]', 'varchar(30)') AS [Type],
RBXML.value('(//Record/@time)[1]', 'bigint') AS [RecordTime]
FROM (SELECT CAST (record as xml) FROM sys.dm_os_ring_buffers
WHERE ring_buffer_type = 'RING_BUFFER_SECURITY_ERROR') AS RB(RBXML)) ST
CROSS JOIN sys.dm_os_sys_info sys
ORDER BY ST.[RecordTime] ASC

-- Script to Check the Ring Buffer in SQL Server 2005

SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_WARNINGS ON
SET ANSI_PADDING ON

SELECT CONVERT (varchar(30), GETDATE(), 121) as runtime,
DATEADD (ms, -1 * ((sys.cpu_ticks / sys.cpu_ticks_in_ms) - ST.[RecordTime]), GETDATE()) AS NotificationTime,
ST.* , sys.ms_ticks AS [CurrentTime]
FROM
(SELECT
RBXML.value('(//Record/Error/ErrorCode)[1]', 'varchar(30)') AS [ErrorCode],
RBXML.value('(//Record/Error/CallingAPIName)[1]', 'varchar(255)') AS [CallingAPIName],
RBXML.value('(//Record/Error/APIName)[1]', 'varchar(255)') AS [APIName],
RBXML.value('(//Record/Error/SPID)[1]', 'int') AS [SPID],
RBXML.value('(//Record/@id)[1]', 'bigint') AS [Record Id],
RBXML.value('(//Record/@type)[1]', 'varchar(30)') AS [Type],
RBXML.value('(//Record/@time)[1]', 'bigint') AS [RecordTime]
FROM (SELECT CAST (record as xml) FROM sys.dm_os_ring_buffers
WHERE ring_buffer_type = 'RING_BUFFER_SECURITY_ERROR') AS RB(RBXML)) ST
CROSS JOIN sys.dm_os_sys_info sys
ORDER BY ST.[RecordTime] ASC

</pre>
<p><a href="http://sqldbpool.files.wordpress.com/2012/11/rb.jpg"><img src="http://sqldbpool.files.wordpress.com/2012/11/rb.jpg?w=660" alt="" title="RB"   class="alignnone size-full wp-image-2016" /></a></p>
<p>From the output we can see the hexadecimal error code <strong>0x6FD</strong>. You have to convert these error code into decimal value, which will be <strong>0x6FD = 1789</strong></p>
<p>Check the above decimal error codes using the NET HELPMSG command, which will give you more information on the issue.<br />
<a href="http://sqldbpool.files.wordpress.com/2012/11/cmderror.jpg"><img src="http://sqldbpool.files.wordpress.com/2012/11/cmderror.jpg?w=660" alt="" title="cmderror"   class="alignnone size-full wp-image-2017" /></a></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/sql-scripts/'>SQL Scripts</a>, <a href='http://sqldbpool.com/category/notes/sql-server-notes/'>SQL Server</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008/'>SQL Server 2008</a>, <a href='http://sqldbpool.com/category/notes/sql-server-2008-r2/'>SQL Server 2008 R2</a> Tagged: <a href='http://sqldbpool.com/tag/ring-buffer/'>Ring Buffer</a>, <a href='http://sqldbpool.com/tag/security-issue/'>Security Issue</a>, <a href='http://sqldbpool.com/tag/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://sqldbpool.com/tag/t-sql-script/'>T-SQL Script</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/2015/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/2015/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=2015&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/11/25/monitoring-and-troubleshooting-using-sys-dm_os_ring_buffers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2012/11/rb.jpg" medium="image">
			<media:title type="html">RB</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2012/11/cmderror.jpg" medium="image">
			<media:title type="html">cmderror</media:title>
		</media:content>
	</item>
	</channel>
</rss>
