Skip Ribbon Commands
Skip to main content

Cornelius J. van Dyk's SharePoint Brain Dump

:

How-do-I---Move-my-SharePoint-databases-from-32-bit-SQL-Server-2005-x86-to-a-new-Instance-on-64-bit-SQL-Server-2008-R2-x64

Thoughts, musings, outbursts and revelations of Cornelius J. van Dyk - 7 x Microsoft SharePoint MVP


As part the migration plan for a major customer of mine, we had a phase scheduled to move the backend databases from 32 bit Windows Server 2003/SQL Server 2005 to 64 bit Windows Server 2008 R2/SQL Server 2008 R2.  This brought back to light the question of how to move your content to a new SQL Server.  There are many good articles out there, but this worked well for us.

  1. Ensure you have the new SQL Server installed and fully patched and ready to go.
  2. For safety, we shut down all the SharePoint web front end servers and only kept the App server we were working from, alive.  This minimizes potential conflicts.
  3. Backup the SSP using the following command:
  4. stsadm -o backup -url <SSP URL> -filename <Backup File Name>
  5. image
  6. Once the SSP is backed up, ensure the service job queue is flushed using this command:
  7. stsadm -o execadmsvcjobs
  8. It is now time to delete the SSP.  Do so using this command:
  9. stsadm -o deletessp -title <SSP Title> -force
  10. It is possible that you will run into a roadblock trying to delete the SSP.  That roadblock in our case was a sync job object.  This is where the deleteconfigurationobject switch of STSADM comes in handy.  Grab the GUID reported as the ID in the error message and execute this command:
  11. stsadm -o deleteconfigurationobject -id <GUID from Error Message>
  12. Once the object is deleted, retry the SSP delete command from step 8.  This should now complete successfully.
  13. image
  14. Now that we’ve removed the SSP dependency, it is time to remap the server with this command:
  15. stsadm -o renameserver -oldservername <Old Server or Instance FQN> -newservername <New Server or Instance FQN>
  16. image
  17. NOTE: We were told, and from MSDN documentation, it was indicated that we could NOT move from a SQL Server to a SQL Server INSTANCE in this process.  Of course, we were going to test this theory and… prove it wrong.
  18. Now that the database server has been remapped to the new server instance, we need to restore the SSP with this command:
  19. stsadm -o restoressp -title <SSP Title> -url <Target URL for the SSP> -ssplogin <User ID for SSP Service Account> -ssppassword <Password for SSP Service Account> -mysiteurl <Target URL for MySites> -indexserver <Name of the Index Server> -indexlocation <File System Location for Index Files> -keepindex -sspdatabaseserver <SSP Database Instance Name> -sspdatabase <Name of the SSP Database> -searchdatabasename <Name of the Search Database> -searchdatabaseserver <Search Database Instance Name>
  20. image
  21. Once this process completes, you need to restart the SharePoint Timer Service with this command:
  22. net stop sptimerv3
  23. Once the Timer Service was successfully stopped, restart it with this command:
  24. net start sptimerv3
  25. Now flush any pending Admin Jobs with this command:
  26. stsadm -o exeadmsvcjobs
  27. image
  28. Finally, kick off a full crawl of your farm and all should be good in the SharePoint verse!

Later
C

FOLLOW ME: