locked
[IMPORTANT] - How to move Site Collections to New Content DataBases in a different SQL Server? RRS feed

  • Question

  • Hi,

    I would like to know how could I do this.

    I have:

    • 1 Web Application
    • 7 Site Collections in 1 Content Database in 1 SQL Server (SQLServer 1)

    I want:

    • 1 Web Application (Same as above)
    • 1 Site Collection for 1 Content Database in another SQL Server (SQLServer 2)

    Thanks.

    Monday, November 30, 2015 4:57 PM

Answers

  • I contacted Microsoft for this one. Thanks anyway. 
    • Marked as answer by Andy__G Wednesday, December 16, 2015 3:18 PM
    Wednesday, December 16, 2015 3:18 PM

All replies

  • Hi Chicho84

    You need to perform following steps (wrt SP 2007):

    a) Create new content database first using stsadm -o addcontentdb

    b) Move the site collections to new db using stsadm -o mergecontentdbs. Pls refer below article on how to do the same:

    https://technet.microsoft.com/en-in/library/cc825327(v=office.12).aspx


    Thanks Mohit

    • Proposed as answer by Scott Brickey Monday, November 30, 2015 6:00 PM
    Monday, November 30, 2015 5:57 PM
  • Thanks.

    If I try that sharepoint gave me an error saying something like the source and destination server is not the same.

    I am using 2 different SQL Servers for the migration.

    Any other idea?

    Monday, November 30, 2015 6:48 PM
  • You may consider using stsadm -o backup to backup all sites into backup files in a Shared Folder. Then run 

    stsadm -o restore to the new web application 

    Details is in here

    https://technet.microsoft.com/en-SG/library/cc706871(v=office.12).aspx


    Cheng

    Tuesday, December 1, 2015 3:37 AM
  • Refer to below given references:

    Export-SPWeb
    Import-SPWeb

    Backup and Restore SharePoint site collection from one Farm to another Farm using STSADM commands
    http://blogs.msdn.com/b/vrajas/archive/2012/02/22/backup-and-restore-sharepoint-site-collection-from-one-farm-to-another-farm-using-stsadm-commands.aspx

    Use the Move-SPSite Cmdlet to move the desired site collections from the existing content database to the new one.

    Moreover, you may also try this SharePoint migration solution to move site collection.

    Hope this helps!

    Tuesday, December 1, 2015 5:16 AM
  • Thanks.

    I can not create a new Web Application. I am using a different SQL server for the new Content DBs. 

    Any other thoughts?

    Tuesday, December 1, 2015 1:38 PM
  • Thanks.

    I can not create a new Farm or Web Application. I am using a different SQL server for the new Content DBs. 

    Any other thoughts? 

    Tuesday, December 1, 2015 1:39 PM
  • If I try that sharepoint gave me an error saying something like the source and destination server is not the same.

    I am using 2 different SQL Servers for the migration.

    Any other idea?

    Hi Chicho84

    You can create another content database on the SQL server 1 and migrate site collections to that one. Once you migrate it successfully, detach newly created db from SQL server 1 and then perform a SQL backup/restore and create it on SQL server 2. After this, assign dbo perms to farm admin and attach it to the web application back. This way you should be able to avoid the issue mentioned above.


    Thanks Mohit


    • Edited by mohit.goyal Tuesday, December 1, 2015 2:32 PM
    Tuesday, December 1, 2015 2:31 PM
  • Thanks.

    The issue is that I not longer have SQL Server 1.

    Basically I have all request coming to the old SQL server pointing to new SQL Server 2 using a TCP/IP Network connection that I configured via CLICONFG.EXE

    Basically I am trying to take all the Site Collections that I have out of 1 Content DB and put them in their own Content DB. 

    Like this: 

    Site Collection           Content DB

    IT WSS_Content_IT

    HR WSS_Content_HR

    Now I have:

    Site Collection       Content DB

    IT       WSS_Content

    HR WSS_Content

    Tuesday, December 1, 2015 2:41 PM
  • Hi Chicho84

    Just wanted to confirm that you are on SP2007?


    Thanks Mohit

    Tuesday, December 1, 2015 3:09 PM
  • SharePoint 2013 Foundation 
    Tuesday, December 1, 2015 3:10 PM
  • Hi Chicho84

    Thanks for information. Above steps given should work, you can only skip section where you need to backup/restore content db. Try steps in below order:

    1) Create new content db on SQL2. However attach it to SP using mount-spcontentdatabase with databaseserver name as SQL1.

    2) Move site collection using move-spsite command.

    3) Detach it from web application using dismount-spcontentdatabase

    4) Attach it again to web application using mount-spcontentdatabase but give databaseserver name as SQL2.

    Let us know if this works for you.


    Thanks Mohit

    Tuesday, December 1, 2015 4:23 PM
  • Hi Chicho84

    Please let us know if you have applied the above procedure or any updates for us.


    Thanks Mohit

    Wednesday, December 16, 2015 3:16 PM
  • I contacted Microsoft for this one. Thanks anyway. 
    • Marked as answer by Andy__G Wednesday, December 16, 2015 3:18 PM
    Wednesday, December 16, 2015 3:18 PM