<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.dirteam.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>The way I did it : Windows, SQL Server</title><link>http://blogs.dirteam.com/blogs/chrispetit/archive/tags/Windows/SQL+Server/default.aspx</link><description>Tags: Windows, SQL Server</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Upgrading SQL</title><link>http://blogs.dirteam.com/blogs/chrispetit/archive/2011/07/06/upgrading-sql.aspx</link><pubDate>Wed, 06 Jul 2011 14:51:43 GMT</pubDate><guid isPermaLink="false">4afa41f1-c118-406e-beda-ba054a9f6c33:5863</guid><dc:creator>ChrisPetit</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.dirteam.com/blogs/chrispetit/comments/5863.aspx</comments><wfw:commentRss>http://blogs.dirteam.com/blogs/chrispetit/commentrss.aspx?PostID=5863</wfw:commentRss><description>&lt;p&gt;&lt;font face="Verdana"&gt;When upgrading your environment to squeaky clean Windows Server 2008 R2 installations sooner or later you will have to tackle the SQL server. Migrating a Microsoft SQL server from 2005 to, say, 2008 R2 should be a walk in the park. It should be, if no one is actually using the server. Unfortunately this won’t be the case. Why buy a license to a product you’re not going to use, right?&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Verdana"&gt;So, first and foremost determine a maintenance window. Make sure people are not going to get mad and if they do, well, it’s always nice to be able to point out the fact that you notified them in advance.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Verdana"&gt;First of all, and you can do this in advance, make sure you can run the databases on a different server while upgrading one. Ideally this would be a virtual server, but any domain member server would do. If you install the latest version of SQL Server you can also test if your databases are going to work or if they are going to screw things up. Usually databases that make use of Active Directory service account tend to be pretty easy to migrate.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Verdana"&gt;The KB article describes how to do the standard SharePoint and IIS SQL databases migration:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/314546" target="_blank"&gt;&lt;font face="Verdana"&gt;http://support.microsoft.com/kb/314546&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Verdana"&gt;Assuming this all works fine and the databases of, for example, E-Policy Orchestrator are recovered from backup, as well after the migration and everything is running on your temporary server there is something you would like to keep in mind when migration to a &lt;b&gt;virtual&lt;/b&gt; temporary server. If you are going to do the migration in the course of a couple of days, you want to add the SQL databases to you backup schedule, in case anything goes wrong. Consider the fact that the &lt;b&gt;truncate&lt;/b&gt; of the logs can only complete after a &lt;b&gt;Full backup&lt;/b&gt;. If you do any sort of other backup in between this won’t work, your logs will grow and the disk where you keep your logs stored might run out of available space. This basically means you database stops functioning.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Verdana"&gt;This especially goes for virtual machines which usually get backed up with the host during a backup cycle. Make sure the Full Backup of the databases starts after the backup from the host server and guests and truncating the logs should be good.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Verdana"&gt;As you are probably aware it’s best practice to install the databases on a separate disk on the server. Also if you have space to spare, and it is a good idea to use a disc large enough for your collection of precious databases, consider formatting the disc with 64Kb cluster size. This means you will get better performance at the cost of wasting some disc space. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd425070.aspx" target="_blank"&gt;&lt;font face="Verdana"&gt;http://msdn.microsoft.com/en-us/library/dd425070.aspx&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Verdana"&gt;So you’ve installed and configured the Server, correctly formatted the discs and installed Microsoft SQL Server. First of all, on your clean installation, don’t forget to configure the Windows Firewall. You should have TCP/IP port 1433 (default) open for incoming and outgoing Database traffic. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Verdana"&gt;You now can migrate the databases back. Probably most will work. Then there is the one weird application which brakes. There always is one. Usually there are 3 possible explanations for this: &lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font face="Verdana"&gt;Either the service account is not correctly configured and this usually is a security issue. The applications documentation should help with this. &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font face="Verdana"&gt;Then there are the applications that work with SQL based accounts and logins. Make sure the database is in &lt;strong&gt;mixed mode&lt;/strong&gt;. With a new SQL server installation those that don’t work probably have lost their principal name in the master database and therefore, don’t work. These applications might have log files which can tell you more about the error you’re encountering. If the principal names are lost you might want to consider restoring them from a backup. What also works is deleting the accounts from the databases you’ve migrated and &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa337562.aspx" target="_blank"&gt;&lt;font face="Verdana"&gt;create new SQL account logins&lt;/font&gt;&lt;/a&gt;&lt;font face="Verdana"&gt; with the &lt;strong&gt;same credentials&lt;/strong&gt;. Make sure these accounts get the appropriate rights in their databases. Most of the time owner will do. Sometimes these applications make use of different than normal or dbo schema’s so also make sure to apply the correct schema to the logins. &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font face="Verdana"&gt;Third there are the applications you either will have to install from scratch or call in support…there is only so much you can do. &lt;/font&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;&lt;font color="#4f81bd" face="Verdana"&gt;Concluding&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;&lt;font face="Verdana"&gt;Migrating SQL can be hazardous because a lot of services might depend on it. If you draw up a plan, make sure the backup is standby, then little can go wrong. Business critical applications should be extra taken care of.&lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee229550(v=SQL.10).aspx" target="_blank"&gt;&lt;font face="Verdana"&gt;SQL Server 2008 Servicing Documentation&lt;/font&gt;&lt;/a&gt;&lt;font face="Verdana"&gt; &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms187510.aspx" target="_blank"&gt;&lt;font face="Verdana"&gt;How to: Back Up a Database (SQL Server Management Studio)&lt;/font&gt;&lt;/a&gt;&lt;font face="Verdana"&gt; &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms187495.aspx" target="_blank"&gt;&lt;font face="Verdana"&gt;Performing a Complete Database Restore (Full Recovery Model)&lt;/font&gt;&lt;/a&gt;&lt;font face="Verdana"&gt; &lt;/font&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;font face="Verdana"&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.dirteam.com/aggbug.aspx?PostID=5863" width="1" height="1"&gt;</description><category domain="http://blogs.dirteam.com/blogs/chrispetit/archive/tags/R2/default.aspx">R2</category><category domain="http://blogs.dirteam.com/blogs/chrispetit/archive/tags/database/default.aspx">database</category><category domain="http://blogs.dirteam.com/blogs/chrispetit/archive/tags/Migration/default.aspx">Migration</category><category domain="http://blogs.dirteam.com/blogs/chrispetit/archive/tags/SQL/default.aspx">SQL</category><category domain="http://blogs.dirteam.com/blogs/chrispetit/archive/tags/Server/default.aspx">Server</category><category domain="http://blogs.dirteam.com/blogs/chrispetit/archive/tags/2008/default.aspx">2008</category><category domain="http://blogs.dirteam.com/blogs/chrispetit/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.dirteam.com/blogs/chrispetit/archive/tags/Windows/default.aspx">Windows</category></item></channel></rss>