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:
<div>Move-SPSite http://servername/sites/sitename -DestinationDatabase yourNewContentDatabaseName</div>
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 ::..