<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dahlin Development - Blog &#187; MSSQL</title>
	<atom:link href="http://blog.dahlindevelopment.com/tag/mssql/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dahlindevelopment.com</link>
	<description></description>
	<lastBuildDate>Thu, 26 Aug 2010 18:37:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SQL Server 2008 &#8211; Saving Changes is not permitted.</title>
		<link>http://blog.dahlindevelopment.com/2009/11/sql-server-2008-saving-changes-is-not-permitted/</link>
		<comments>http://blog.dahlindevelopment.com/2009/11/sql-server-2008-saving-changes-is-not-permitted/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 13:12:19 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[MSSQL]]></category>

		<guid isPermaLink="false">http://blog.dahlindevelopment.com/?p=124</guid>
		<description><![CDATA[When trying to save a table when inserting a new column other than at the end I ran into this error: Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can’t be re-created or enabled the [...]]]></description>
			<content:encoded><![CDATA[<p>When trying to save a table when inserting a new column other than at the end I ran into this error:</p>
<div class="greyfullbox">
<p>Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table to be re-created.</p></div>
<p><a href="http://blog.dahlindevelopment.com/wp-content/uploads/2009/11/sql2k8save.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="sql2k8save" src="http://blog.dahlindevelopment.com/wp-content/uploads/2009/11/sql2k8save_thumb.png" border="0" alt="sql2k8save" width="442" height="362" /></a></p>
<p><strong>Solution:<br />
</strong>In Management Studio, Tools –&gt; Options then go to the Designer Page and uncheck &#8220;Prevent saving changes that require table re-creation&#8221;.</p>
<p><em>Solution found at: </em><a title="http://pragmaticworks.com/community/blogs/brianknight/archive/2008/06/04/sql-server-2008-designer-behavior-change-saving-changes-not-permitted.aspx" href="http://pragmaticworks.com/community/blogs/brianknight/archive/2008/06/04/sql-server-2008-designer-behavior-change-saving-changes-not-permitted.aspx"><em>http://pragmaticworks.com/community/blogs/brianknight/archive/2008/06/04/sql-server-2008-designer-behavior-change-saving-changes-not-permitted.aspx</em></a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.dahlindevelopment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.dahlindevelopment.com/2009/11/sql-server-2008-saving-changes-is-not-permitted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sql Server 2008 Install &#8211; Restart Computer Failed</title>
		<link>http://blog.dahlindevelopment.com/2009/09/sql-server-2008-install-restart-computer-failed/</link>
		<comments>http://blog.dahlindevelopment.com/2009/09/sql-server-2008-install-restart-computer-failed/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 20:34:36 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[Errors]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[MSSQL]]></category>

		<guid isPermaLink="false">http://blog.dahlindevelopment.com/?p=110</guid>
		<description><![CDATA[When installing SQL Server 2008 today I ran into an error right away.&#160; In testing the Setup Support Rules the “Restart computer” operation check failed. After a bit of Binging I found this thread: http://social.msdn.microsoft.com/forums/en-US/sqlsetupandupgrade/thread/ca182f5d-114a-4516-99d4-0854ad176fbf/ It talks about deleting any registry settings with a value of “PendingFileRenameOperations&#34; in the key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager&#34; Open your Windows [...]]]></description>
			<content:encoded><![CDATA[<p>When installing SQL Server 2008 today I ran into an error right away.&#160; In testing the Setup Support Rules the “Restart computer” operation check failed.</p>
<p><a href="http://blog.dahlindevelopment.com/wp-content/uploads/2009/09/sql2k8installerror.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="sql2k8installerror" border="0" alt="sql2k8installerror" src="http://blog.dahlindevelopment.com/wp-content/uploads/2009/09/sql2k8installerror_thumb.png" width="487" height="364" /></a> </p>
<p>After a bit of Binging I found this thread: <a href="http://social.msdn.microsoft.com/forums/en-US/sqlsetupandupgrade/thread/ca182f5d-114a-4516-99d4-0854ad176fbf/">http://social.msdn.microsoft.com/forums/en-US/sqlsetupandupgrade/thread/ca182f5d-114a-4516-99d4-0854ad176fbf/</a></p>
<p>It talks about deleting any registry settings with a value of “PendingFileRenameOperations&quot; in the key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager&quot; </p>
<p>Open your Windows programs type “regedit.exe” in the search then click enter. Now drill down to the Session Manager key.&#160; Look for any value with “Pending FileRenameOperations” and delete it.</p>
<p>Go back to the SQL Server 2008 setup and rerun it.&#160; Everything should pass now and you can proceed.</p>
<p><a href="http://blog.dahlindevelopment.com/wp-content/uploads/2009/09/regedit.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="regedit" border="0" alt="regedit" src="http://blog.dahlindevelopment.com/wp-content/uploads/2009/09/regedit_thumb.png" width="499" height="361" /></a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.dahlindevelopment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.dahlindevelopment.com/2009/09/sql-server-2008-install-restart-computer-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linq to Sql- AutoID not working</title>
		<link>http://blog.dahlindevelopment.com/2009/07/linq-to-sql-autoid-not-working/</link>
		<comments>http://blog.dahlindevelopment.com/2009/07/linq-to-sql-autoid-not-working/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 03:09:08 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[linq]]></category>
		<category><![CDATA[MSSQL]]></category>

		<guid isPermaLink="false">http://blog.dahlindevelopment.com/?p=86</guid>
		<description><![CDATA[Using Linq to Sql Auto IDs do not work by default.&#160; Lets say you have a table “Property” with a primary key of “PropertyId”.&#160; In the table definition it is set as a unqueidentifier and by default it is assigned a NewID(). Now go to your Linq to Sql and create your dbml, drag your [...]]]></description>
			<content:encoded><![CDATA[<p>Using Linq to Sql Auto IDs do not work by default.&#160; </p>
<p>Lets say you have a table “Property” with a primary key of “PropertyId”.&#160; In the table definition it is set as a unqueidentifier and by default it is assigned a NewID().</p>
<p><img src="http://www.dahlindevelopment.com/jing/PropertyId.png" /> </p>
<p>Now go to your Linq to Sql and create your dbml, drag your Property table into it.</p>
<p>In order to have the PropertyId generated using the Default Value go&#160; to the properties of the PropertyId field and set <strong>Auto Generate Value</strong> to <strong>True</strong> and <strong>Auto-Sync</strong> to <strong>OnInsert</strong>.</p>
<p><img src="http://www.dahlindevelopment.com/jing/PropertyDbml.png" /></p>
<p>I am sure many already know this, but I hope it can help save some time for others.&#160; </p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.dahlindevelopment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.dahlindevelopment.com/2009/07/linq-to-sql-autoid-not-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error Restoring SQL Server DB backup</title>
		<link>http://blog.dahlindevelopment.com/2009/04/error-restoring-sql-server-db-backup/</link>
		<comments>http://blog.dahlindevelopment.com/2009/04/error-restoring-sql-server-db-backup/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 03:54:00 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[MSSQL]]></category>

		<guid isPermaLink="false">http://blog.dahlindevelopment.com/?p=61</guid>
		<description><![CDATA[Scenerio: I had a web application that I developed on my local machine.&#160; When I finished it I made a backup of the database to deploy to the staging server. I uploaded it to the server then went to restore the db on the server, that is when I received this error: Restore failed for [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Scenerio:</strong> I had a web application that I developed on my local machine.&#160; When I finished it I made a backup of the database to deploy to the staging server.</p>
<p>I uploaded it to the server then went to restore the db on the server, that is when I received this error: </p>
<div class="greyboxfull"><em>Restore failed for Server ‘staging’. (Microsoft.SqlServer.Smo)
<p>Additional information:        <br />System.Data.SqlClient.SqlError: Directory lookup for the file “path.db.mdf” failed with the operating system error 2(The system cannot find the specified.). (Microsoft.SqlServer.Smo) </p>
<p>   </em></div>
<p>&#160;<a href="http://blog.dahlindevelopment.com/wp-content/uploads/2009/04/restoreerror.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="RestoreError" border="0" alt="RestoreError" src="http://blog.dahlindevelopment.com/wp-content/uploads/2009/04/restoreerror-thumb.gif" width="468" height="135" /></a> </p>
<p><strong>Solution: </strong>The location of where my database on my local machine was different than that on the server.&#160; I had to update the database location on the server.&#160; </p>
<p>This was done by when restoring clicking on the options tab.&#160; Then updating the paths of the Original File Name to where the database data is stored on the server.&#160; I found this path out by looking to see where the current ones were stored.</p>
<p><a href="http://blog.dahlindevelopment.com/wp-content/uploads/2009/04/restoreerrorsolution.gif"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="RestoreErrorSolution" border="0" alt="RestoreErrorSolution" src="http://blog.dahlindevelopment.com/wp-content/uploads/2009/04/restoreerrorsolution-thumb.gif" width="477" height="428" /></a></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.dahlindevelopment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.dahlindevelopment.com/2009/04/error-restoring-sql-server-db-backup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Automate your database backups on MOSSO</title>
		<link>http://blog.dahlindevelopment.com/2009/03/automate-your-database-backups-on-mosso/</link>
		<comments>http://blog.dahlindevelopment.com/2009/03/automate-your-database-backups-on-mosso/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 18:37:29 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[Rackspace Cloud]]></category>

		<guid isPermaLink="false">http://blog.dahlindevelopment.com/?p=27</guid>
		<description><![CDATA[Today I learned the hard way that your data isn&#8217;t always safe. I created an Admin interface for one of my clients that basically manages an Image Gallery. The gallery allows for a Category and SubCategory structure. I received a call at about 10:30am asking where all of his images were?  After doing some investigating, [...]]]></description>
			<content:encoded><![CDATA[<p>Today I learned the hard way that your data isn&#8217;t always safe.</p>
<p>I created an Admin interface for one of my clients that basically manages an Image Gallery. The gallery allows for a Category and SubCategory structure.</p>
<p>I received a call at about 10:30am asking where all of his images were?  After doing some investigating, my heart stopped, I found the bug.</p>
<p>I had a bug in my SubCategory_Delete proc that didn&#8217;t have the WHERE SubCategoryId = @SubCategoryId clause. When a user would delete a SubCategory it would delete all the photos in the image gallery instead of just the photos in that specific SubCategory.</p>
<p>My initial thought was to get the backup.  Well it turns out backups aren&#8217;t created automatically.  This is something you need to manual do when creating a database.</p>
<p>I was fortunate enough to have a great Customer Service rep, Sean Fox, that somehow managed to convince MOSSO&#8217;s IT team to create a backup for me from their disaster recovery backups.  Thanks MOSSO.</p>
<p>So after first going to my client with my tail between my legs I was able to go back to him as a hero. &#8220;Your data has been saved!&#8221;</p>
<p>I&#8217;ve since put in place a backup plan for all of my databases hosted at MOSSO.  I found this article in their Knowledge Base: <a title="http://help.mosso.com/article.php?id=34" href="http://help.mosso.com/article.php?id=34" target="_blank">http://help.mosso.com/article.php?id=34</a>6 for MSSql. There is one for MySql, <a title="http://help.mosso.com/article.php?id=356" href="http://help.mosso.com/article.php?id=356" target="_blank">http://help.mosso.com/article.php?id=356</a>.</p>
<p>I modified it a bit by creating a console app that is scheduled nightly and ran on my server.  This way only I can execute the backup.</p>
<p>My advice is to put this in place before you need it, not afterwards.</p>
<div class="callout">
If you&#8217;re looking for a great host with great customer service try <a title="MOSSO" href="http://www.mosso.com/" target="_blank">MOSSO </a>out. Let them know Dahlin Development sent you or you use my MOSSO referral code: REF-DAHLIN.  You&#8217;ll get some major discounts if you do.
</div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://blog.dahlindevelopment.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://blog.dahlindevelopment.com/2009/03/automate-your-database-backups-on-mosso/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
