<?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>Wed, 23 May 2012 19:07:24 +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>Steps to change logged in account password on Remote Desktop Session Windows Server 2008/R2 box</title>
		<link>http://sqldbpool.com/2012/05/23/steps-to-change-logged-in-account-password-on-remote-desktop-session-windows-server-2008r2-box/</link>
		<comments>http://sqldbpool.com/2012/05/23/steps-to-change-logged-in-account-password-on-remote-desktop-session-windows-server-2008r2-box/#comments</comments>
		<pubDate>Wed, 23 May 2012 19:07:23 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1832</guid>
		<description><![CDATA[You can follow the below steps to change the password of the logged in account using RDP. Step 1: Go to Start -&#62; Windows Security Step 2: Click on change password Step 3: Change the password as mentioned in the below screen. Filed under: SQL Server<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1832&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You can follow the below steps to change the password of the logged in account using RDP.
</p>
<p><strong>Step 1:</strong> Go to Start -&gt; Windows Security
</p>
<p><img src="http://sqldbpool.files.wordpress.com/2012/05/052312_1907_stepstochan1.png" alt="" />
	</p>
<p><strong>Step 2:</strong> Click on change password
</p>
<p><img src="http://sqldbpool.files.wordpress.com/2012/05/052312_1907_stepstochan2.png" alt="" />
	</p>
<p><strong>Step 3:  </strong>Change the password as mentioned in the below screen.<strong><br />
		</strong></p>
<p><img src="http://sqldbpool.files.wordpress.com/2012/05/052312_1907_stepstochan3.png" alt="" /></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/1832/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1832/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1832/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1832/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1832/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1832/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1832/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1832/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1832/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1832/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1832/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1832/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1832/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1832/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1832&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/05/23/steps-to-change-logged-in-account-password-on-remote-desktop-session-windows-server-2008r2-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.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/05/052312_1907_stepstochan1.png" medium="image" />

		<media:content url="http://sqldbpool.files.wordpress.com/2012/05/052312_1907_stepstochan2.png" medium="image" />

		<media:content url="http://sqldbpool.files.wordpress.com/2012/05/052312_1907_stepstochan3.png" medium="image" />
	</item>
		<item>
		<title>Setting the PowerShell Execution Policy</title>
		<link>http://sqldbpool.com/2012/05/22/setting-the-powershell-execution-policy/</link>
		<comments>http://sqldbpool.com/2012/05/22/setting-the-powershell-execution-policy/#comments</comments>
		<pubDate>Tue, 22 May 2012 12:07:41 +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 2011 (Denali)]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[get- help about_signing]]></category>
		<category><![CDATA[Power Shell]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1826</guid>
		<description><![CDATA[Problem Recently I moved PowerShell script files to a production environment and when executing it from the command prompt, I got this error: &#8220;File cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details&#8221;. In this tip we cover what needs to be done to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1826&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
Recently I moved PowerShell script files to a production environment and when executing it from the command prompt, I got this error: &#8220;File cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details&#8221;. In this tip we cover what needs to be done to resolve this issue.</p>
<p><strong>Solution</strong><br />
<a href="http://www.mssqltips.com/sqlservertip/2702/setting-the-powershell-execution-policy/" target="_blank">http://www.mssqltips.com/sqlservertip/2702/setting-the-powershell-execution-policy/</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/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a> Tagged: <a href='http://sqldbpool.com/tag/error/'>Error</a>, <a href='http://sqldbpool.com/tag/get-help-about_signing/'>get- help about_signing</a>, <a href='http://sqldbpool.com/tag/power-shell/'>Power Shell</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/1826/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1826/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1826/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1826/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1826/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1826/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1826/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1826/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1826/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1826/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1826/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1826/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1826/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1826/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1826&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/05/22/setting-the-powershell-execution-policy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.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 make SQL Server View Read Only?</title>
		<link>http://sqldbpool.com/2012/05/21/how-to-make-sql-server-view-read-only/</link>
		<comments>http://sqldbpool.com/2012/05/21/how-to-make-sql-server-view-read-only/#comments</comments>
		<pubDate>Mon, 21 May 2012 22:17:40 +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[Query]]></category>
		<category><![CDATA[RDBMS]]></category>
		<category><![CDATA[Read Only]]></category>
		<category><![CDATA[SQL Code]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[View]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1824</guid>
		<description><![CDATA[In SQL Server a view represents a virtual table. Just like a real table, a view consists of rows with columns, and you can retrieve data from a view (even you can INSERT/UPDATE/DELETE data in a view). The fields in the view’s virtual table are the fields of one or more real tables in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1824&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In SQL Server a view represents a virtual table. Just like a real table, a view consists of rows with columns, and you can retrieve data from a view (even you can INSERT/UPDATE/DELETE data in a view). The fields in the view’s virtual table are the fields of one or more real tables in the database. You can use views to join two tables in your database and present the underlying data as if the data were coming from a single table, thus simplifying the schema of your database for users performing ad-hoc reporting. You can also use views as a security mechanism to restrict the data available to end users</p>
<p>See the below example how we can make the view read only.</p>
<p><pre class="brush: sql;">

--creating a sample table
Create table tbl1
(
	myID int,
	name varchar(10)
)

--inserting data
insert into tbl1 values(1,'Jugal'),(2,'SQL'),(3,'DBPool')

--creating sample view
create view vwtbl1
as
select * from tbl1

--inserting data using view
insert into vwtbl1 values(1,'Jugal'),(2,'SQL'),(3,'DBPool')

--altering view to make it readOnly
alter view vwtbl1
as
select myid,name from tbl1
union all
select 0,0 where 1 =0
</pre></p>
<p>INSERT/UPDATE/DELETE will fail with the below errors.</p>
<p><code>Msg 4406, Level 16, State 1, Line 1<br />
Update or insert of view or function 'vwtbl1' failed because it contains a derived or constant field.</p>
<p>Msg 4426, Level 16, State 1, Line 1<br />
View 'vwtbl1' is not updatable because the definition contains a UNION operator.</code></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> Tagged: <a href='http://sqldbpool.com/tag/query/'>Query</a>, <a href='http://sqldbpool.com/tag/rdbms/'>RDBMS</a>, <a href='http://sqldbpool.com/tag/read-only/'>Read Only</a>, <a href='http://sqldbpool.com/tag/sql-code/'>SQL Code</a>, <a href='http://sqldbpool.com/tag/t-sql/'>T-SQL</a>, <a href='http://sqldbpool.com/tag/view/'>View</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/1824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1824/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1824/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1824/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1824/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1824/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1824/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1824/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1824&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/05/21/how-to-make-sql-server-view-read-only/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.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>SQL Server Login Failure Error 18456, Severity 14, State 10</title>
		<link>http://sqldbpool.com/2012/04/28/sql-server-login-failure-error-18456-severity-14-state-10/</link>
		<comments>http://sqldbpool.com/2012/04/28/sql-server-login-failure-error-18456-severity-14-state-10/#comments</comments>
		<pubDate>Sat, 28 Apr 2012 15:08:46 +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[Error 18456]]></category>
		<category><![CDATA[Login Failure]]></category>
		<category><![CDATA[Severity 14]]></category>
		<category><![CDATA[State 10]]></category>
		<category><![CDATA[sys.dm_os_ring_buffers]]></category>
		<category><![CDATA[sys.ms_ticks]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1817</guid>
		<description><![CDATA[Problem Recently I experienced a situation where a SQL Server login failed with this error message: Error: 18456, Severity: 14, State: 10. Login failed for user &#8216;SQL_Login&#8217;. Reason: Password validation failed with an infrastructure error. Check for previous errors. [CLIENT: XXX.XXX.XXX.XXX]. Can you help me decipher this SQL Server issue and correct it? Check out [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1817&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
Recently I experienced a situation where a SQL Server login failed with this error message:<br />
Error: 18456, Severity: 14, State: 10.<br />
Login failed for user &#8216;SQL_Login&#8217;. Reason: Password validation failed with an infrastructure error. Check for previous errors. [CLIENT: XXX.XXX.XXX.XXX].</p>
<p>Can you help me decipher this SQL Server issue and correct it?  Check out this tip to learn more.</p>
<p><strong>Solution</strong><br />
<a href="http://www.mssqltips.com/sqlservertip/2679/sql-server-login-failure-error-18456-severity-14-state-10/">http://www.mssqltips.com/sqlservertip/2679/sql-server-login-failure-error-18456-severity-14-state-10/</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/error-18456/'>Error 18456</a>, <a href='http://sqldbpool.com/tag/login-failure/'>Login Failure</a>, <a href='http://sqldbpool.com/tag/severity-14/'>Severity 14</a>, <a href='http://sqldbpool.com/tag/state-10/'>State 10</a>, <a href='http://sqldbpool.com/tag/sys-dm_os_ring_buffers/'>sys.dm_os_ring_buffers</a>, <a href='http://sqldbpool.com/tag/sys-ms_ticks/'>sys.ms_ticks</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/1817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1817/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1817&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/04/28/sql-server-login-failure-error-18456-severity-14-state-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.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 Create Foreign Key on the Compound Primary Key</title>
		<link>http://sqldbpool.com/2012/04/16/script-to-create-foreign-key-on-the-compound-primary-key/</link>
		<comments>http://sqldbpool.com/2012/04/16/script-to-create-foreign-key-on-the-compound-primary-key/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 01:43:10 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[Database]]></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[T-SQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL Constraint and Keys]]></category>
		<category><![CDATA[Foreign Key]]></category>
		<category><![CDATA[Compound Key]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1812</guid>
		<description><![CDATA[Compound Primary key is a primary key which is created on more than one column. Now the questions is how to create the foreign key for the compound primary key where it references more than one column. Check the below example. Filed under: Database, SQL Server, SQL Server 2008, SQL Server 2008 R2, SQL Server [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1812&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Compound Primary key is a primary key which is created on more than one column. Now the questions is how to create the foreign key for the compound primary key where it references more than one column.</p>
<p>Check the below example.</p>
<p><pre class="brush: sql;">
create table employee
(
	empID int not null,
	SSN int not null,
	name varchar(20)
)


ALTER TABLE [employee]
ADD CONSTRAINT pk_employee PRIMARY KEY (empID, SSN)


create table EmpDetail
(
		empID int,
		SSN int,
		address varchar(20),
		city varchar(20),
		pin varchar(20)
)

ALTER TABLE dbo.empDetail
   ADD CONSTRAINT FK_Employee
   FOREIGN KEY(empID, SSN)
   REFERENCES dbo.employee(empID, SSN)


SELECT
    tc.TABLE_NAME,
    tc.CONSTRAINT_NAME, 
    ccu.COLUMN_NAME
FROM 
    INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc
INNER JOIN 
    INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE ccu 
      ON ccu.TABLE_NAME = tc.TABLE_NAME AND ccu.CONSTRAINT_NAME = tc.CONSTRAINT_NAME
WHERE
    tc.TABLE_NAME IN ('employee','employeeDetail')

</pre></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/database/'>Database</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/compound-key/'>Compound Key</a>, <a href='http://sqldbpool.com/tag/foreign-key/'>Foreign Key</a>, <a href='http://sqldbpool.com/tag/sql/'>SQL</a>, <a href='http://sqldbpool.com/tag/sql-constraint-and-keys/'>SQL Constraint and Keys</a>, <a href='http://sqldbpool.com/tag/sql-query/'>SQL Query</a>, <a href='http://sqldbpool.com/tag/sql-scripts/'>SQL Scripts</a>, <a href='http://sqldbpool.com/tag/sql-server/'>SQL Server</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/technology/'>Technology</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/1812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1812/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1812/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1812/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1812/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1812/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1812/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1812/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1812/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1812&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/04/16/script-to-create-foreign-key-on-the-compound-primary-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.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>Primary Key, Unique Key Constraints &#8211; Clustered Index and Non Clustered Index</title>
		<link>http://sqldbpool.com/2012/04/15/primary-key-unique-key-constraints-clustered-index-and-non-clustered-index/</link>
		<comments>http://sqldbpool.com/2012/04/15/primary-key-unique-key-constraints-clustered-index-and-non-clustered-index/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 05:38:13 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[Database]]></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[Software Development]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Coding Standards]]></category>
		<category><![CDATA[SQL Constraint and Keys]]></category>
		<category><![CDATA[SQL Download]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Index]]></category>
		<category><![CDATA[SQL Joins]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Security]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1810</guid>
		<description><![CDATA[You can use the below script to create the Primary Key on the already existing tables. Primary key enforces a uniqueness in the column and created the clustered index as default. Primary key will not allow NULL values. If you want to define or create the non-clustered index on the existing table, you can use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1810&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You can use the below script to create the Primary Key on the already existing tables. Primary key enforces a uniqueness in the column and created the clustered index as default.</p>
<p>Primary key will not allow NULL values.</p>
<p><pre class="brush: sql;">
-- Adding the NON NULL constraint
ALTER TABLE [TableName]	 
ALTER COLUMN PK_ColumnName int NOT NULL

--Script to add the primary key on the existing table
ALTER TABLE [TableName]
ADD CONSTRAINT pk_ConstraintName PRIMARY KEY (PK_ColumnName)
</pre></p>
<p>If you want to define or create the non-clustered index on the existing table, you can use the below script. If the data in the column is unique, you can create the Unique Constraint as well.</p>
<p>Unique Key enforces uniqueness of the column on which they are defined. Unique Key creates a non-clustered index on the column. Unique Key allows only one NULL Value.</p>
<p><pre class="brush: sql;">
--script to create non-clustered Index
create index IX_ColumName on TableName(ColumnName)
--script to create Unique constraint on the existing table
ALTER TABLE TableName ADD CONSTRAINT ConstraintName UNIQUE(ColumnName)
</pre></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/database/'>Database</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/software-development/'>Software Development</a>, <a href='http://sqldbpool.com/tag/sql/'>SQL</a>, <a href='http://sqldbpool.com/tag/sql-coding-standards/'>SQL Coding Standards</a>, <a href='http://sqldbpool.com/tag/sql-constraint-and-keys/'>SQL Constraint and Keys</a>, <a href='http://sqldbpool.com/tag/sql-download/'>SQL Download</a>, <a href='http://sqldbpool.com/tag/sql-error-messages/'>SQL Error Messages</a>, <a href='http://sqldbpool.com/tag/sql-index/'>SQL Index</a>, <a href='http://sqldbpool.com/tag/sql-joins/'>SQL Joins</a>, <a href='http://sqldbpool.com/tag/sql-performance/'>SQL Performance</a>, <a href='http://sqldbpool.com/tag/sql-query/'>SQL Query</a>, <a href='http://sqldbpool.com/tag/sql-scripts/'>SQL Scripts</a>, <a href='http://sqldbpool.com/tag/sql-security/'>SQL Security</a>, <a href='http://sqldbpool.com/tag/sql-server/'>SQL Server</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/technology/'>Technology</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/1810/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1810/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1810/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1810/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1810/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1810/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1810/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1810/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1810/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1810/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1810/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1810/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1810/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1810/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1810&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/04/15/primary-key-unique-key-constraints-clustered-index-and-non-clustered-index/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.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>Blog Stats</title>
		<link>http://sqldbpool.com/2012/04/13/blog-stats/</link>
		<comments>http://sqldbpool.com/2012/04/13/blog-stats/#comments</comments>
		<pubDate>Fri, 13 Apr 2012 22:59:23 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1808</guid>
		<description><![CDATA[<img src="http://sqldbpool.files.wordpress.com/2012/04/stats.jpg" alt="Blog Stats" class="size-full wp-image-1807" /><p>SQLDBPool Blog Stats</p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1808&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://sqldbpool.files.wordpress.com/2012/04/stats.jpg" alt="Blog Stats" class="size-full wp-image-1807" />
<p>SQLDBPool Blog Stats</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/1808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1808/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1808/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1808/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1808&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/04/13/blog-stats/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.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/04/stats.jpg" medium="image">
			<media:title type="html">Blog Stats</media:title>
		</media:content>
	</item>
		<item>
		<title>Again Awarded as MVP for 2012-2013</title>
		<link>http://sqldbpool.com/2012/04/01/again-awarded-as-mvp-for-2012-2013/</link>
		<comments>http://sqldbpool.com/2012/04/01/again-awarded-as-mvp-for-2012-2013/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 10:43:40 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1798</guid>
		<description><![CDATA[Dear Friends, I want to share a good news with you all, I am again 3rd time awarded as MVP in SQL Server. Thanks for reading my site, I will keep posting the best article and always there to solve your queries. Thanks, Jugal Shah You will see the 2012 in below award shortly -:) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1798&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Dear Friends,</strong></p>
<p>I want to share a good news with you all, I am again 3rd time awarded as MVP in SQL Server. Thanks for reading my site, I will keep posting the best article and always there to solve your queries.</p>
<p><strong>Thanks,<br />
Jugal Shah</strong></p>
<p><strong><em>You will see the 2012 in below award shortly -:)</em></strong></p>
<p><a href="http://sqldbpool.files.wordpress.com/2012/04/mvp.jpg"><img class="alignnone size-full wp-image-1799" title="mvp" src="http://sqldbpool.files.wordpress.com/2012/04/mvp.jpg" alt="" width="630" height="451" /></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/1798/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1798/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1798/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1798/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1798/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1798/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1798/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1798/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1798/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1798/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1798/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1798/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1798/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1798/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1798&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/04/01/again-awarded-as-mvp-for-2012-2013/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.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/04/mvp.jpg" medium="image">
			<media:title type="html">mvp</media:title>
		</media:content>
	</item>
		<item>
		<title>Using PowerShell to Register All SQL Instances Into Central Management Server</title>
		<link>http://sqldbpool.com/2012/03/29/using-powershell-to-register-all-sql-instances-into-central-management-server/</link>
		<comments>http://sqldbpool.com/2012/03/29/using-powershell-to-register-all-sql-instances-into-central-management-server/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 14:49:19 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[Central Management Server]]></category>
		<category><![CDATA[CMDB]]></category>
		<category><![CDATA[Jugal Shah]]></category>
		<category><![CDATA[Power Shell]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[SQLDBPool]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1795</guid>
		<description><![CDATA[Problem Managing multiple SQL Servers has its challenges. One of the big challenges is having to collect data from each of the servers you manage and figure out which servers need attention. SQL Server has introduced a new feature called Central Management repository which can be used to manage multiple instances. One of the challenges [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1795&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p><a class="zem_slink" title="Management" href="http://en.wikipedia.org/wiki/Management" rel="wikipedia" target="_blank">Managing</a> multiple <a class="zem_slink" title="SQL" href="http://www.iso.org/iso/catalogue_detail.htm?csnumber=45498" rel="homepage" target="_blank">SQL Servers</a> has its challenges. One of the big challenges is having to collect data from each of the servers you manage and figure out which servers need attention. SQL Server has introduced a new feature called Central Management repository which can be used to manage multiple instances. One of the challenges to using <a class="zem_slink" title="Content management system" href="http://en.wikipedia.org/wiki/Content_management_system" rel="wikipedia" target="_blank">CMS</a> is that you have to register all the SQL Servers manually into CMS.  The below article will guide you on how to register hundreds of servers in a second for SQL Server CMS.</p>
<h2>Solution</h2>
<p><a href="http://www.mssqltips.com/sqlservertip/2658/using-powershell-to-register-all-sql-instances-into-central-management-server/">http://www.mssqltips.com/sqlservertip/2658/using-powershell-to-register-all-sql-instances-into-central-management-server/</a></p>
<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> Tagged: <a href='http://sqldbpool.com/tag/central-management-server/'>Central Management Server</a>, <a href='http://sqldbpool.com/tag/cmdb/'>CMDB</a>, <a href='http://sqldbpool.com/tag/jugal-shah/'>Jugal Shah</a>, <a href='http://sqldbpool.com/tag/power-shell/'>Power Shell</a>, <a href='http://sqldbpool.com/tag/script/'>Script</a>, <a href='http://sqldbpool.com/tag/sqldbpool/'>SQLDBPool</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/1795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1795/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1795/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1795/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1795/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1795/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1795/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1795/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1795&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/03/29/using-powershell-to-register-all-sql-instances-into-central-management-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.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>Bug Fix: Property IsLocked is not available for Login &#8216;[sa]&#8216;. This property may not exist for this object, or may not be retrievable due to insufficient access rights</title>
		<link>http://sqldbpool.com/2012/03/28/bug-fix-property-islocked-is-not-available-for-login-sa-this-property-may-not-exist-for-this-object-or-may-not-be-retrievable-due-to-insufficient-access-rights/</link>
		<comments>http://sqldbpool.com/2012/03/28/bug-fix-property-islocked-is-not-available-for-login-sa-this-property-may-not-exist-for-this-object-or-may-not-be-retrievable-due-to-insufficient-access-rights/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 06:10:52 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1785</guid>
		<description><![CDATA[Problem: Property IsLocked is not available for Login &#8216;[sa]&#8216;. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo) &#160; Solution: You will get the above error, in case of one of the below issue. SQL Server authentication mode is Windows Only SA Account is disable [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1785&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#333333;font-family:Segoe UI;font-size:9pt;background-color:white;"><strong>Problem:</strong> Property IsLocked is not available for Login &#8216;[sa]&#8216;. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)</span></p>
<p><a href="http://sqldbpool.files.wordpress.com/2012/03/sql.jpg"><img class="alignnone size-full wp-image-1791" title="SQL" src="http://sqldbpool.files.wordpress.com/2012/03/sql.jpg" alt="" width="614" height="194" /></a></p>
<p>&nbsp;</p>
<p><strong>Solution: </strong>You will get the above error, in case of one of the below issue.</p>
<ol>
<li>SQL Server authentication mode is Windows Only</li>
<li>SA Account is disable</li>
<li>SA account is locked</li>
</ol>
<p><span style="text-decoration:underline;"><strong>SQL Server authentication mode is Windows Only<br />
</strong></span></p>
<p>You can check the SQL Server authentication mode using below query.</p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">SELECT</span><br />
<span style="color:blue;">CASE</span><br />
<span style="color:fuchsia;">SERVERPROPERTY</span><span style="color:gray;">(</span><span style="color:red;">&#8216;IsIntegratedSecurityOnly&#8217;</span><span style="color:gray;">)</span><br />
</span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">WHEN</span> 1 <span style="color:blue;">THEN</span><br />
<span style="color:red;">&#8216;Windows Authentication&#8217;</span><br />
</span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">WHEN</span> 0 <span style="color:blue;">THEN</span><br />
<span style="color:red;">&#8216;Windows and SQL Server Authentication&#8217;</span><br />
</span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">END</span><br />
<span style="color:blue;">as</span> [Authentication Mode]<br />
</span></p>
<p>If the authentication mode <strong>Windows</strong>, you have to change the authentication mode is <strong>Mix Mode</strong>. You can change the authentication mode by right click on <strong>Server Properties -&gt; Security tab</strong>.<strong><br />
</strong>This requires SQL Server Service restart.</p>
<p><img src="http://sqldbpool.files.wordpress.com/2012/03/032812_0610_bugfixprope11.png" alt="" /></p>
<p><span style="text-decoration:underline;"><strong>SA Account is locked/Disable<br />
</strong></span></p>
<p>You can execute below query to check whether SA account is locked or not. If the account is locked it will return 1 and 0 for un-locked.</p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">SELECT</span><br />
<span style="color:fuchsia;">LOGINPROPERTY</span><span style="color:gray;">(</span><span style="color:red;">&#8216;sa&#8217;</span><span style="color:gray;">,</span><br />
<span style="color:red;">&#8216;IsLocked&#8217;</span><span style="color:gray;">)<br />
</span></span></p>
<p>You can investigate whether SA account is locked by bad Password using below query. It will return the count of consecutive failed login attempts</p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">SELECT</span><br />
<span style="color:fuchsia;">LOGINPROPERTY</span><span style="color:gray;">(</span><span style="color:red;">&#8216;sa&#8217;</span><span style="color:gray;">,</span><br />
<span style="color:red;">&#8216;BadPasswordCount&#8217;</span><span style="color:gray;">);<br />
</span></span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">GO</span><span style="color:gray;"><br />
</span></span></p>
<p>Right click on SA account and check the SA account properties, check the below properties of the SA login whether it is disabled or locked.</p>
<p><img src="http://sqldbpool.files.wordpress.com/2012/03/032812_0610_bugfixprope21.png" alt="" /></p>
<p><span style="text-decoration:underline;"><strong>Execute the below script to unlock and enable the SA account<br />
</strong></span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">ALTER</span><br />
<span style="color:blue;">LOGIN</span> [sa] <span style="color:blue;">WITH</span><br />
<span style="color:blue;">PASSWORD</span><span style="color:gray;">=</span><span style="color:red;">N&#8217;Password&#8217;</span><span style="color:gray;">,</span><br />
</span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">DEFAULT_DATABASE</span><span style="color:gray;">=</span>[master]<span style="color:gray;">,</span><br />
</span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">DEFAULT_LANGUAGE</span><span style="color:gray;">=</span>[us_english]<span style="color:gray;">,</span><br />
</span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">CHECK_EXPIRATION</span><span style="color:gray;">=</span><span style="color:blue;">OFF</span><span style="color:gray;">,</span><br />
</span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">CHECK_POLICY</span><span style="color:gray;">=</span><span style="color:blue;">OFF</span><br />
</span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">GO</span><br />
</span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:blue;">ALTER</span><br />
<span style="color:blue;">LOGIN</span> [sa] <span style="color:blue;">ENABLE<br />
</span></span></p>
<p><span style="color:blue;font-family:Courier New;font-size:10pt;">GO</span></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/1785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1785/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1785/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1785/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1785/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1785/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1785/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1785/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1785/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1785&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/03/28/bug-fix-property-islocked-is-not-available-for-login-sa-this-property-may-not-exist-for-this-object-or-may-not-be-retrievable-due-to-insufficient-access-rights/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.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/03/sql.jpg" medium="image">
			<media:title type="html">SQL</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2012/03/032812_0610_bugfixprope11.png" medium="image" />

		<media:content url="http://sqldbpool.files.wordpress.com/2012/03/032812_0610_bugfixprope21.png" medium="image" />
	</item>
		<item>
		<title>How to setup schedule Maintenance Plan?</title>
		<link>http://sqldbpool.com/2012/03/24/how-to-setup-schedule-maintenance-plan/</link>
		<comments>http://sqldbpool.com/2012/03/24/how-to-setup-schedule-maintenance-plan/#comments</comments>
		<pubDate>Sat, 24 Mar 2012 21:16:07 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1779</guid>
		<description><![CDATA[Step 1: Launch SQL Server Management Studio and In the Object Explorer expand the Management folder. Step 2: Right click on the Maintenance Plans folder and select New Maintenance Plan.   Step 3: Give the meaning full name to maintenance plan.   Step 4: From the Toolbox drag and drop a Check Database Integrity Task, Rebuild Index Task, Update Statistics Task and place [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1779&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#333333;font-family:Georgia;font-size:12pt;"><strong>Step 1:</strong> Launch SQL Server Management Studio and In the Object Explorer expand the <strong>Management</strong> folder.<br />
</span></p>
<p><span style="color:#333333;font-family:Georgia;font-size:12pt;"><strong>Step 2: </strong>Right click on the <strong>Maintenance Plans </strong>folder and select <strong>New</strong> <strong>Maintenance Plan.<br />
</strong></span></p>
<p>
 </p>
<p><img src="http://sqldbpool.files.wordpress.com/2012/03/032412_2115_howtosetups1.png" alt="" />
	</p>
<p><span style="color:#333333;font-family:Georgia;font-size:12pt;"><strong>Step 3: </strong>Give the meaning full name to maintenance plan.<br />
</span></p>
<p><img src="http://sqldbpool.files.wordpress.com/2012/03/032412_2115_howtosetups2.png" alt="" /><span style="color:#333333;font-family:Georgia;font-size:12pt;"><strong><br />
			</strong></span></p>
<p>
 </p>
<p><span style="color:#333333;font-family:Georgia;font-size:12pt;"><strong>Step 4: </strong>From the Toolbox drag and drop a <strong>Check Database Integrity Task, Rebuild Index Task, Update Statistics Task</strong> and place them vertically in the same order.<br />
</span></p>
<p><span style="color:#333333;font-family:Georgia;font-size:12pt;"><strong>Step 5: </strong>Connect the tasks together by dragging the arrow from one box to the other so they are connected as: <strong>Check Database Integrity Task &#8211; Rebuild Index Task &#8211; Update Statistics Task.<br />
</strong></span></p>
<p><img src="http://sqldbpool.files.wordpress.com/2012/03/032412_2115_howtosetups3.png" alt="" /><span style="color:#333333;font-family:Georgia;font-size:12pt;"><br />
		</span></p>
<p><span style="color:#333333;font-family:Georgia;font-size:12pt;"><strong>Step 6</strong> Right click on the each tasks and select the databases in maintenance plan.<br />
</span></p>
<p><span style="color:#333333;font-family:Georgia;font-size:12pt;"><strong>Step 7</strong> Schedule a maintenance plan to run in off business hours.<br />
</span></p>
<p>
 </p>
<p><span style="color:#333333;font-family:Georgia;font-size:12pt;"><strong><br />
			</strong></span> </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/1779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1779/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1779&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/03/24/how-to-setup-schedule-maintenance-plan/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.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/03/032412_2115_howtosetups1.png" medium="image" />

		<media:content url="http://sqldbpool.files.wordpress.com/2012/03/032412_2115_howtosetups2.png" medium="image" />

		<media:content url="http://sqldbpool.files.wordpress.com/2012/03/032412_2115_howtosetups3.png" medium="image" />
	</item>
		<item>
		<title>How to check the Index Fragmentation in SQL Server?</title>
		<link>http://sqldbpool.com/2012/03/24/how-to-check-the-index-fragmentation-in-sql-server/</link>
		<comments>http://sqldbpool.com/2012/03/24/how-to-check-the-index-fragmentation-in-sql-server/#comments</comments>
		<pubDate>Sat, 24 Mar 2012 17:51:39 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1774</guid>
		<description><![CDATA[Step 1: Launch SQL Server Management Studio. Step 2: In the object explorer, right click on the database and select Reports -&#62; Standard Reports -&#62; Index Physical Statistics. Step 3: SQL Server Management Studio will generate a report showing information about the Table Names, Index Names, Index Type, Number of Partitions and Operation Recommendations. Step [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1774&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Step 1:</strong> Launch SQL Server Management Studio.
</p>
<p><strong>Step 2: </strong>In the object explorer, right click on the database and select Reports -&gt; Standard Reports -&gt; Index Physical Statistics.
</p>
<p><strong>Step 3: </strong>SQL Server Management Studio will generate a report showing information about the Table Names, Index Names, Index Type, Number of Partitions and Operation Recommendations.
</p>
<p><strong>Step 4: </strong>Repeat the above steps to check the fragmentation of all user databases.
</p>
<p>
 </p>
<p><img src="http://sqldbpool.files.wordpress.com/2012/03/032412_1751_howtocheckt1.png" alt="" />
	</p>
<p>One key value that is provided in the report is the <strong>Operation Recommended</strong> field. Any value of Rebuild is an indication that the index is fragmented.
</p>
<p>By expanding the # Partitions field, you can see the <strong>% of fragmentation</strong> for a given index.
</p>
<p>
 </p>
<p>Report looks like below.
</p>
<p><img src="http://sqldbpool.files.wordpress.com/2012/03/032412_1751_howtocheckt2.png" alt="" /></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/1774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1774/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1774/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1774&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/03/24/how-to-check-the-index-fragmentation-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.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/03/032412_1751_howtocheckt1.png" medium="image" />

		<media:content url="http://sqldbpool.files.wordpress.com/2012/03/032412_1751_howtocheckt2.png" medium="image" />
	</item>
		<item>
		<title>How to connect the SQL Server running on the different TCP/IP port?</title>
		<link>http://sqldbpool.com/2012/03/14/how-to-connect-the-sql-server-running-on-the-different-tcpip-port/</link>
		<comments>http://sqldbpool.com/2012/03/14/how-to-connect-the-sql-server-running-on-the-different-tcpip-port/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 01:39:29 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[OS and SQL]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2011 (Denali)]]></category>
		<category><![CDATA[Jugal Shah]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQLDBPool]]></category>
		<category><![CDATA[SSMS]]></category>
		<category><![CDATA[Static Port]]></category>
		<category><![CDATA[TCP Port]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1767</guid>
		<description><![CDATA[In case you have configured SQL Instance to use the static TCP/IP port number. You can connect SQL Server as below using SSMS. Filed under: OS and SQL, SQL Server 2008, SQL Server 2008 R2, SQL Server 2011 (Denali) Tagged: Jugal Shah, SQL Server, SQLDBPool, SSMS, Static Port, TCP Port<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1767&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In case you have configured SQL Instance to use the static TCP/IP port number. You can connect SQL Server as below using SSMS.</p>
<p><a href="http://sqldbpool.files.wordpress.com/2012/03/ssms.jpg"><img src="http://sqldbpool.files.wordpress.com/2012/03/ssms.jpg" alt="" title="SSMS" width="426" height="319" class="alignnone size-full wp-image-1768" /></a></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/os-and-sql/'>OS and SQL</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/jugal-shah/'>Jugal Shah</a>, <a href='http://sqldbpool.com/tag/sql-server/'>SQL Server</a>, <a href='http://sqldbpool.com/tag/sqldbpool/'>SQLDBPool</a>, <a href='http://sqldbpool.com/tag/ssms/'>SSMS</a>, <a href='http://sqldbpool.com/tag/static-port/'>Static Port</a>, <a href='http://sqldbpool.com/tag/tcp-port/'>TCP Port</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/1767/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1767/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1767/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1767/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1767/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1767/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1767/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1767/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1767/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1767/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1767/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1767/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1767/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1767/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1767&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/03/14/how-to-connect-the-sql-server-running-on-the-different-tcpip-port/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.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/03/ssms.jpg" medium="image">
			<media:title type="html">SSMS</media:title>
		</media:content>
	</item>
		<item>
		<title>How to check waits in SQL Server 2000?</title>
		<link>http://sqldbpool.com/2012/03/10/how-to-check-waits-in-sql-server-2000/</link>
		<comments>http://sqldbpool.com/2012/03/10/how-to-check-waits-in-sql-server-2000/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 22:53:35 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[DBCC]]></category>
		<category><![CDATA[Jugal Shah]]></category>
		<category><![CDATA[SQL Script]]></category>
		<category><![CDATA[SQL Server 2000]]></category>
		<category><![CDATA[SQLDBPool]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[Wait Statistics in SQL Server 2000]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1763</guid>
		<description><![CDATA[Today I got a comment, how to check the wait statistics in SQL Server 2000. You can query sysprocesses table and use the DBCC SQLPERF to get the wait statistics in SQL Server 2000. select top 5* from sysprocesses dbcc sqlperf(&#8216;waitstats&#8217;) Filed under: SQL Server Tagged: DBCC, Jugal Shah, SQL Script, SQL Server 2000, SQLDBPool, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1763&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today I got a comment, how to check the wait statistics in SQL Server 2000. You can query sysprocesses table and use the DBCC SQLPERF to get the wait statistics in SQL Server 2000.</p>
<p>select top 5* from sysprocesses<br />
dbcc sqlperf(&#8216;waitstats&#8217;)</p>
<p><a href="http://sqldbpool.files.wordpress.com/2012/03/waitstats.jpg"><img src="http://sqldbpool.files.wordpress.com/2012/03/waitstats.jpg" alt="Wait Statistics Image" title="WaitStats" width="630" height="357" class="alignnone size-full wp-image-1764" /></a></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/sql-server-notes/'>SQL Server</a> Tagged: <a href='http://sqldbpool.com/tag/dbcc/'>DBCC</a>, <a href='http://sqldbpool.com/tag/jugal-shah/'>Jugal Shah</a>, <a href='http://sqldbpool.com/tag/sql-script/'>SQL Script</a>, <a href='http://sqldbpool.com/tag/sql-server-2000/'>SQL Server 2000</a>, <a href='http://sqldbpool.com/tag/sqldbpool/'>SQLDBPool</a>, <a href='http://sqldbpool.com/tag/t-sql/'>T-SQL</a>, <a href='http://sqldbpool.com/tag/wait-statistics-in-sql-server-2000/'>Wait Statistics in SQL Server 2000</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqldbpool.wordpress.com/1763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1763/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1763/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1763/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1763&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/03/10/how-to-check-waits-in-sql-server-2000/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.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/03/waitstats.jpg" medium="image">
			<media:title type="html">WaitStats</media:title>
		</media:content>
	</item>
		<item>
		<title>How to use RunAs command for SSMS if option does not exist?</title>
		<link>http://sqldbpool.com/2012/03/07/how-to-use-runas-command-for-ssms-if-option-does-not-exist/</link>
		<comments>http://sqldbpool.com/2012/03/07/how-to-use-runas-command-for-ssms-if-option-does-not-exist/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 13:10:16 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1761</guid>
		<description><![CDATA[Problem As a best practice in the industry, a DBA often has two logins that are used to access SQL Server; one is their normal Windows login and the other is an admin level login account which has sysAdmin rights on the SQL Server boxes. In addition most of the time the SQL Server client [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1761&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>As a best practice in the industry, a DBA often has two logins that are used to access SQL Server; one is their normal Windows login and the other is an admin level login account which has sysAdmin rights on the SQL Server boxes. In addition most of the time the SQL Server client tools are only installed on the local desktop and not on the SQL Server Production Box. In order to use the different login to connect to SQL Server using SSMS you need to use the &#8220;Run as&#8221; feature. What do you do in the case of Windows 7 or Windows Vista where you can’t find the Run As Different User option.</p>
<h2>Solution</h2>
<p><a href="http://www.mssqltips.com/sqlservertip/2617/how-to-use-runas-command-for-ssms-if-option-does-not-exist/">http://www.mssqltips.com/sqlservertip/2617/how-to-use-runas-command-for-ssms-if-option-does-not-exist/</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/1761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1761/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1761/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1761/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1761/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1761/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1761/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1761/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1761/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1761&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/03/07/how-to-use-runas-command-for-ssms-if-option-does-not-exist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.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>Looking for Job Change?</title>
		<link>http://sqldbpool.com/2012/03/05/looking-for-job-change/</link>
		<comments>http://sqldbpool.com/2012/03/05/looking-for-job-change/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 07:43:11 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1758</guid>
		<description><![CDATA[Filed under: SQL Server<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1758&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://sqldbpool.jobamatic.com/a/jobs/find-jobs"><img src="http://sqldbpool.files.wordpress.com/2012/03/jugal.jpg" alt="" title="Jugal" width="538" height="313" class="alignnone size-full wp-image-1759" /></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/1758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1758/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1758/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1758/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1758&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/03/05/looking-for-job-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.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/03/jugal.jpg" medium="image">
			<media:title type="html">Jugal</media:title>
		</media:content>
	</item>
		<item>
		<title>Script to create a Database with different collation</title>
		<link>http://sqldbpool.com/2012/03/04/script-to-create-a-database-with-different-collation/</link>
		<comments>http://sqldbpool.com/2012/03/04/script-to-create-a-database-with-different-collation/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 20:25:54 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[Database]]></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[Collation]]></category>
		<category><![CDATA[http://sqldbguru.blogspot.com/]]></category>
		<category><![CDATA[Jugal Shah]]></category>
		<category><![CDATA[SQLDBPool.com]]></category>
		<category><![CDATA[T-SQL Script]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1750</guid>
		<description><![CDATA[One of my blog reader has asked how to create the database with different collation. You can create the database with different collation using below script. Filed under: Database, SQL Server, SQL Server 2008, SQL Server 2008 R2, SQL Server 2011 (Denali) Tagged: Collation, http://sqldbguru.blogspot.com/, Jugal Shah, SQLDBPool.com, T-SQL Script<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1750&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of my blog reader has asked how to create the database with different collation. You can create the database with different collation using below script.</p>
<p><pre class="brush: sql;">
create database SQLDB collate Latin1_General_CS_AS;
go
create database SQLDB1 collate Latin1_General_CI_AS;
go

SELECT DATABASEPROPERTYEX('SQLDB', 'Collation') SQLDB;
SELECT DATABASEPROPERTYEX('SQLDB1', 'Collation') SQLDB1;
</pre></p>
<p><a href="http://sqldbpool.files.wordpress.com/2012/03/sqldb.jpg"><img src="http://sqldbpool.files.wordpress.com/2012/03/sqldb.jpg" alt="" title="SQLDB" width="549" height="283" class="alignnone size-full wp-image-1752" /></a></p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/database/'>Database</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/collation/'>Collation</a>, <a href='http://sqldbpool.com/tag/httpsqldbguru-blogspot-com/'>http://sqldbguru.blogspot.com/</a>, <a href='http://sqldbpool.com/tag/jugal-shah/'>Jugal Shah</a>, <a href='http://sqldbpool.com/tag/sqldbpool-com/'>SQLDBPool.com</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/1750/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1750/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1750/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1750/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1750/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1750/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1750/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1750/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1750/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1750/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1750/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1750/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1750/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1750/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1750&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/03/04/script-to-create-a-database-with-different-collation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.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/03/sqldb.jpg" medium="image">
			<media:title type="html">SQLDB</media:title>
		</media:content>
	</item>
		<item>
		<title>Online Discussion</title>
		<link>http://sqldbpool.com/2012/03/02/online-discussion/</link>
		<comments>http://sqldbpool.com/2012/03/02/online-discussion/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 05:29:44 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1743</guid>
		<description><![CDATA[Filed under: SQL Server<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1743&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://sqldbpool.files.wordpress.com/2012/03/untitled1.jpg"><img class="alignnone size-full wp-image-1747" title="Untitled" src="http://sqldbpool.files.wordpress.com/2012/03/untitled1.jpg" alt="" width="443" height="281" /></a></p>
<a name="pd_a_5997971"></a><div class="PDS_Poll" id="PDI_container5997971" style="display:inline-block;"></div><div id="PD_superContainer"></div><noscript><a href="http://polldaddy.com/poll/5997971">Take Our Poll</a></noscript>
<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/1743/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1743/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1743/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1743/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1743/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1743/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1743/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1743/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1743/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1743/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1743/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1743/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1743/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1743/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1743&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/03/02/online-discussion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.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/03/untitled1.jpg" medium="image">
			<media:title type="html">Untitled</media:title>
		</media:content>
	</item>
		<item>
		<title>Script to drop all SQL Logins</title>
		<link>http://sqldbpool.com/2012/03/02/script-to-drop-all-sql-logins/</link>
		<comments>http://sqldbpool.com/2012/03/02/script-to-drop-all-sql-logins/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 05:10:14 +0000</pubDate>
		<dc:creator>Jugal Shah</dc:creator>
				<category><![CDATA[Database]]></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[Drop Login]]></category>
		<category><![CDATA[SQL Login]]></category>
		<category><![CDATA[SQLDBPool]]></category>
		<category><![CDATA[T-SQL Script]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1732</guid>
		<description><![CDATA[Recently I got a requirement to drop all SQL Logins from the SQL Server. I have created below script to drop all SQL Login. Before getting into detail, please take a note that &#8220;A login cannot be dropped while it is logged in. A login that owns any securable, server-level object, or SQL Server Agent [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1732&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I got a requirement to drop all SQL Logins from the SQL Server. I have created below script to drop all SQL Login.</p>
<p>Before getting into detail, please take a note that <strong><em>&#8220;A login cannot be dropped while it is logged in. A login that owns any securable, server-level object, or SQL Server Agent job cannot be dropped&#8221;</em></strong></p>
<p>SA login account and the few policy certificates also come in <strong>SQL Login type</strong>, I have excluded them.</p>
<p><pre class="brush: sql;">
select *
from sys.server_principals
where name = 'sa' or substring(name, 1, 1) = '#' 
</pre></p>
<p><a href="http://sqldbguru.blogspot.com/"><img class="alignnone size-full wp-image-1733" title="login1" src="http://sqldbpool.files.wordpress.com/2012/03/login1.jpg" alt="" width="630" height="195" /></a></p>
<p><pre class="brush: sql;">
select 'DROP LOGIN ' + [name]
from sys.server_principals
where type_desc = 'SQL_LOGIN'
and sid &lt;&gt; 0x01 and substring(name, 1, 1) &lt;&gt; '#'
</pre></p>
<p><a href="http://sqldbpool.files.wordpress.com/2012/03/login2.jpg"><img class="alignnone size-full wp-image-1734" title="Login2" src="http://sqldbpool.files.wordpress.com/2012/03/login2.jpg" alt="" width="419" height="172" /></a></p>
<p>Next step is to execute the output of the above query.</p>
<br />Filed under: <a href='http://sqldbpool.com/category/notes/database/'>Database</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/drop-login/'>Drop Login</a>, <a href='http://sqldbpool.com/tag/sql-login/'>SQL Login</a>, <a href='http://sqldbpool.com/tag/sql-server/'>SQL Server</a>, <a href='http://sqldbpool.com/tag/sqldbpool/'>SQLDBPool</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/1732/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1732/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1732/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1732/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1732/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1732/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1732/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1732/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1732/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1732/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1732/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1732/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1732/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1732/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1732&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/03/02/script-to-drop-all-sql-logins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.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/03/login1.jpg" medium="image">
			<media:title type="html">login1</media:title>
		</media:content>

		<media:content url="http://sqldbpool.files.wordpress.com/2012/03/login2.jpg" medium="image">
			<media:title type="html">Login2</media:title>
		</media:content>
	</item>
		<item>
		<title>Steps to Drop an Orphan SQL Server User when it owns a Schema or Role</title>
		<link>http://sqldbpool.com/2012/03/02/1729/</link>
		<comments>http://sqldbpool.com/2012/03/02/1729/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 04:36:55 +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 2011 (Denali)]]></category>
		<category><![CDATA[Jugal Shah]]></category>
		<category><![CDATA[Login Issue]]></category>
		<category><![CDATA[Orphan Login]]></category>
		<category><![CDATA[Orphan User]]></category>
		<category><![CDATA[SQLDBPool]]></category>
		<category><![CDATA[T-SQL Script]]></category>

		<guid isPermaLink="false">http://sqldbpool.com/?p=1729</guid>
		<description><![CDATA[Problem Recently I had an issue while dropping an orphaned user for an obsolete login. I was unable to drop the user and it failed with the below error messages. Msg 15421, Level 16, State 1, Line 1 The database principal owns a database role and cannot be dropped. Msg 15138, Level 16, State 1, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1729&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
Recently I had an issue while dropping an orphaned user for an obsolete login.  I was unable to drop the user and it failed with the below error messages.</p>
<p><code>Msg 15421, Level 16, State 1, Line 1<br />
The database principal owns a database role and cannot be dropped.<br />
Msg 15138, Level 16, State 1, Line 1<br />
The database principal owns a schema in the database, and cannot be dropped.&lt;/code</p>
<p><strong>Solution</strong><br />
<a href="http://www.mssqltips.com/sqlservertip/2620/steps-to-drop-an-orphan-sql-server-user-when-it-owns-a-schema-or-role/" target="_blank">http://www.mssqltips.com/sqlservertip/2620/steps-to-drop-an-orphan-sql-server-user-when-it-owns-a-schema-or-role/</a></code></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/notes/sql-server-2011-denali/'>SQL Server 2011 (Denali)</a> Tagged: <a href='http://sqldbpool.com/tag/jugal-shah/'>Jugal Shah</a>, <a href='http://sqldbpool.com/tag/login-issue/'>Login Issue</a>, <a href='http://sqldbpool.com/tag/orphan-login/'>Orphan Login</a>, <a href='http://sqldbpool.com/tag/orphan-user/'>Orphan User</a>, <a href='http://sqldbpool.com/tag/sqldbpool/'>SQLDBPool</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/1729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqldbpool.wordpress.com/1729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqldbpool.wordpress.com/1729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqldbpool.wordpress.com/1729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqldbpool.wordpress.com/1729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqldbpool.wordpress.com/1729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqldbpool.wordpress.com/1729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqldbpool.wordpress.com/1729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqldbpool.wordpress.com/1729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqldbpool.wordpress.com/1729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqldbpool.wordpress.com/1729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqldbpool.wordpress.com/1729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqldbpool.wordpress.com/1729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqldbpool.wordpress.com/1729/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sqldbpool.com&#038;blog=3139535&#038;post=1729&#038;subd=sqldbpool&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sqldbpool.com/2012/03/02/1729/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/246a03e5bd256f9361fdf78e944f9c3d?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">JShah</media:title>
		</media:content>
	</item>
	</channel>
</rss>
