SharePoint 2010 Move a Site Collection to another Content Database

Ever wanted to move a single Site Collection from Content Database A to Content Database B?

Well, the decision is sometimes really easy why to do so. If you are running out of free space in your content database, it may be better to separate the site collections into different content databases. This has something to do with planning your sites and the size you will need, but you also may know that you cannot plan everything in detail.

There are some steps to go through. At first you’ll have to create a new database, then you should move the site collection to the new database und afterwards you should look how to release the space from the old content database. Sounds easy, right? It is so. I make it a little more detailed.

Reminder: It is always better to make a backup before doing such stuff!

Step 1: Create a new Content Database

Go to your central administration and click on Application Management -> Manage content databases.

At the upcoming page please click on Add a content database. Now you will see this screen:

Fill out the necessary input fields and click Ok. Now you created a new Content database which also appears in your SQL Server Management Studio.

Step 2: Move the Site Collection

Now open the powershell of your SharePoint Server and type in the following commands:

[sourcecode language=”csharp”]

Move-SPSite http://servername/sites/sitename -DestinationDatabase yourNewContentDatabaseName

[/sourcecode]

Waiting a while till the command finished. Now the site collection is moved to the new content database. Check if it works.

Step 3: Release the space

If you are looking in your SQL Server Management Studio and watch out for the space of the content databases the new database is filled, but the old one (the source) has the same size. In order to release the space the moved site collection used, you should start the timer job called “Gradual Site Delete“. You find it at central administration – monitoring – Job definitions. Just click to run now and do it maybe two times. Normally that should do the work. I am not sure if this step is really working, but i guess so.

Now you’re done. Hope this helps.

..:: I LIKE SHAREPOINT ::..

The article or information provided here represents completely my own personal view & thought. It is recommended to test the content or scripts of the site in the lab, before making use in the production environment & use it completely at your own risk. The articles, scripts, suggestions or tricks published on the site are provided AS-IS with no warranties or guarantees and confers no rights.

About Karsten Schneider 312 Articles
Consultant for Microsoft 365 Applications with a strong focus in Teams, SharePoint Online, OneDrive for Business as well as PowerPlatform with PowerApps, Flow and PowerBI. I provide Workshops for Governance & Security in Office 365 and Development of Solutions in the area of Collaboration and Teamwork based on Microsoft 365 and Azure Cloud Solutions. In his free time he tries to collect tipps and worthy experience in this blog.

2 Comments

  1. Hey there! I know this is somewhat off topic but I was wondering if you knew
    where I could find a captcha plugin for my comment form?
    I’m using the same blog platform as yours and I’m having trouble finding one?

    Thanks a lot!

1 Trackback / Pingback

  1. Sharepoint 2010 Move Databases New Sql Server – clickclicklab.com

Leave a Reply

Your email address will not be published.


*