<?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>SQL Server Journey with SQL Authority &#187; SQL Error Messages</title>
	<atom:link href="http://blog.sqlauthority.com/category/sql-error-messages/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Wed, 08 Feb 2012 17:24:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.sqlauthority.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/08e35387c05b61340e885b1763a69d9f?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>SQL Server Journey with SQL Authority &#187; SQL Error Messages</title>
		<link>http://blog.sqlauthority.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.sqlauthority.com/osd.xml" title="SQL Server Journey with SQL Authority" />
	<atom:link rel='hub' href='http://blog.sqlauthority.com/?pushpress=hub'/>
		<item>
		<title>SQL SERVER &#8211; Installation Log Summary File Location &#8211; 2012 &#8211; 2008 R2</title>
		<link>http://blog.sqlauthority.com/2012/02/07/sql-server-installation-log-summary-file-location-2012-2008-r2/</link>
		<comments>http://blog.sqlauthority.com/2012/02/07/sql-server-installation-log-summary-file-location-2012-2008-r2/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 01:30:41 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17232</guid>
		<description><![CDATA[Here is email received from user: &#8220;Pinal, I am new DBA in my organization and I have to manage SQL Server 2005, 2008 and 2008 R2. Today is my first day at job and my manager has asked me to install all these different edition on our test environment. I have finished installing them. Later [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=17232&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Here is email received from user:</p>
<p style="text-align:justify;">&#8220;Pinal,</p>
<p style="text-align:justify;">I am new DBA in my organization and I have to manage SQL Server 2005, 2008 and 2008 R2. Today is my first day at job and my manager has asked me to install all these different edition on our test environment. I have finished installing them. Later he has asked me provide him Installation Log Summary. I searched on internet and I could not find it, would you send me format of the installation log summary?&#8221;</p>
<p style="text-align:justify;">I like this question, even though it is very simple, it demonstrates how new job can be confusing on very first day.</p>
<p style="text-align:justify;">I sent him following reply</p>
<p style="text-align:justify;">&#8220;Jeff,</p>
<p style="text-align:justify;">I believe your manager is asking you following summary log produced by SQL Server installation. You can find it from following location on various version</p>
<p style="text-align:justify;">Let us assume that your installation directory is: C:\Program Files\Microsoft SQL Server</p>
<p style="text-align:justify;">SQL Server 2012 - C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\Summary.txt<br />
SQL Server 2008\R2 - C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\Summary.txt</p>
<p style="text-align:justify;">Congratulations on first day!&#8221;</p>
<p style="text-align:justify;">He immediately replied that I was correct, his manager was looking for summary file in above mentioned folder. You should replace the path of your installation directory with the C drive I specified in above response.</p>
<p style="text-align:justify;">This remind me my first day at job. I was very much confused and lost too. I did not know the abbreviation and jargon used in organization. Thanks to my seniors and co-workers that I am now familiar with the same. However, the learning is forever ongoing activity. Every single day I learn something new when I walk into my office, <em><strong>I consider every day as my first day for learning something new.</strong></em></p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/17232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/17232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/17232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/17232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/17232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/17232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/17232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/17232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/17232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/17232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/17232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/17232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/17232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/17232/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=17232&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/02/07/sql-server-installation-log-summary-file-location-2012-2008-r2/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; ERROR: FIX &#8211; Database diagram support objects cannot be installed because this database does not have a valid owner</title>
		<link>http://blog.sqlauthority.com/2012/02/06/sql-server-error-fix-database-diagram-support-objects-cannot-be-installed-because-this-database-does-not-have-a-valid-owner/</link>
		<comments>http://blog.sqlauthority.com/2012/02/06/sql-server-error-fix-database-diagram-support-objects-cannot-be-installed-because-this-database-does-not-have-a-valid-owner/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 01:30:16 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[PostADay]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=17223</guid>
		<description><![CDATA[Recently one of my friend sent me email that he is having some problem with his very small database. We talked for few minutes and we agreed that to further investigation I will need access to the whole database. As the database was very big he dropped it in common location (you can use livemesh [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=17223&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Recently one of my friend sent me email that he is having some problem with his very small database. We talked for few minutes and we agreed that to further investigation I will need access to the whole database. As the database was very big he dropped it in common location (you can use <strong>livemesh</strong> or <strong><a href="http://db.tt/MaD77Omb" target="_blank">dropbox</a></strong>  or any other similar product) and I picked up from the location.</p>
<p style="text-align:justify;">I was able to install the database successful. He informed me that he has created database diagram so I can easily understand his database tables. As soon as I tried to open the database diagram I faced following error. For a while I could not figure out how to resolve the error.</p>
<p style="text-align:justify;"><strong>Error:</strong><br />
<span style="color:#ff0000;">Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.</span></p>
<p style="text-align:justify;"><strong>Workaround / Fix / Solution :</strong></p>
<p style="text-align:justify;">Well for a while I attempted few things and nothing worked. After that I carefully read the error and I realized that solution was proposed in the error only. I just have to read it carefully. Here are the steps I did to make this work.</p>
<p><code style="font-size:12px;"><span style="color:green;">-- Replace YourDatabaseName in following script<br />
</span><span style="color:blue;">ALTER AUTHORIZATION ON </span><span style="color:black;">DATABASE::YourDatabaseName </span><span style="color:blue;">TO </span><span style="color:black;">sa<br />
GO<br />
</span></code></p>
<ul style="text-align:justify;">
<li>Select your database &gt;&gt; Right Click &gt;&gt; Select Properties</li>
<li>Select FILE in left side of page</li>
<li>In the OWNER box, select button which has three dots (&#8230;) in it</li>
<li>Now select user &#8216;sa&#8217; or NT AUTHORITY\SYSTEM and click OK.</li>
</ul>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/diagerror.jpg" alt="" width="500" height="448" /></p>
<p style="text-align:justify;">This should solve your problem.</p>
<p style="text-align:justify;">Please note, I suggest you check your security policies before changing authorization. I did this to quickly solve my problem on my development server. If you are on production server, you may open yourself to potential security compromise.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/17223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/17223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/17223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/17223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/17223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/17223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/17223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/17223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/17223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/17223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/17223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/17223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/17223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/17223/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=17223&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/02/06/sql-server-error-fix-database-diagram-support-objects-cannot-be-installed-because-this-database-does-not-have-a-valid-owner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/diagerror.jpg" medium="image" />
	</item>
		<item>
		<title>SQLAuthority News &#8211; To Err is Human; to Forgive, Divine &#8211; Errata of SQL Server Interview Book</title>
		<link>http://blog.sqlauthority.com/2012/01/04/sqlauthority-news-to-err-is-human-to-forgive-divine-errata-of-sql-server-interview-book/</link>
		<comments>http://blog.sqlauthority.com/2012/01/04/sqlauthority-news-to-err-is-human-to-forgive-divine-errata-of-sql-server-interview-book/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 01:30:16 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[About Me]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLAuthority Book Review]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=16851</guid>
		<description><![CDATA[Regular readers of my blog will know that I have written three books this year.  We are currently reviewing readers comments about SQL Server Interview Questions and Answers.  I am sorry to announce that we made a mistake but happy to add that we have corrected it. We will pay closer attention to the error [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16851&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;"><img class="alignleft" src="http://www.pinaldave.com/bimg/whiteout.jpg" alt="" width="224" height="132" />Regular readers of my blog will know that I have written three books this year.  We are currently reviewing readers comments about <a href="http://blog.sqlauthority.com/sql-server-books/sql-server-interview-questions-and-answers-for-all-database-developers-and-developers-administrators/" target="_blank"><strong>SQL Server Interview Questions and Answers</strong></a>.  I am sorry to announce that we made a mistake but happy to add that we have corrected it. We will pay closer attention to the error and make sure that it does not happen again. Writing a book is a lengthy very interesting process. I have had an excellent experience in writing my recent book <a href="http://blog.sqlauthority.com/sql-server-books/sql-server-interview-questions-and-answers-for-all-database-developers-and-developers-administrators/" target="_blank"><strong>SQL Server Interview Questions and Answers</strong></a>; we had so much fun and few moments of stress, too.</p>
<p style="text-align:justify;">One of the interesting questions I recently received is how many people actually touch the manuscript of the book before it goes to the publisher. Now this number may vary, but here is how many people touched our book&#8217;s manuscript.</p>
<ul style="text-align:justify;">
<li><strong><em>2 authors</em></strong></li>
<li><strong><em>1 technical adviser</em></strong></li>
<li><strong><em>3 technical editors</em></strong></li>
<li><strong><em>1 language  adviser</em></strong></li>
<li><strong><em>2 layout designers</em></strong></li>
<li><strong><em>2 other people at the publisher/printer</em></strong></li>
</ul>
<p style="text-align:justify;">With this many people collaborating, keeping organized was our main concern.  There were multiple people working together and most of the time we all were working parallel to each other on various part of the book. We kept on increasing the versions of the Word documents which we were all sharing. In the end the final version was sent to the printer. In our book there were two kinds of inaccuracies &#8211; 1) Ones we overlooked and did not correct, and 2) Ones we noticed but missed while collating various versions.</p>
<p style="text-align:justify;"><img class="alignleft" src="http://www.pinaldave.com/bimg/error.jpg" alt="" width="150" height="142" /></p>
<p style="text-align:justify;">Before the book was published, everybody involved (every single person who contributed to the book in any capacity) had decided that if any errata was found, the next version must not have that error and we should maintain an error log. It has been 60 days since the book has been published and we have received quite a lot of communication on the book. The number one request is that many want a second part of the book, I am overwhelmed with your support and love.</p>
<p style="text-align:justify;">Here is the page where we are listing all the <a href="http://wp.me/P2NUQ-4nC" target="_blank"><strong>errata of the book</strong></a>, if you are reading the book and you find anything which you would like to share with us &#8211; you are welcome to send us an email at books &#8220;at&#8221; sqlauthority.com. It does not matter if it is an English grammar error or technical inaccuracy &#8211; we value your input on any and all points. We aspired to be as close to perfect as possible and the first step is to accept our mistakes. Once we know the mistake, we will not repeat it and promptly correct it.</p>
<p style="text-align:justify;">I know that I am looking forward to hearing from my readers about what they loved and what they’d like to see changed, and I’m sure my fellow collaborators would like to hear from you, too.  Thank you again for all your support.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/about-me/'>About Me</a>, <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlauthority/sqlauthority-book-review/'>SQLAuthority Book Review</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/16851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/16851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/16851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/16851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/16851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/16851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/16851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/16851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/16851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/16851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/16851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/16851/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/16851/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/16851/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16851&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2012/01/04/sqlauthority-news-to-err-is-human-to-forgive-divine-errata-of-sql-server-interview-book/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/whiteout.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/error.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Fix: Error: 15138 &#8211; The database principal owns a schema in the database, and cannot be dropped</title>
		<link>http://blog.sqlauthority.com/2011/12/26/sql-server-fix-error-15138-the-database-principal-owns-a-schema-in-the-database-and-cannot-be-dropped/</link>
		<comments>http://blog.sqlauthority.com/2011/12/26/sql-server-fix-error-15138-the-database-principal-owns-a-schema-in-the-database-and-cannot-be-dropped/#comments</comments>
		<pubDate>Mon, 26 Dec 2011 01:30:49 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=16441</guid>
		<description><![CDATA[Last day I had excellent fun asking puzzle on SQL Server Login SQL SERVER – Merry Christmas and Happy Holidays – Database Properties – Number of Users. One of the user sent me email asking urgent question about how to resolve following error. Reader was trying to remove the login from database but every single time [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16441&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Last day I had excellent fun asking puzzle on SQL Server Login <a title="Permanent Link to SQL SERVER – Merry Christmas and Happy Holidays – Database Properties – Number of Users" href="http://blog.sqlauthority.com/2011/12/25/sql-server-merry-christmas-and-happy-holidays-database-properties-number-of-users/" rel="bookmark">SQL SERVER – Merry Christmas and Happy Holidays – Database Properties – Number of Users</a>. One of the user sent me email asking urgent question about how to resolve following error. Reader was trying to remove the login from database but every single time he was getting error and was not able to remove the user.</p>
<p style="text-align:justify;"><span style="color:#ff0000;">The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)</span></p>
<p style="text-align:justify;">As per him it was very urgent and he was not able to solve the same. I totally understand his situation and here is the quick workaround to the issue. The reason for error is quite clear from the error message as there were schema associated with the user and that needs to be transferred to another user.</p>
<p style="text-align:justify;"><strong>Workaround / Resolution / Fix:</strong></p>
<p style="text-align:justify;">Let us assume that user was trying to delete user which is named as &#8216;pinaladmin&#8217; and it exists in the database &#8216;AdventureWorks&#8217;.</p>
<p style="text-align:justify;">Now run following script with the context of the database where user belongs.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks</span><span style="color:gray;">;<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">s.name<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.schemas s<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">s.principal_id </span><span style="color:blue;">= </span><span style="color:magenta;">USER_ID</span><span style="color:gray;">(</span><span style="color:red;">'pinaladmin'</span><span style="color:gray;">);<br />
</span></code></p>
<p style="text-align:justify;">In my query I get following two schema as a result.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/schemaslist.jpg" alt="" width="263" height="99" /></p>
<p style="text-align:justify;">Now let us run following query where I will take my schema and and alter authorization on schema. In our case we have two schema so we will execute it two times.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">ALTER AUTHORIZATION ON </span><span style="color:black;">SCHEMA::db_denydatareader </span><span style="color:blue;">TO </span><span style="color:black;">dbo</span><span style="color:gray;">;<br />
</span><span style="color:blue;">ALTER AUTHORIZATION ON </span><span style="color:black;">SCHEMA::db_denydatawriter </span><span style="color:blue;">TO </span><span style="color:black;">dbo</span><span style="color:gray;">;</span></code></p>
<p style="text-align:justify;">Now if you drop the database owner it will not throw any error.</p>
<p style="text-align:justify;">Here is generic script for resolving the error:</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">s.name<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.schemas s<br />
</span><span style="color:blue;">WHERE </span><span style="color:black;">s.principal_id </span><span style="color:blue;">= </span><span style="color:magenta;">USER_ID</span><span style="color:gray;">(</span><span style="color:red;">'YourUserID'</span><span style="color:gray;">);</span></code></p>
<p style="text-align:justify;">Now replace the result name in following script:</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">ALTER AUTHORIZATION ON </span><span style="color:black;">SCHEMA::YourSchemaName </span><span style="color:blue;">TO </span><span style="color:black;">dbo</span><span style="color:gray;">;</span></code></p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/16441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/16441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/16441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/16441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/16441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/16441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/16441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/16441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/16441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/16441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/16441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/16441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/16441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/16441/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16441&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/12/26/sql-server-fix-error-15138-the-database-principal-owns-a-schema-in-the-database-and-cannot-be-dropped/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/schemaslist.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; FIX &#8211; ERROR : Msg 3201, Level 16 Cannot open backup device.Operating system error 3 (The system cannot find the path specified.)</title>
		<link>http://blog.sqlauthority.com/2011/12/17/sql-server-fix-error-msg-3201-level-16-cannot-open-backup-device-operating-system-error-3-the-system-cannot-find-the-path-specified/</link>
		<comments>http://blog.sqlauthority.com/2011/12/17/sql-server-fix-error-msg-3201-level-16-cannot-open-backup-device-operating-system-error-3-the-system-cannot-find-the-path-specified/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 01:30:31 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Management Studio]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=16367</guid>
		<description><![CDATA[I had very interesting and frustrating experience. Recently I was attempting to backup one of my database and I end up on following error. Msg 3201, Level 16, State 1, Line 1 Cannot open backup device &#8216;D:\Backup\SQLAuthority.bak&#8217;. Operating system error 3(The system cannot find the path specified.). Msg 3013, Level 16, State 1, Line 1 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16367&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I had very interesting and frustrating experience. Recently I was attempting to backup one of my database and I end up on following error.</p>
<p style="text-align:justify;"><span style="color:#ff0000;">Msg 3201, Level 16, State 1, Line 1</span><br />
<span style="color:#ff0000;"> Cannot open backup device &#8216;D:\Backup\SQLAuthority.bak&#8217;. Operating system error 3(The system cannot find the path specified.).</span><br />
<span style="color:#ff0000;"> Msg 3013, Level 16, State 1, Line 1</span><br />
<span style="color:#ff0000;"> BACKUP DATABASE is terminating abnormally.</span></p>
<p style="text-align:justify;"><strong>Solution:</strong></p>
<p style="text-align:justify;">Go to your drive and create the missing folder. In my case I went to Drive <strong>D</strong> and created <strong>Backup</strong> Folder there.</p>
<p style="text-align:justify;"><strong>Additional Story:</strong></p>
<p style="text-align:justify;"><img class="alignleft" src="http://www.pinaldave.com/bimg/backup-database.png" alt="" width="150" /></p>
<p style="text-align:justify;">If you read the first line of the blog post you will read there that I mentioned that I had frustrating experience. It was not frustrating that I do not know the solution &#8211; it was totally different reason. When I encountered the above error I quickly went and created the folder in my machine. Once I created the folder, I still keep on getting the error. After a while I realize what I was doing. I was creating the folder in the machine where I had installed SQL Server Management Studio. To resolve this error one has to create the folder in the machine where SQL Server is installed. Once I created the folder to the location where I was attempting to take backup the issue was resolved.</p>
<p style="text-align:justify;">How many of you have been in the same situation as me as mentioned in additional story?</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-backup-and-restore/'>SQL Backup and Restore</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/sql-server-management-studio/'>SQL Server Management Studio</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/16367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/16367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/16367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/16367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/16367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/16367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/16367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/16367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/16367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/16367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/16367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/16367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/16367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/16367/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16367&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/12/17/sql-server-fix-error-msg-3201-level-16-cannot-open-backup-device-operating-system-error-3-the-system-cannot-find-the-path-specified/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/backup-database.png" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Fix: Error: Msg 1904, Level 16 The statistics on table has 33 column names in statistics key list. The maximum limit for index or statistics key column list is 32</title>
		<link>http://blog.sqlauthority.com/2011/12/11/sql-server-fix-error-msg-1904-level-16-the-statistics-on-table-has-33-column-names-in-statistics-key-list-the-maximum-limit-for-index-or-statistics-key-column-list-is-32/</link>
		<comments>http://blog.sqlauthority.com/2011/12/11/sql-server-fix-error-msg-1904-level-16-the-statistics-on-table-has-33-column-names-in-statistics-key-list-the-maximum-limit-for-index-or-statistics-key-column-list-is-32/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 01:30:20 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL Statistics]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=16282</guid>
		<description><![CDATA[Earlier I wrote an article where I demonstrated that an index with more than 16 column is not possible. Here is the link to the article. After reading the same article I received email from user suggesting does it mean that statistics can be only created on only 16 columns. Well, answer is NO. One [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16282&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Earlier I wrote an article where I demonstrated that an index with more than 16 column is not possible. Here is the link to the article. After reading the same article I received email from user suggesting does it mean that statistics can be only created on only 16 columns. Well, answer is NO. One can create statistics on total of 32 columns, where as the limit of creating index is only 16 columns (and 900 bytes).</p>
<p style="text-align:justify;">Here is the quick example where when attempted to create statistics on 33 columns is generating error but when statistics are created on 32 columns it works successfully.</p>
<p style="text-align:justify;"><strong>Set up Script:</strong></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">CREATE DATABASE </span><span style="color:black;">TestDB<br />
GO<br />
</span><span style="color:blue;">USE </span><span style="color:black;">TestDB<br />
GO<br />
</span><span style="color:blue;">CREATE TABLE </span><span style="color:black;">Test1<br />
</span><span style="color:gray;">(</span><span style="color:black;">ID1 </span><span style="color:blue;">INT</span><span style="color:gray;">,  </span><span style="color:black;">ID2 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID3 </span><span style="color:blue;">INT</span><span style="color:gray;">,<br />
</span><span style="color:black;">ID4 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID5 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID6 </span><span style="color:blue;">INT</span><span style="color:gray;">,<br />
</span><span style="color:black;">ID7 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID8 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID9 </span><span style="color:blue;">INT</span><span style="color:gray;">,<br />
</span><span style="color:black;">ID10 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID11 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID12 </span><span style="color:blue;">INT</span><span style="color:gray;">,<br />
</span><span style="color:black;">ID13 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID14 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID15 </span><span style="color:blue;">INT</span><span style="color:gray;">,<br />
</span><span style="color:black;">ID16 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID17 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID18 </span><span style="color:blue;">INT</span><span style="color:gray;">,<br />
</span><span style="color:black;">ID19 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID20 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID21 </span><span style="color:blue;">INT</span><span style="color:gray;">,<br />
</span><span style="color:black;">ID22 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID23 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID24 </span><span style="color:blue;">INT</span><span style="color:gray;">,<br />
</span><span style="color:black;">ID25 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID26 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID27 </span><span style="color:blue;">INT</span><span style="color:gray;">,<br />
</span><span style="color:black;">ID28 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID29 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID30 </span><span style="color:blue;">INT</span><span style="color:gray;">,<br />
</span><span style="color:black;">ID31 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID32 </span><span style="color:blue;">INT</span><span style="color:gray;">, </span><span style="color:black;">ID33 </span><span style="color:blue;">INT</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span></code></p>
<p style="text-align:justify;">Here is the example when index created on 33 columns it gives error.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">CREATE STATISTICS </span><span style="color:black;">[Stats_Test1]<br />
</span><span style="color:blue;">ON </span><span style="color:black;">[dbo].[Test1]<br />
</span><span style="color:gray;">(</span><span style="color:black;">[ID1]</span><span style="color:gray;">, </span><span style="color:black;">[ID2]</span><span style="color:gray;">, </span><span style="color:black;">[ID3]</span><span style="color:gray;">, </span><span style="color:black;">[ID4]</span><span style="color:gray;">, </span><span style="color:black;">[ID5]</span><span style="color:gray;">,<br />
</span><span style="color:black;">[ID6]</span><span style="color:gray;">, </span><span style="color:black;">[ID7]</span><span style="color:gray;">, </span><span style="color:black;">[ID8]</span><span style="color:gray;">, </span><span style="color:black;">[ID9]</span><span style="color:gray;">, </span><span style="color:black;">[ID10]</span><span style="color:gray;">,<br />
</span><span style="color:black;">[ID11]</span><span style="color:gray;">, </span><span style="color:black;">[ID12]</span><span style="color:gray;">, </span><span style="color:black;">[ID13]</span><span style="color:gray;">, </span><span style="color:black;">[ID14]</span><span style="color:gray;">, </span><span style="color:black;">[ID15]</span><span style="color:gray;">,<br />
</span><span style="color:black;">[ID16]</span><span style="color:gray;">, </span><span style="color:black;">[ID17]</span><span style="color:gray;">, </span><span style="color:black;">[ID18]</span><span style="color:gray;">, </span><span style="color:black;">[ID19]</span><span style="color:gray;">, </span><span style="color:black;">[ID20]</span><span style="color:gray;">,<br />
</span><span style="color:black;">[ID21]</span><span style="color:gray;">, </span><span style="color:black;">[ID22]</span><span style="color:gray;">, </span><span style="color:black;">[ID23]</span><span style="color:gray;">, </span><span style="color:black;">[ID24]</span><span style="color:gray;">, </span><span style="color:black;">[ID25]</span><span style="color:gray;">,<br />
</span><span style="color:black;">[ID26]</span><span style="color:gray;">, </span><span style="color:black;">[ID27]</span><span style="color:gray;">, </span><span style="color:black;">[ID28]</span><span style="color:gray;">, </span><span style="color:black;">[ID29]</span><span style="color:gray;">, </span><span style="color:black;">[ID30]</span><span style="color:gray;">,<br />
</span><span style="color:black;">[ID31]</span><span style="color:gray;">, </span><span style="color:black;">[ID32]</span><span style="color:gray;">, </span><span style="color:black;">[ID33]<br />
</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;"><em><span style="color:#ff0000;">Msg 1904, Level 16, State 2, Line 1</span></em><br />
<em><span style="color:#ff0000;">The statistics &#8216;Stats_Test1&#8242; on table &#8216;dbo.Test1&#8242; has 33 column names in statistics key list. The maximum limit for index or statistics key column list is 32.</span></em></p>
<p style="text-align:justify;">Here is the example when index created on 32 columns it works perfectly fine.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">CREATE STATISTICS </span><span style="color:black;">[Stats_Test1]<br />
</span><span style="color:blue;">ON </span><span style="color:black;">[dbo].[Test1]<br />
</span><span style="color:gray;">(</span><span style="color:black;">[ID1]</span><span style="color:gray;">, </span><span style="color:black;">[ID2]</span><span style="color:gray;">, </span><span style="color:black;">[ID3]</span><span style="color:gray;">, </span><span style="color:black;">[ID4]</span><span style="color:gray;">, </span><span style="color:black;">[ID5]</span><span style="color:gray;">,<br />
</span><span style="color:black;">[ID6]</span><span style="color:gray;">, </span><span style="color:black;">[ID7]</span><span style="color:gray;">, </span><span style="color:black;">[ID8]</span><span style="color:gray;">, </span><span style="color:black;">[ID9]</span><span style="color:gray;">, </span><span style="color:black;">[ID10]</span><span style="color:gray;">,<br />
</span><span style="color:black;">[ID11]</span><span style="color:gray;">, </span><span style="color:black;">[ID12]</span><span style="color:gray;">, </span><span style="color:black;">[ID13]</span><span style="color:gray;">, </span><span style="color:black;">[ID14]</span><span style="color:gray;">, </span><span style="color:black;">[ID15]</span><span style="color:gray;">,<br />
</span><span style="color:black;">[ID16]</span><span style="color:gray;">, </span><span style="color:black;">[ID17]</span><span style="color:gray;">, </span><span style="color:black;">[ID18]</span><span style="color:gray;">, </span><span style="color:black;">[ID19]</span><span style="color:gray;">, </span><span style="color:black;">[ID20]</span><span style="color:gray;">,<br />
</span><span style="color:black;">[ID21]</span><span style="color:gray;">, </span><span style="color:black;">[ID22]</span><span style="color:gray;">, </span><span style="color:black;">[ID23]</span><span style="color:gray;">, </span><span style="color:black;">[ID24]</span><span style="color:gray;">, </span><span style="color:black;">[ID25]</span><span style="color:gray;">,<br />
</span><span style="color:black;">[ID26]</span><span style="color:gray;">, </span><span style="color:black;">[ID27]</span><span style="color:gray;">, </span><span style="color:black;">[ID28]</span><span style="color:gray;">, </span><span style="color:black;">[ID29]</span><span style="color:gray;">, </span><span style="color:black;">[ID30]</span><span style="color:gray;">,<br />
</span><span style="color:black;">[ID31]</span><span style="color:gray;">, </span><span style="color:black;">[ID32]<br />
</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">Well, in simple words, one can create statistics on 32 columns. Please additionally, note, the scope of this blog is not to discuss if that is good or bad. The purpose of this post is notice the Index can have maximum 16 columns but statistics can have 32 columns.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a> Tagged: <a href='http://blog.sqlauthority.com/tag/sql-statistics/'>SQL Statistics</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/16282/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/16282/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/16282/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/16282/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/16282/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/16282/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/16282/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/16282/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/16282/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/16282/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/16282/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/16282/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/16282/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/16282/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16282&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/12/11/sql-server-fix-error-msg-1904-level-16-the-statistics-on-table-has-33-column-names-in-statistics-key-list-the-maximum-limit-for-index-or-statistics-key-column-list-is-32/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; 2012 RC0: Fix Setup Error: File format is not valid</title>
		<link>http://blog.sqlauthority.com/2011/12/10/sql-server-2012-rc0-fix-setup-error-file-format-is-not-valid/</link>
		<comments>http://blog.sqlauthority.com/2011/12/10/sql-server-2012-rc0-fix-setup-error-file-format-is-not-valid/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 01:30:13 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=16278</guid>
		<description><![CDATA[I recently had long email conversation with one of the blog reader who was struggling with installing SQL Server 2012 RC0 installation. I just thought I will publish what we have done and how we solved problem so if you are facing the same issue, you can avoid the same. Though our conversation was very [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16278&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I recently had long email conversation with one of the blog reader who was struggling with installing SQL Server 2012 RC0 installation. I just thought I will publish what we have done and how we solved problem so if you are facing the same issue, you can avoid the same.</p>
<p style="text-align:justify;">Though our conversation was very long &#8211; I have kept only relevant conversation here.</p>
<p style="text-align:justify;"><strong>User</strong>: While installing the SQL Server 2012 RC0 the error which is displayed is: <span style="color:#ff0000;"><em><strong>File format is not valid.</strong></em></span><br />
Pinal: Download the iso format idea again.<br />
User: Downloaded the iso media and extracted it again into C Drive and attempted the installation &#8211; still the same error.<br />
Pinal: What is the tool you are using to extract the file?<br />
User: (Some tool)<br />
<strong>Pinal</strong>: Use alternate iso extractor tool or  winrar to extract file.<br />
User: It worked!</p>
<p style="text-align:justify;">The original media was all fine. However, when user was using a software which extract the files from ISO to folder, it was corrupting few files. Well, if you face this issue remember to attempt new software to extract your file. If that does not work, try one more time to download the file.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/16278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/16278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/16278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/16278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/16278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/16278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/16278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/16278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/16278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/16278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/16278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/16278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/16278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/16278/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16278&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/12/10/sql-server-2012-rc0-fix-setup-error-file-format-is-not-valid/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Fix: Error: File cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details</title>
		<link>http://blog.sqlauthority.com/2011/11/30/sql-server-fix-error-file-cannot-be-loaded-because-the-execution-of-scripts-is-disabled-on-this-system-please-see-get-help-about_signing-for-more-details/</link>
		<comments>http://blog.sqlauthority.com/2011/11/30/sql-server-fix-error-file-cannot-be-loaded-because-the-execution-of-scripts-is-disabled-on-this-system-please-see-get-help-about_signing-for-more-details/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 01:30:17 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=16089</guid>
		<description><![CDATA[Yesterday I formatted my computer and did fresh install as it was due from long time. After the fresh install when I tried to install Semantic Search application using powershell, I was stopped by following error. File cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16089&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Yesterday I formatted my computer and did fresh install as it was due from long time. After the fresh install when I tried to install Semantic Search application using powershell, I was stopped by following error.</p>
<p style="text-align:justify;">File cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/pserror.jpg" alt="" width="501" height="253" /></p>
<p style="text-align:justify;"><strong>Fix/Solution/Workaround:</strong></p>
<p style="text-align:justify;">The solution is very simple. Open the Powershell window and type following two lines and everything will fine right after that.</p>
<pre>Set-ExecutionPolicy Unrestricted
Set-ExecutionPolicy RemoteSigned</pre>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/pserrorsol1.jpg" alt="" width="500" /></p>
<p style="text-align:justify;">Again, this is I have done for my environment where I am very careful what I will run. You can change the policy back to original restricted policy if you want to restrict future execution of the powershell scripts.</p>
<p style="text-align:justify;">Simple &#8211; isn&#8217;t it? Well all complex looking problems are very simple to solve.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a> Tagged: <a href='http://blog.sqlauthority.com/tag/powershell/'>Powershell</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/16089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/16089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/16089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/16089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/16089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/16089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/16089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/16089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/16089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/16089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/16089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/16089/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/16089/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/16089/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=16089&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/11/30/sql-server-fix-error-file-cannot-be-loaded-because-the-execution-of-scripts-is-disabled-on-this-system-please-see-get-help-about_signing-for-more-details/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/pserror.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/pserrorsol1.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Dedicated Access Control for SQL Server Express Edition &#8211; An error occurred while obtaining the dedicated administrator connection (DAC) port.</title>
		<link>http://blog.sqlauthority.com/2011/10/23/sql-server-dedicated-access-control-for-sql-server-express-edition-an-error-occurred-while-obtaining-the-dedicated-administrator-connection-dac-port/</link>
		<comments>http://blog.sqlauthority.com/2011/10/23/sql-server-dedicated-access-control-for-sql-server-express-edition-an-error-occurred-while-obtaining-the-dedicated-administrator-connection-dac-port/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 01:30:07 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Interview Questions and Answers]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL Server Express]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=15140</guid>
		<description><![CDATA[Recently I had faced very interesting situation. Due to some reason we were not able to login into the production server for one of client. The reason for the same was that server was very busy, we had to login into the system and bring server to normal situation. When all the attempts failed, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=15140&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Recently I had faced very interesting situation. Due to some reason we were not able to login into the production server for one of client. The reason for the same was that server was very busy, we had to login into the system and bring server to normal situation. When all the attempts failed, I decided to login using Dedicated Administrator Connection (DAC). However when I attempted to connect using DAC it threw following error for me.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/expressstart0.jpg" alt="" width="652" height="138" /></p>
<pre style="text-align:justify;">C:\Users\pinald&gt;sqlcmd -A -d master -S .\SQLEXPRESS</pre>
<p style="text-align:justify;"><em><span style="color:#ff0000;">Sqlcmd: Error:</span> Microsoft SQL Server Native Client 11.0 : SQL Server Network Interfaces: An error occurred while obtaining the dedicated administrator connection (DAC) port. Make sure that SQL Browser is running, or check the error log for t he port number [xFFFFFFFF]. .Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login timeout expired.Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.</em></p>
<p style="text-align:justify;">I was bit taken a back as I knew that my commands are correct to login and if DAC does not work, there should be some serious reason for it. When inquired further about the SQL Server version I learned that it was SQL Server Express version deployed. To conserve resources, SQL Server Express does not listen on the DAC port. There is an additional step to be done if SQL Server Express has to be used with DAC. Enable TRACEFLAG on SQL Server Express will enable the connection by DAC possible. Here is the quick methods how one can enable DAC on SQL Server Express.</p>
<p style="text-align:justify;">Go to Start &gt;&gt; All Program &gt;&gt;Microsoft SQL Server (your version) &gt;&gt; Configuration Tools &gt;&gt; SQL Server Configuration Manager.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/expressstart00.jpg" alt="" width="254" height="329" /></p>
<p style="text-align:justify;">Click on SQL Server Services &gt;&gt; Select your SQL Server Express version &gt;&gt; Right Click Properties &gt;&gt; select Startup Parameters</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/expressstart1.jpg" alt="" width="405" height="466" /></p>
<p style="text-align:justify;">Once on the Startup Parameter add the Startup parameter which is TRACEFLAG -T7806. Click on OK and RESTART SQL Server Express edition. Now once again try to connect to SQL Server Express edition and it will work just fine.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/expressstart3.jpg" alt="" width="432" height="52" /></p>
<p style="text-align:justify;">This is absolutely documented method on <a href="http://msdn.microsoft.com/en-us/library/ms189595.aspx?ocid=aff-n-in-loc--pd" target="_blank">BOL</a> and SQL Server Express needs to be restarted.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/sql-interview-questions-and-answers/'>SQL Interview Questions and Answers</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a> Tagged: <a href='http://blog.sqlauthority.com/tag/sql-server-express/'>SQL Server Express</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/15140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/15140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/15140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/15140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/15140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/15140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/15140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/15140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/15140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/15140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/15140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/15140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/15140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/15140/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=15140&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/10/23/sql-server-dedicated-access-control-for-sql-server-express-edition-an-error-occurred-while-obtaining-the-dedicated-administrator-connection-dac-port/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/expressstart0.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/expressstart00.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/expressstart1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/expressstart3.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; FIX &#8211; ERROR &#8211; Service Logon Failure (ObjectExplorer)</title>
		<link>http://blog.sqlauthority.com/2011/05/18/sql-server-fix-error-service-logon-failure-objectexplorer/</link>
		<comments>http://blog.sqlauthority.com/2011/05/18/sql-server-fix-error-service-logon-failure-objectexplorer/#comments</comments>
		<pubDate>Wed, 18 May 2011 01:30:02 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12935</guid>
		<description><![CDATA[Just another day I received following error while starting my agent. As soon as I received following error I felt like Deja Vu. I had similar feeling few days ago. I quickly looked at my blog post history and I found out following article SQL SERVER – Fix : Error : The request failed or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12935&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Just another day I received following error while starting my agent. As soon as I received following error I felt like Deja Vu. I had similar feeling few days ago. I quickly looked at my blog post history and I found out following article <strong><a href="http://blog.sqlauthority.com/2011/03/29/sql-server-fix-error-the-request-failed-or-the-service-did-not-respond-in-timely-fashion-consult-the-event-log-or-other-applicable-error-logs-for-details/" target="_blank">SQL SERVER – Fix : Error : The request failed or the service did not respond in timely fashion. Consult the event log or other applicable error logs for details</a></strong>.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/servicelogonfail.jpg" alt="" width="500" height="123" /></p>
<p style="text-align:justify;"><span style="color:#ff0000;">TITLE: Microsoft SQL Server Management Studio</span><br />
<span style="color:#ff0000;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span><br />
<span style="color:#ff0000;">Unable to start service SQLSERVERAGENT on server PINALKUMAR. (mscorlib)</span><br />
<span style="color:#ff0000;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span><br />
<span style="color:#ff0000;">ADDITIONAL INFORMATION:</span><br />
<span style="color:#ff0000;">Service Logon Failure (ObjectExplorer)</span></p>
<p style="text-align:justify;">Indeed this was again issue with my changed password which I forget to change it for my SQL Server Agent. Once I changed the password, it fixed itself.</p>
<p style="text-align:justify;">I guess this should be last time when I change my password and do not change it in my services depending on the same login.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/12935/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/12935/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/12935/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/12935/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/12935/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/12935/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/12935/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/12935/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/12935/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/12935/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/12935/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/12935/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/12935/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/12935/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12935&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/05/18/sql-server-fix-error-service-logon-failure-objectexplorer/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/servicelogonfail.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Error:  Failed to retrieve data for this request. Microsoft.SqlServer.Management.Sdk.Sfc &#8211; &#8216;DATABASEPROPERTY&#8217; is not a recognized built-in function name. (Microsoft SQL Server, Error: 195)</title>
		<link>http://blog.sqlauthority.com/2011/05/03/sql-server-error-failed-to-retrieve-data-for-this-request-microsoft-sqlserver-management-sdk-sfc-databaseproperty-is-not-a-recognized-built-in-function-name-microsoft-sql-server-error-1/</link>
		<comments>http://blog.sqlauthority.com/2011/05/03/sql-server-error-failed-to-retrieve-data-for-this-request-microsoft-sqlserver-management-sdk-sfc-databaseproperty-is-not-a-recognized-built-in-function-name-microsoft-sql-server-error-1/#comments</comments>
		<pubDate>Tue, 03 May 2011 01:30:17 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12773</guid>
		<description><![CDATA[I have four different machine at home. Office Laptop &#8211; Provided by work organization Personal Laptop &#8211; My wife uses it Demo Machine &#8211; A very old machine &#8211; I think I can only do demo of my messenger only &#8211; it is 32 bit &#8211; single CPU 1 GB RAM I work with SQL [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12773&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I have four different machine at home.</p>
<ol style="text-align:justify;">
<li>Office Laptop &#8211; Provided by work organization</li>
<li>Personal Laptop &#8211; My wife uses it</li>
<li>Demo Machine &#8211; A very old machine &#8211; I think I can only do demo of my messenger only &#8211; it is 32 bit &#8211; single CPU 1 GB RAM</li>
</ol>
<p style="text-align:justify;">I work with SQL Server 2008 (R2) and SQL Server &#8216;Denali&#8217; and often connect to both the instances. Recently while I was connecting to Denali I encountered following error.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/Denalierror1.jpg" alt="" width="500" height="148" /></p>
<p style="text-align:justify;"><span style="color:#ff0000;">Failed to retrieve data for this request. Microsoft.SqlServer.Management.Sdk.Sfc)</span><br />
<span style="color:#ff0000;"> &#8216;DATABASEPROPERTY&#8217; is not a recognized built-in function name. (Microsoft SQL Server, Error: 195)</span></p>
<p style="text-align:justify;">I was bit confused with the error and suddenly realized that I was attempting to connect to SQL Server &#8216;Denali&#8217; instance from SQL Server 2008 R2 SSMS.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/denalierror2.jpg" alt="" width="492" height="623" /></p>
<p style="text-align:justify;">However, if you try to connect to SQL Server 2008 R2 from SQL Server &#8216;Denali&#8217; SSMS it will work absolutely fine.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/denalierror3.jpg" alt="" width="259" height="371" /></p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong><code><br />
</code></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/12773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/12773/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/12773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/12773/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/12773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/12773/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/12773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/12773/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/12773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/12773/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/12773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/12773/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/12773/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/12773/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12773&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/05/03/sql-server-error-failed-to-retrieve-data-for-this-request-microsoft-sqlserver-management-sdk-sfc-databaseproperty-is-not-a-recognized-built-in-function-name-microsoft-sql-server-error-1/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/Denalierror1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/denalierror2.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/denalierror3.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; FIX &#8211; ERROR : Msg 3201, Level 16 Cannot open backup device . Operating system error 5(Access is denied.)</title>
		<link>http://blog.sqlauthority.com/2011/04/13/sql-server-fix-error-msg-3201-level-16-cannot-open-backup-device-operating-system-error-5access-is-denied/</link>
		<comments>http://blog.sqlauthority.com/2011/04/13/sql-server-fix-error-msg-3201-level-16-cannot-open-backup-device-operating-system-error-5access-is-denied/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 01:30:57 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Data Storage]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12605</guid>
		<description><![CDATA[Recently I formatted my computer and installed fresh SQL Server in it. I installed AdventureWorks database in my database. Once done I wanted to run few test scripts on my database. Just like every DBA, I decided to take backup of my database &#8211; this way I can restore it back to attain original database [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12605&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Recently I formatted my computer and installed fresh SQL Server in it. I installed AdventureWorks database in my database. Once done I wanted to run few test scripts on my database. Just like every DBA, I decided to take backup of my database &#8211; this way I can restore it back to attain original database state. As soon as I ran the backup command I ended up with following error. This error is due to permissions issue on the local disk and user account which is running SQL Server.</p>
<p style="text-align:justify;"><span style="color:#ff0000;">Msg 3201, Level 16, State 1, Line 1</span><br />
<span style="color:#ff0000;"> Cannot open backup device &#8216;C:\AdventureWorks.bak&#8217;. Operating system error 5(Access is denied.).</span></p>
<p style="text-align:justify;"><strong>Fix/Resolution/Workaround:</strong></p>
<p style="text-align:justify;">I checked which user account my SQL Server services are running.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/NetworkError1.jpg" alt="" width="405" height="448" /></p>
<p style="text-align:justify;">I gave full permission to that account to get read of the error.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/NetworkError2.jpg" alt="" width="377" height="456" /></p>
<p style="text-align:justify;">NOTE: This whole experience was done on the my personal machine and not on production server. Please check with your network administrator for permission on production server.</p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-backup-and-restore/'>SQL Backup and Restore</a>, <a href='http://blog.sqlauthority.com/category/sql-data-storage/'>SQL Data Storage</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/12605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/12605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/12605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/12605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/12605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/12605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/12605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/12605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/12605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/12605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/12605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/12605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/12605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/12605/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12605&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/04/13/sql-server-fix-error-msg-3201-level-16-cannot-open-backup-device-operating-system-error-5access-is-denied/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/NetworkError1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/NetworkError2.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Fix : Error : The request failed or the service did not respond in timely fashion. Consult the event log or other applicable error logs for details</title>
		<link>http://blog.sqlauthority.com/2011/03/29/sql-server-fix-error-the-request-failed-or-the-service-did-not-respond-in-timely-fashion-consult-the-event-log-or-other-applicable-error-logs-for-details/</link>
		<comments>http://blog.sqlauthority.com/2011/03/29/sql-server-fix-error-the-request-failed-or-the-service-did-not-respond-in-timely-fashion-consult-the-event-log-or-other-applicable-error-logs-for-details/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 01:30:30 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[PostADay]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12392</guid>
		<description><![CDATA[Two days ago, I was participating TechEd India 2011 and I had great time presenting on various subjects. My computer fortunately behaved very well and I consider myself lucky for it. However, very next day today, when I went to office and turned on the machine, it did not start SQL Server. I was bit [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12392&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Two days ago, I was participating TechEd India 2011 and I had great time presenting on various subjects. My computer fortunately behaved very well and I consider myself lucky for it. However, very next day today, when I went to office and turned on the machine, it did not start SQL Server. I was bit confused and very quickly checked SQL Server Services. I noticed that services were OFF. I tried to turn on the services but it keep on giving me following error.</p>
<p style="text-align:justify;"><strong>Error:</strong></p>
<p style="text-align:justify;"><strong><span style="color:#ff0000;">The request failed or the service did not respond in timely fashion. Consult the event log or other applicable error logs for details.</span></strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/StartError.JPG" alt="" width="499" height="213" /></p>
<p style="text-align:justify;">I was bit puzzled and looked into the Windows Application Error Log. It showed me following details:</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/StartError1.jpg" alt="" width="515" height="236" /></p>
<p style="text-align:justify;">When I looked at above error I right away realized what had happened.</p>
<p style="text-align:justify;"><strong>Fix/Workaround/Resolution:</strong></p>
<p style="text-align:justify;">My organization has policy to change password at frequent interval. I had changed the password the day before and because of the same all the services were down. I quickly went to Property of the service and change the password to my updated password.</p>
<p style="text-align:justify;">Once done when I attempted to start the service, it worked well and error wend away.</p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/postaday/'>PostADay</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/12392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/12392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/12392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/12392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/12392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/12392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/12392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/12392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/12392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/12392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/12392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/12392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/12392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/12392/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=12392&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2011/03/29/sql-server-fix-error-the-request-failed-or-the-service-did-not-respond-in-timely-fashion-consult-the-event-log-or-other-applicable-error-logs-for-details/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/StartError.JPG" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/StartError1.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Puzzle &#8211; Challenge &#8211; Error While Converting Money to Decimal</title>
		<link>http://blog.sqlauthority.com/2010/11/27/sql-server-puzzle-challenge-error-while-converting-money-to-decimal/</link>
		<comments>http://blog.sqlauthority.com/2010/11/27/sql-server-puzzle-challenge-error-while-converting-money-to-decimal/#comments</comments>
		<pubDate>Sat, 27 Nov 2010 01:30:35 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Puzzle]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10995</guid>
		<description><![CDATA[Earlier I wrote SQL SERVER – Challenge – Puzzle – Usage of FAST Hint and I did receive some good comments. Here is another question to tease your mind. Run following script and you will see that it will thrown an error. DECLARE @mymoney MONEY; SET @mymoney = 12345.67; SELECT CAST(@mymoney AS DECIMAL(5,2)) MoneyInt; GO The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10995&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Earlier I wrote <a title="Permanent Link to SQL SERVER – Challenge – Puzzle – Usage of FAST Hint" rel="bookmark" href="http://blog.sqlauthority.com/2010/11/26/sql-server-challenge-puzzle-usage-of-fast-hint/">SQL SERVER – Challenge – Puzzle – Usage of FAST Hint</a> and I did receive some good comments. Here is another question to tease your mind. Run following script and you will see that it will thrown an error.<br />
<code style="font-size:12px;"><span style="color:blue;">DECLARE </span><span style="color:#434343;">@mymoney </span><span style="color:black;">MONEY</span><span style="color:gray;">;<br />
</span><span style="color:blue;">SET </span><span style="color:#434343;">@mymoney </span><span style="color:blue;">= </span><span style="color:black;">12345.67</span><span style="color:gray;">;<br />
</span><span style="color:blue;">SELECT </span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:#434343;">@mymoney </span><span style="color:blue;">AS DECIMAL</span><span style="color:gray;">(</span><span style="color:black;">5</span><span style="color:gray;">,</span><span style="color:black;">2</span><span style="color:gray;">)) </span><span style="color:black;">MoneyInt</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO<br />
</span></code></p>
<p style="text-align:justify;">The datatype of money is also visually look similar to the decimal, why it would throw following error:</p>
<p style="text-align:justify;"><span style="color:#ff0000;">Msg 8115, Level 16, State 8, Line 3</span><br />
<span style="color:#ff0000;">Arithmetic overflow error converting money to data type numeric.</span></p>
<p style="text-align:justify;">Please leave a comment with explanation and I will post a your answer on this blog with due credit.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.sqlauthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/sql-puzzle/'>SQL Puzzle</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sqlserver/'>SQLServer</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/10995/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/10995/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/10995/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/10995/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/10995/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/10995/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/10995/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/10995/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/10995/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/10995/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/10995/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/10995/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/10995/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/10995/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10995&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/11/27/sql-server-puzzle-challenge-error-while-converting-money-to-decimal/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER – ERROR – FIX – Msg 3702, Level 16, State 3, Line 1 Cannot drop database “MyDBName” because it is currently in use</title>
		<link>http://blog.sqlauthority.com/2010/11/14/sql-server-error-fix-msg-3702-level-16-state-3-line-1-cannot-drop-database-mydbname-because-it-is-currently-in-use/</link>
		<comments>http://blog.sqlauthority.com/2010/11/14/sql-server-error-fix-msg-3702-level-16-state-3-line-1-cannot-drop-database-mydbname-because-it-is-currently-in-use/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 01:30:14 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10711</guid>
		<description><![CDATA[I often go to do various seminars and presentations at various organizations. During presentations I often create and drop various databases for demonstrations purpose. Recently in one of the presentations, I tried to remove my recently created database, I got following error. Msg 3702, Level 16, State 3, Line 1 Cannot drop database &#8220;MyDBName&#8221; because [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10711&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I often go to do various seminars and presentations at various organizations.</p>
<p style="text-align:justify;">During presentations I often create and drop various databases for demonstrations purpose. Recently in one of the presentations, I tried to remove my recently created database, I got following error.</p>
<p style="text-align:justify;"><span style="color:#ff0000;">Msg 3702, Level 16, State 3, Line 1</span><br />
<span style="color:#ff0000;"> Cannot drop database &#8220;MyDBName&#8221; because it is currently in use.</span></p>
<p style="text-align:justify;">The reason was very simple as my database was in use by another session or window. I had option that I should go and find open session and close it right away; later followed by dropping the database. As I was in rush I quickly wrote down following code and I was able to successfully drop the database.</p>
<p><code style="font-size:12px;"><span style="color:blue;">USE MASTER<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">ALTER DATABASE </span><span style="color:black;">MyDBName<br />
</span><span style="color:blue;">SET </span><span style="color:black;">SINGLE_USER </span><span style="color:blue;">WITH ROLLBACK IMMEDIATE</span><span style="color:gray;">;<br />
</span><span style="color:blue;">DROP DATABASE </span><span style="color:black;">MyDBName<br />
GO</span></code></p>
<p style="text-align:justify;">Please note that I am doing all this on my demonstrations, do not run above code on production without proper approvals and supervisions.</p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/10711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/10711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/10711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/10711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/10711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/10711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/10711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/10711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/10711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/10711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/10711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/10711/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/10711/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/10711/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10711&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/11/14/sql-server-error-fix-msg-3702-level-16-state-3-line-1-cannot-drop-database-mydbname-because-it-is-currently-in-use/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Recycle Error Log &#8211; Create New Log file without Server Restart</title>
		<link>http://blog.sqlauthority.com/2010/11/09/sql-server-recycle-error-log-create-new-log-file-without-server-restart/</link>
		<comments>http://blog.sqlauthority.com/2010/11/09/sql-server-recycle-error-log-create-new-log-file-without-server-restart/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 01:30:43 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Interview Questions and Answers]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10751</guid>
		<description><![CDATA[The job of a consultant is always interesting – sometimes one becomes very busy and at times, over busy. I have been overwhelmed with recent performance tuning engagements. In one of the recent engagements, a large number of errors were found in the server. I noticed that their error log filled up very quickly. I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10751&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">The job of a consultant is always interesting – sometimes one becomes very busy and at times, over busy. I have been overwhelmed with recent <strong><a href="http://blog.sqlauthority.com/sql-server-performance-tuning/" target="_blank">performance tuning engagements</a></strong>. In one of the recent engagements, a large number of errors were found in the server. I noticed that their error log filled up very quickly. I also noticed a very interesting action by their DBA. I observed that after we make some changes in the server to avoid the errors, the DBA restarted the server. I asked him the reason for doing so. He explained every time that when he restarts the server, a new error log file is created. The current log file is renamed as errorlog.1; errorlog.1 becomes errorlog.2, and in a similar way, it continues. This way, after making some change, we can watch the error file from the beginning.</p>
<p style="text-align:justify;">However, there is no need to restart the server to create a new log file or recycle the log file. You can run sp_cycle_errorlog and achieve the same result. Here is an example of what I am suggesting.</p>
<p style="text-align:justify;"><strong>Before sp_cycle_errorlog</strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/SP_CYCLE_ERRORLOG1.jpg" alt="" width="373" height="305" /></p>
<p style="text-align:justify;"><strong>Executing sp_cycle_errorlog</strong></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">EXEC </span><span style="color:darkred;">sp_cycle_errorlog<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">&nbsp;</p>
<p style="text-align:justify;"><strong>After sp_cycle_errorlog</strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/SP_CYCLE_ERRORLOG2.jpg" alt="" width="375" height="310" /></p>
<p style="text-align:justify;">You can also create a new log for the agent in the same way after running sp_cycle_agent_errorlog.</p>
<p style="text-align:justify;">Do you use this feature on your production server? I am interested to learn about this.</p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/sql-interview-questions-and-answers/'>SQL Interview Questions and Answers</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/10751/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/10751/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/10751/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/10751/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/10751/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/10751/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/10751/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/10751/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/10751/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/10751/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/10751/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/10751/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/10751/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/10751/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10751&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/11/09/sql-server-recycle-error-log-create-new-log-file-without-server-restart/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/SP_CYCLE_ERRORLOG1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/SP_CYCLE_ERRORLOG2.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Fix: Error: MS Jet OLEDB 4.0 cannot be used for distributed queries because the provider is used to run in apartment mode.</title>
		<link>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/</link>
		<comments>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 01:30:02 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10755</guid>
		<description><![CDATA[I recently got email from blog reader with following error. MS Jet OLEDB 4.0 cannot be used for distributed queries because the provider is used to run in apartment mode. The fix of the same is very easy. Fix/Workaround/Resolution: sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'Ad Hoc Distributed Queries', 1; GO RECONFIGURE; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10755&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I recently got email from blog reader with following error.</p>
<p style="text-align:justify;"><span style="color:#ff0000;">MS Jet OLEDB 4.0 cannot be used for distributed queries because the provider is used to run in apartment mode.</span></p>
<p style="text-align:justify;">The fix of the same is very easy.</p>
<p style="text-align:justify;"><strong>Fix/Workaround/Resolution:</strong></p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:darkred;">sp_configure </span><span style="color:red;">'show advanced options'</span><span style="color:gray;">, </span><span style="color:black;">1</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">RECONFIGURE</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO<br />
</span><span style="color:darkred;">sp_configure </span><span style="color:red;">'Ad Hoc Distributed Queries'</span><span style="color:gray;">, </span><span style="color:black;">1</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">RECONFIGURE</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">If you are still facing the error after running above statement please leave a comment here and I will do my best to help you out.</p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/10755/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/10755/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/10755/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/10755/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/10755/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/10755/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/10755/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/10755/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/10755/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/10755/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/10755/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/10755/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/10755/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/10755/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10755&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/11/03/sql-server-fix-error-ms-jet-oledb-4-0-cannot-be-used-for-distributed-queries-because-the-provider-is-used-to-run-in-apartment-mode/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Corrupted Backup File and Unsuccessful Restore</title>
		<link>http://blog.sqlauthority.com/2010/10/24/sql-server-corrupted-backup-file-and-unsuccessful-restore/</link>
		<comments>http://blog.sqlauthority.com/2010/10/24/sql-server-corrupted-backup-file-and-unsuccessful-restore/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 01:30:05 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10631</guid>
		<description><![CDATA[If you are an SQL Server Consultant, there is never a single dull moment in your life. Quite often you are called in for fixing something, but then you always end up fixing something else! I was recently working on an offshore project where I was called in to tune high transaction OLTP server. During [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10631&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">If you are an SQL Server Consultant, there is never a single dull moment in your life. Quite often you are called in for fixing something, but then you always end up fixing something else!</p>
<p style="text-align:justify;">I was recently working on an offshore project where I was called in to tune high transaction OLTP server. During work, I demanded that I should have a server which is very similar to live database so I could inspect all the settings and data. I may end up running a few queries which may or may not change the server settings. The Sr. DBA agreed and instructed the Jr. DBA accordingly to restore a database from their backup.</p>
<p style="text-align:justify;">In a few minutes, their Jr. DBA arrived running to us, asking for our help. The problem was that when he attempted to restore the database, he was not able to restore the database as their backup. This eventually threw an error. Now this was very alarming for them because their backup file had some issues. I suggested trying some backups but again, the same issue occurred on all of them.</p>
<p style="text-align:justify;">The CTO, who was also present at the location, got very upset with this situation. He then asked when the last successful restore test was done. As expected, the answer was <strong>NEVER. </strong>There were no successful restore tests done before.</p>
<p style="text-align:justify;">During that time, I was present and I could clearly see the stress, confusion, carelessness and anger around me. I did not appreciate the feeling and I was pretty sure that no one in there wanted the atmosphere like me.</p>
<p style="text-align:justify;">The next step was to take a backup of their database right away. The CTO wanted to observe the complete process so he could figure out where the error originated and where was its exact location.</p>
<p style="text-align:justify;">Here is the error they were receiving when they attempted to restore the database:</p>
<p style="text-align:justify;"><span style="color:#ff0000;">Msg 3243, Level 16, State 1, Line 1</span><br />
<span style="color:#ff0000;"> The media family on device &#8216;D:\TestDB.bak&#8217; was created using Microsoft Tape Format version 1.22. SQL Server supports version 1.0.</span><br />
<span style="color:#ff0000;"> Msg 3013, Level 16, State 1, Line 1</span><br />
<span style="color:#ff0000;"> RESTORE DATABASE is terminating abnormally.</span></p>
<p style="text-align:justify;">The first thing I attempted to do is to take a backup of the database on another spare drive by myself. After having that backup, I tried to restore it to the database. As what I expected, it was successfully restored. Now that event provided me the information that there was nothing wrong with how the backup was done. The problem was located somewhere else. I asked them about their current process of taking a backup and storing it. They provided me the following diagram:</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/ftpprocess.jpg" alt="" width="500" height="250" /></p>
<p style="text-align:justify;">Looking at the diagram, I decided to test their FTP software. I uploaded  our organization’s FTP space. After it was done, I restored the database again and it worked without an error. This led me to think that there is something wrong in their UNIX server. After talking to their UNIX administrator, he informed me that they were running some cron jobs to compress the files and they were also moving those files to a larger drive. After listening to this, I was very sure there was something wrong during that process which had something to do with the .bak file because it was not able to work properly.</p>
<p style="text-align:justify;">After a few tests, the UNIX administrator accepted that that cron job was changing the structure of the file. In the meantime, he disabled the process to avoid this corruption. The CTO then asked me if there was any way they could tell if the backup which was already taken was good as gold or if there was a corruption in it.</p>
<p style="text-align:justify;">Here is the command that you can run on your database file so you can check if the database file is intact or if it has any corruption in it:</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">RESTORE </span><span style="color:black;">VERIFYONLY<br />
</span><span style="color:blue;">FROM DISK=</span><span style="color:red;">N'D:\TestDB.bak'<br />
</span></code></p>
<p style="text-align:justify;">The question is, &#8220;Do you practice this on your production server&#8217;s backup?&#8221;</p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-backup-and-restore/'>SQL Backup and Restore</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/10631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/10631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/10631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/10631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/10631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/10631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/10631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/10631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/10631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/10631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/10631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/10631/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/10631/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/10631/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10631&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/10/24/sql-server-corrupted-backup-file-and-unsuccessful-restore/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/ftpprocess.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER – Could not connect to TCP error code 10061: No connection could be made because the target machine actively refused it</title>
		<link>http://blog.sqlauthority.com/2010/10/20/sql-server-could-not-connect-to-tcp-error-code-10061-no-connection-could-be-made-because-the-target-machine-actively-refused-it/</link>
		<comments>http://blog.sqlauthority.com/2010/10/20/sql-server-could-not-connect-to-tcp-error-code-10061-no-connection-could-be-made-because-the-target-machine-actively-refused-it/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 01:30:51 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10587</guid>
		<description><![CDATA[I was recently getting following error in my StreamInsight Application. Could not connect to  TCP error code 10061: No connection could be made because the target machine actively refused it. The solution was very simple, I had to enable exception of the my port in my windows firewall. The way I figured it out  was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10587&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I was recently getting following error in my StreamInsight Application.</p>
<p style="text-align:justify;"><span style="color:#ff0000;">Could not connect to  TCP error code 10061: No connection could be made because the target machine actively refused it.</span></p>
<p style="text-align:justify;">The solution was very simple, I had to enable exception of the my port in my windows firewall. The way I figured it out  was by quickly disabling the firewall (it was not a production server). Once I disabled it, the application just worked fine; this was a sign that the firewall was the cause of the issue, I right away enabled firewall and added my port as exception.</p>
<p style="text-align:justify;">So many errors have cropped up recently due to the connectivity issue. I have started to make my routine to check firewall first before I move to next action item in my troubleshooting list.</p>
<p style="text-align:justify;">When I sent this detail to my internal technical list of the expert, I got the suggestion that this error happens due to many other reasons as well and not only due to firewall.</p>
<p style="text-align:justify;">I am interested to know when and how this error happens and what is the resolution. This way, if we have complete list, we can avoid this error in future.</p>
<p style="text-align:justify;">Reference:<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/10587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/10587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/10587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/10587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/10587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/10587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/10587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/10587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/10587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/10587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/10587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/10587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/10587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/10587/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10587&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/10/20/sql-server-could-not-connect-to-tcp-error-code-10061-no-connection-could-be-made-because-the-target-machine-actively-refused-it/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Error : Fix : Msg 5133, Level 16, State 1, Line 2 Directory lookup for the file failed with the operating system error 2(The system cannot find the file specified.)</title>
		<link>http://blog.sqlauthority.com/2010/10/05/sql-server-error-fix-msg-5133-level-16-state-1-line-2-directory-lookup-for-the-file-failed-with-the-operating-system-error-2the-system-cannot-find-the-file-specified/</link>
		<comments>http://blog.sqlauthority.com/2010/10/05/sql-server-error-fix-msg-5133-level-16-state-1-line-2-directory-lookup-for-the-file-failed-with-the-operating-system-error-2the-system-cannot-find-the-file-specified/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 01:30:13 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10426</guid>
		<description><![CDATA[I recently got email from friend who had suffered from following error. Msg 5133, Level 16, State 1, Line 2 Directory lookup for the file &#8220;filepath&#8221; failed with the operating system error 2(The system cannot find the file specified.). Msg 1802, Level 16, State 1, Line 2 CREATE DATABASE failed. Some file names listed could [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10426&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I recently got email from friend who had suffered from following error.</p>
<p style="text-align:justify;"><span style="color:#ff0000;">Msg 5133, Level 16, State 1, Line 2<br />
Directory lookup for the file &#8220;filepath&#8221; failed with the operating system error 2(The system cannot find the file specified.).<br />
Msg 1802, Level 16, State 1, Line 2<br />
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.<br />
Msg 5133, Level 16, State 1, Line 2<br />
Directory lookup for the file &#8220;filepath&#8221; failed with the operating system error 2(The system cannot find the file specified.).<br />
Msg 1802, Level 16, State 1, Line 2<br />
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.</span></p>
<p style="text-align:justify;">As per him he had gone crazy to find solution. He had been trying to create database  and he had all the admin privileges. After getting remote desktop, I realize that he was everything correct but the filepath he was trying to create. Once he corrected the filepath everything was smooth from there.</p>
<p style="text-align:justify;">If you have the same error I suggest you carefully check your filepath. <em><strong>There must be some typo or error in filepath.</strong></em> If that is not the case and with admin rights you are still facing issue, post a comment here.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/10426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/10426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/10426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/10426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/10426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/10426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/10426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/10426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/10426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/10426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/10426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/10426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/10426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/10426/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10426&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/10/05/sql-server-error-fix-msg-5133-level-16-state-1-line-2-directory-lookup-for-the-file-failed-with-the-operating-system-error-2the-system-cannot-find-the-file-specified/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Cross Database Queries Not Allowed in Indexed View &#8211; Limitation of the View 7</title>
		<link>http://blog.sqlauthority.com/2010/09/23/sql-server-cross-database-queries-not-allowed-in-indexed-view-limitation-of-the-view-7/</link>
		<comments>http://blog.sqlauthority.com/2010/09/23/sql-server-cross-database-queries-not-allowed-in-indexed-view-limitation-of-the-view-7/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 01:30:10 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL View]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10296</guid>
		<description><![CDATA[Update: Please read the summary post of all the 11 Limitations of the view SQL SERVER – The Limitations of the Views – Eleven and more… One of the requirements of Indexed View is that it has to be created &#8216;WITH SCHEMABINDING&#8217;. If the View is not created with that clause, it would not let [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10296&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#ff0000;">Update</span>: Please read the summary post of all the 11 Limitations of the view <strong><a rel="bookmark" href="http://blog.sqlauthority.com/2010/10/03/sql-server-the-limitations-of-the-views-eleven-and-more/" target="_blank">SQL SERVER – The Limitations of the Views – Eleven and more…</a></strong></p>
<p style="text-align:justify;">One of the requirements of Indexed View is that it has to be created &#8216;WITH SCHEMABINDING&#8217;. If the View is not created with that clause, it would not let you create an index on that View. Moreover, if you try to create a View with schemabinding, it would not allow you to create the database.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:green;">-- Create DB<br />
</span><span style="color:blue;">USE MASTER<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">CREATE DATABASE </span><span style="color:black;">TEST1<br />
</span><span style="color:blue;">CREATE DATABASE </span><span style="color:black;">TEST2<br />
GO<br />
</span><span style="color:green;">-- Table1<br />
</span><span style="color:blue;">USE </span><span style="color:black;">Test1<br />
GO<br />
</span><span style="color:blue;">CREATE TABLE </span><span style="color:black;">TABLE1 </span><span style="color:gray;">(</span><span style="color:black;">ID </span><span style="color:blue;">INT</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">USE </span><span style="color:black;">Test2<br />
GO<br />
</span><span style="color:green;">-- Table2<br />
</span><span style="color:blue;">CREATE TABLE </span><span style="color:black;">TABLE2 </span><span style="color:gray;">(</span><span style="color:black;">ID </span><span style="color:blue;">INT</span><span style="color:gray;">)<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">USE </span><span style="color:black;">Test1<br />
GO<br />
</span><span style="color:green;">-- Create View<br />
</span><span style="color:blue;">CREATE VIEW </span><span style="color:black;">CrossDBView<br />
</span><span style="color:blue;">WITH </span><span style="color:black;">SCHEMABINDING<br />
</span><span style="color:blue;">AS<br />
SELECT </span><span style="color:black;">t1.ID </span><span style="color:blue;">AS </span><span style="color:black;">t1id</span><span style="color:gray;">, </span><span style="color:black;">t2.ID </span><span style="color:blue;">AS </span><span style="color:black;">t2id<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">Test1.dbo.Table1 t1<br />
</span><span style="color:blue;">INNER JOIN </span><span style="color:black;">Test2.dbo.Table2 t2 </span><span style="color:blue;">ON </span><span style="color:black;">t1.ID </span><span style="color:blue;">= </span><span style="color:black;">t2.ID<br />
GO<br />
</span><span style="color:green;">/*<br />
Error:<br />
Msg 4512, Level 16, State 3, Procedure CrossDBView, Line 4<br />
Cannot schema bind view 'CrossDBView' because name 'Test1.dbo.Table1' is invalid for schema binding. Names must be in two-part format and an object cannot reference itself.<br />
*/<br />
-- Clean up<br />
</span><span style="color:blue;">DROP VIEW </span><span style="color:black;">CrossDBView<br />
GO<br />
</span><span style="color:blue;">USE MASTER<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">DROP DATABASE </span><span style="color:black;">TEST1<br />
</span><span style="color:blue;">DROP DATABASE </span><span style="color:black;">TEST2<br />
GO<br />
</span></code></p>
<p style="text-align:justify;">When you try to create the View, it would throw the following error:</p>
<p style="text-align:justify;"><span style="color:#ff0000;">Msg 4512, Level 16, State 3, Procedure CrossDBView, Line 4<br />
Cannot schema bind view &#8216;CrossDBView&#8217; because name &#8216;Test1.dbo.Table1&#8242; is invalid for schema binding. Names must be in two-part format and an object cannot reference itself.</span></p>
<p style="text-align:justify;">After looking at all these limitations, have you thought of other constraints that View has? If you know any other interesting limitations, please share them here through your comments.</p>
<p style="text-align:justify;">Reference :<strong> Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sql-view/'>SQL View</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/10296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/10296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/10296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/10296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/10296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/10296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/10296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/10296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/10296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/10296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/10296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/10296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/10296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/10296/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10296&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/09/23/sql-server-cross-database-queries-not-allowed-in-indexed-view-limitation-of-the-view-7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER – SELECT * and Adding Column Issue in View – Limitation of the View 4</title>
		<link>http://blog.sqlauthority.com/2010/09/15/sql-server-select-and-adding-column-issue-in-view-limitation-of-the-view%c2%a04/</link>
		<comments>http://blog.sqlauthority.com/2010/09/15/sql-server-select-and-adding-column-issue-in-view-limitation-of-the-view%c2%a04/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 01:30:33 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL View]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=10140</guid>
		<description><![CDATA[Update: Please read the summary post of all the 11 Limitations of the view SQL SERVER – The Limitations of the Views – Eleven and more… This is very well known limitation of the View. Once the view is created and if the basic table has any column added or removed, it is not usually [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10140&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#ff0000;">Update</span>: Please read the summary post of all the 11 Limitations of the view <strong><a rel="bookmark" href="http://blog.sqlauthority.com/2010/10/03/sql-server-the-limitations-of-the-views-eleven-and-more/" target="_blank">SQL SERVER – The Limitations of the Views – Eleven and more…</a></strong></p>
<p style="text-align:justify;">This is very well known limitation of the View.</p>
<p style="text-align:justify;">Once the view is created and if the basic table has any column added or removed, it is not usually reflected in the view till it is refreshed.</p>
<p style="text-align:justify;">To test this, we will create a view where we will use SELECT * and select everything from the table. Once the view is created, we will add a column to the view. We will test that even though we have used SELECT *, the view does not retrieve the newly added column. Once we refresh the view using SP_REFRESHVIEW, it will start retrieving the newly added column.</p>
<p style="text-align:justify;">Run the following T-SQL script in SQL Server Management Studio New Query Window:</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">AdventureWorks<br />
GO<br />
</span><span style="color:blue;">IF </span><span style="color:gray;">EXISTS (</span><span style="color:blue;">SELECT </span><span style="color:gray;">* </span><span style="color:blue;">FROM </span><span style="color:black;">sys.views </span><span style="color:blue;">WHERE </span><span style="color:magenta;">OBJECT_ID </span><span style="color:blue;">= </span><span style="color:magenta;">OBJECT_ID</span><span style="color:gray;">(</span><span style="color:red;">N'[dbo].[LimitView4]'</span><span style="color:gray;">))<br />
</span><span style="color:blue;">DROP VIEW </span><span style="color:black;">[dbo].[LimitView4]<br />
GO<br />
</span><span style="color:green;">-- Create View<br />
</span><span style="color:blue;">CREATE VIEW </span><span style="color:black;">LimitView4<br />
</span><span style="color:blue;">AS<br />
SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">HumanResources.Shift<br />
GO<br />
</span><span style="color:green;">-- Select from original table<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">HumanResources.Shift<br />
GO<br />
</span><span style="color:green;">-- Select from View<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">LimitView4<br />
GO<br />
</span><span style="color:green;">-- Add Column to original Table<br />
</span><span style="color:blue;">ALTER TABLE </span><span style="color:black;">HumanResources.Shift<br />
</span><span style="color:blue;">ADD </span><span style="color:black;">AdditionalCol </span><span style="color:blue;">INT<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Select from original table<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">HumanResources.Shift<br />
GO<br />
</span><span style="color:green;">-- Select from View<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">LimitView4<br />
GO<br />
</span><span style="color:green;">-- Refresh the view<br />
</span><span style="color:blue;">EXEC </span><span style="color:darkred;">sp_refreshview </span><span style="color:red;">'LimitView4'<br />
</span><span style="color:black;">GO<br />
</span><span style="color:green;">-- Select from original table<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">HumanResources.Shift<br />
GO<br />
</span><span style="color:green;">-- Select from View<br />
</span><span style="color:blue;">SELECT </span><span style="color:gray;">*<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">LimitView4<br />
GO<br />
</span><span style="color:green;">-- Clean up<br />
</span><span style="color:blue;">ALTER TABLE </span><span style="color:black;">HumanResources.Shift<br />
</span><span style="color:blue;">DROP COLUMN </span><span style="color:black;">AdditionalCol<br />
GO<br />
</span></code></p>
<p style="text-align:justify;">Above query will return following resultset.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/LimitView_4.jpg" alt="" width="500" height="522" /></p>
<p style="text-align:justify;">The same limitation exits in the case of deleting the column as well. This is a very well-known issue with the Views. The resolutions of these issues are as follows:</p>
<ol style="text-align:justify;">
<li>Refresh the views using      sp_refreshview stored procedure</li>
<li>Do not use SELECT * but use      SELECT columnnames</li>
<li>Create view with SCHEMABINDING;      this way, the underlying table will not get modified.</li>
</ol>
<p style="text-align:justify;">I am enjoying writing this series of blog posts on the limitation of the views. Do let me know if there is any other limitation you would like to read on this blog.</p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.sqlauthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/sql-view/'>SQL View</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/10140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/10140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/10140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/10140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/10140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/10140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/10140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/10140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/10140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/10140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/10140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/10140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/10140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/10140/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=10140&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/09/15/sql-server-select-and-adding-column-issue-in-view-limitation-of-the-view%c2%a04/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/LimitView_4.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER – FIX: ERROR: 8170 Insufficient result space to convert uniqueidentifier value to char</title>
		<link>http://blog.sqlauthority.com/2010/07/26/sql-server-fix-error-8170-insufficient-result-space-to-convert-uniqueidentifier-value-to-char/</link>
		<comments>http://blog.sqlauthority.com/2010/07/26/sql-server-fix-error-8170-insufficient-result-space-to-convert-uniqueidentifier-value-to-char/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 01:30:49 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9640</guid>
		<description><![CDATA[I just came across very simple error and the solution was even simpler. While concatenating NEWID to another varchar string, I had to CONVERT/CAST it to VARCHAR and I accidentally put length of VARCHAR to 10 instead of 36. It displayed following error. Msg 8170, Level 16, State 2, Line 1 Insufficient result space to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=9640&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I just came across very simple error and the solution was even simpler. While concatenating NEWID to another varchar string, I had to CONVERT/CAST it to VARCHAR and I accidentally put length of VARCHAR to 10 instead of 36. It displayed following error.</p>
<p style="text-align:justify;"><span style="color:#ff0000;">Msg 8170, Level 16, State 2, Line 1<br />
Insufficient result space to convert uniqueidentifier value to char.</span></p>
<p style="text-align:justify;">The code which I had ran earlier was as following.</p>
<p><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:red;">'GeneratedID:'</span><span style="color:gray;">+</span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">NEWID</span><span style="color:gray;">() </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">10</span><span style="color:gray;">)) </span><span style="color:blue;">AS </span><span style="color:black;">NEW_ID<br />
</span></code></p>
<p style="text-align:justify;"><strong>Solution:</strong></p>
<p style="text-align:justify;">The solution of above error is extremely simple. I just increased the length from VARCHAR(10) to VARCHAR(36) and it worked fine.</p>
<p><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:red;">'GeneratedID:'</span><span style="color:gray;">+</span><span style="color:magenta;">CAST</span><span style="color:gray;">(</span><span style="color:magenta;">NEWID</span><span style="color:gray;">() </span><span style="color:blue;">AS VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">36</span><span style="color:gray;">)) </span><span style="color:blue;">AS </span><span style="color:black;">NEW_ID<br />
</span></code></p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.sqlauthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/9640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/9640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/9640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/9640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/9640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/9640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/9640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/9640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/9640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/9640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/9640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/9640/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/9640/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/9640/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=9640&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/07/26/sql-server-fix-error-8170-insufficient-result-space-to-convert-uniqueidentifier-value-to-char/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; FIX : ERROR : 4214 BACKUP LOG cannot be performed because there is no current database backup</title>
		<link>http://blog.sqlauthority.com/2010/03/27/sql-server-fix-error-4214-backup-log-cannot-be-performed-because-there-is-no-current-database-backup/</link>
		<comments>http://blog.sqlauthority.com/2010/03/27/sql-server-fix-error-4214-backup-log-cannot-be-performed-because-there-is-no-current-database-backup/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 01:30:15 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL Log]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8303</guid>
		<description><![CDATA[I recently got following email from one of the reader. Hi Pinal, Even thought my database is in full recovery mode when I try to take log backup I am getting following error. BACKUP LOG cannot be performed because there is no current database backup. (Microsoft.SqlServer.Smo) How to fix it? Thanks, [name and email removed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=8303&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">I recently got following email from one of the reader.</p>
<p style="padding-left:30px;text-align:justify;"><em>Hi Pinal,</em></p>
<p style="padding-left:30px;text-align:justify;"><em>Even thought my database is in full recovery mode when I try to take log backup I am getting following error.</em></p>
<p style="padding-left:30px;text-align:justify;"><em><span style="color:#ff0000;">BACKUP LOG cannot be performed because there is no current database backup. (Microsoft.SqlServer.Smo)</span></em></p>
<p style="padding-left:30px;text-align:justify;"><em>How to fix it?</em></p>
<p style="padding-left:30px;text-align:justify;"><em>Thanks,<br />
[name and email removed as requested]</em></p>
<p style="text-align:justify;"><em><img class="alignnone" src="http://www.pinaldave.com/bimg/backuperror.jpg" alt="" width="500" height="140" /><br />
</em></p>
<p style="text-align:justify;"><strong>Solution / Fix:</strong></p>
<p style="text-align:justify;">This error can happen when you have never taken full backup of your database and you try to attempt to take backup of the log only. Take full backup once and attempt to take log back up. If the name of your database is MyTestDB follow procedure as following.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">BACKUP DATABASE </span><span style="color:black;">[MyTestDB]<br />
</span><span style="color:blue;">TO DISK = </span><span style="color:red;">N'C:\MyTestDB.bak'<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">BACKUP </span><span style="color:magenta;">LOG </span><span style="color:black;">[MyTestDB]<br />
</span><span style="color:blue;">TO DISK = </span><span style="color:red;">N'C:\MyTestDB.bak'<br />
</span><span style="color:black;">GO</span></code></p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-backup-and-restore/'>SQL Backup and Restore</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a> Tagged: <a href='http://blog.sqlauthority.com/tag/sql-log/'>SQL Log</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/8303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/8303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/8303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/8303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/8303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/8303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/8303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/8303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/8303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/8303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/8303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/8303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/8303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/8303/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=8303&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/03/27/sql-server-fix-error-4214-backup-log-cannot-be-performed-because-there-is-no-current-database-backup/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/backuperror.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Fix : Error : 8501 MSDTC on server is unavailable. Changed database context to publisherdatabase</title>
		<link>http://blog.sqlauthority.com/2010/03/24/sql-server-fix-error-8501-msdtc-on-server-is-unavailable-changed-database-context-to-publisherdatabase/</link>
		<comments>http://blog.sqlauthority.com/2010/03/24/sql-server-fix-error-8501-msdtc-on-server-is-unavailable-changed-database-context-to-publisherdatabase/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 01:30:39 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL Replication]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=8271</guid>
		<description><![CDATA[During configuring replication on one of the server, I received following error. This is very common error and the solution of the same is even simpler. MSDTC on server is unavailable. Changed database context to publisherdatabase. (Microsoft SQL Server, Error: 8501) Solution: Enable “Distributed Transaction Coordinator” in SQL Server. Method 1: Click on Start–&#62;Control Panel-&#62;Administrative [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=8271&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">During configuring replication on one of the server, I received following error. This is very common error and the solution of the same is even simpler.</p>
<p style="text-align:justify;"><span style="color:#ff0000;">MSDTC on server is unavailable. Changed database context to publisherdatabase. (Microsoft SQL Server, Error: 8501)</span></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/msdtc1.jpg" alt="" width="499" height="162" /></p>
<p style="text-align:justify;"><strong>Solution:</strong></p>
<p style="text-align:justify;"><em><strong>Enable “Distributed  Transaction Coordinator” in SQL Server.</strong></em></p>
<p style="text-align:justify;">Method 1:</p>
<ol style="text-align:justify;">
<li>Click on Start–&gt;Control Panel-&gt;Administrative  Tools-&gt;Services</li>
<li>Select the service “Distributed  Transaction Coordinator”</li>
<li>Right on the service and choose “Start”</li>
</ol>
<p style="text-align:justify;">Method 2:</p>
<ol style="text-align:justify;">
<li>Type services.msc in the run command box</li>
<li>Select “Services” manager; Hit Enter</li>
<li>Select the service “Distributed  Transaction Coordinator”</li>
<li>Right  on the service and choose “Start”</li>
</ol>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/msdtc2.jpg" alt="" width="403" height="506" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/msdtc4.jpg" alt="" width="500" height="408" /></p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<br />Filed under: <a href='http://blog.sqlauthority.com/category/tech/pinal-dave/'>Pinal Dave</a>, <a href='http://blog.sqlauthority.com/category/technology/sql/'>SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-authority/'>SQL Authority</a>, <a href='http://blog.sqlauthority.com/category/sql-error-messages/'>SQL Error Messages</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-query/'>SQL Query</a>, <a href='http://blog.sqlauthority.com/category/tech/sql-scripts/'>SQL Scripts</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-server/'>SQL Server</a>, <a href='http://blog.sqlauthority.com/category/technology/sql-tips-and-tricks/'>SQL Tips and Tricks</a>, <a href='http://blog.sqlauthority.com/category/technology/t-sql/'>T SQL</a>, <a href='http://blog.sqlauthority.com/category/technology/'>Technology</a> Tagged: <a href='http://blog.sqlauthority.com/tag/sql-replication/'>SQL Replication</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/8271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/8271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/8271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/8271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sqlauthority.wordpress.com/8271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sqlauthority.wordpress.com/8271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sqlauthority.wordpress.com/8271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sqlauthority.wordpress.com/8271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/8271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/8271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/8271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/8271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/8271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/8271/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&amp;blog=668536&amp;post=8271&amp;subd=sqlauthority&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2010/03/24/sql-server-fix-error-8501-msdtc-on-server-is-unavailable-changed-database-context-to-publisherdatabase/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/msdtc1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/msdtc2.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/msdtc4.jpg" medium="image" />
	</item>
	</channel>
</rss>
