You are here:   Home
  |  Login
DotNetNuke Core Team
Microsoft MVP
 Bookmark this article!
delicious.com delicious.com
digg digg
technorati technorati
reddit reddit
stumbleupon stumbleupon
facebook facebook
google bookmarks google bookmarks
yahoo bookmarks yahoo bookmarks
slashdot slashdot
live live
twitter twitter
DotNetKicks DotNetKicks

Tags

  1. 1 items are tagged with Admin settings
  2. 1 items are tagged with AJAX Extensions
  3. 1 items are tagged with ASP.NET
  4. 2 items are tagged with BBeyond
  5. 1 items are tagged with Caching
  6. 1 items are tagged with Cambrian
  7. 1 items are tagged with CBO
  8. 2 items are tagged with Codeplex
  9. 1 items are tagged with debugging
  10. 1 items are tagged with DotNetNuke
  11. 2 items are tagged with DotNetNuke 5
  12. 1 items are tagged with Email
  13. 1 items are tagged with email validation
  14. 1 items are tagged with GMail
  15. 1 items are tagged with Google
  16. 1 items are tagged with Google Apps
  17. 1 items are tagged with IBaseEntity
  18. 2 items are tagged with IdentitySwitcher
  19. 1 items are tagged with IHydratable
  20. 1 items are tagged with Inline Skin Object
  21. 2 items are tagged with Installation
  22. 1 items are tagged with Installer
  23. 1 items are tagged with intellisense
  24. 1 items are tagged with IPropertyAccess
  25. 1 items are tagged with Language
  26. 1 items are tagged with Manifest
  27. 1 items are tagged with moving
  28. 1 items are tagged with OpenForce
  29. 1 items are tagged with Permissions
  30. 1 items are tagged with Profile Properties
  31. 1 items are tagged with PropertyEditorControl
  32. 1 items are tagged with recent projects
  33. 1 items are tagged with regex
  34. 1 items are tagged with Sample Module
  35. 1 items are tagged with Search Results
  36. 2 items are tagged with Skin Object
  37. 1 items are tagged with Skinning
  38. 6 items are tagged with SQL
  39. 1 items are tagged with SQL Server
  40. 1 items are tagged with SQL Server 2008
  41. 1 items are tagged with Table Functions
  42. 2 items are tagged with TellCo
  43. 1 items are tagged with TokenReplace
  44. 2 items are tagged with Too Good to be True
  45. 1 items are tagged with Twitter
  46. 2 items are tagged with UPC
  47. 2 items are tagged with Upgrading
  48. 1 items are tagged with Users
  49. 2 items are tagged with visual studio
  50. 1 items are tagged with Visual Studio 2008

My Twitter Feed...

Thu, 29 Jul 2010 16:45:45 +0200

erikvb: Gettin unhealthy food. Yummy!

Thu, 29 Jul 2010 07:06:10 +0200

erikvb: RT @mashable: Google Makes Custom Web Typography Ridiculously Easy - http://ow.ly/2i8DG

Wed, 28 Jul 2010 05:05:48 +0200

erikvb: @Alyssa_Milano cool, you have a clone AND you are followed by @wilw . I can only dream of achieving the same...

Tue, 27 Jul 2010 22:20:49 +0200

erikvb: http://bit.ly/bwCZdB (Popularity is Everything: A new approach to protecting passwords from statistical-guessing attacks)

Tue, 27 Jul 2010 16:51:58 +0200

erikvb: RT @Telerik: Win an iPad or Telerik Ultimate licenses. Contest details at http://bit.ly/99ep9O [please RT]

Tue, 27 Jul 2010 10:06:20 +0200

erikvb: RT @TimoBreumelhof: Small bugfix for Style Helper #DNN #skin object posted: http://dnnskinextensions.codeplex.com/releases/view/47234

Mon, 26 Jul 2010 18:39:00 +0200

erikvb: @jbrinkman have fun playing with it :)

Mon, 26 Jul 2010 18:34:22 +0200

erikvb: @schotman als het maar droog blijft

Mon, 26 Jul 2010 17:51:38 +0200

erikvb: RT @christoc: RT @DNNCorp Get new insights from #DotNetNuke CEO Navin Nagiah at CMS Critic: http://bit.ly/aqkKwm

Sun, 25 Jul 2010 20:35:09 +0200

erikvb: RT @Heuserkampf: This will be interesting: Facebook lets publishers contact “likers”: http://bit.ly/9orOQN

Migrating databases from one server to the other

Last Updated 09/16/2008
By: Erik van Ballegoij

This night, I had to move a complete set of databases (20 in total) from one SQL server to another. In the past that has always taken me quite some time, so this time I set out to try to do this in a more efficient manner.

First i made sure that both servers had the same databases running. I did that by hand: backup on source server, and restore on destination server. If i ever need to move siginificantly more than 20 databases, i will need a more efficient method for this as well I guess.

The problem with this is that only restoring databases is not enough. This way, the database users of the source server will not exist in the destination server, so none of the application will have access. Luckily, Microsoft provides us with a way to migrate users from one server to the other. The method is explained pretty well in this knowledge base article: http://support.microsoft.com/default.aspx?scid=kb;en-us;246133.

The gist is this: you create a helper sproc named sp_help_revlogin in the master database of the source server. Running this sproc will create an SQL script that will recreate all users (including their security IDs) in the destination database.

When this was done, I stopped all websites, stopped both Source and Destination SQL server, and copied all datafiles and log files from all user databases from the source server to the destination server. Only the user databases, not any of the system databases. Next, i added the IP address of the source server to the destination server (i always use ip addresses in my connection strings). Now it was just a matter of starting the destination sql server, and all websites.. and ready. Total downtime on websites: 8 minutes.

I might have tried other synchronisation methods (like DTS, third party tools etc), however.... I found that sometimes DNN databases get strucurally corrupt, for instance after a failed module deinstall that deletes tables, but not stored procedures. Synchronizing databases will generate quite some errors in that case.

So, these are the steps i took to migrate all databases:

Preparation:

  • Create all necessary databases on the Destination SQL server
  • Synchronize users

Act:

  • Stop all websites (preferrably leave one site running to disply a friendly error message)
  • Stop destination and source SQL server
  • Copy all physical datafiles from source server to destination server
  • Start destination SQL server
  • Add source server IP address to destination server (and remove it from source server)
  • start all websites

Rate this:
Recent Comments
There are currently no comments. Be the first to make a comment.

Powered By

DotNetNuke Powered! This site is proudly powered by DotNetNuke.

 

(Advertisements)

My other blogs

Thu, 21 May 2009 18:41:00 +0200

Fri, 01 May 2009 14:57:00 +0200

Wed, 29 Apr 2009 16:11:00 +0200

Mon, 27 Apr 2009 20:33:05 +0200

Wed, 21 Jan 2009 20:13:00 +0100

Mon, 05 Jan 2009 23:00:00 +0100

Fri, 05 Dec 2008 16:45:08 +0100

Sun, 05 Oct 2008 22:23:00 +0200

Wed, 17 Sep 2008 14:07:00 +0200

Sun, 24 Aug 2008 21:23:00 +0200