How to split or merge a content database

Leave a comment

Spliting a contentdatabase in SharePoint 2010 can be usefull when a sitecollection becomes to big and you want to move it to another database. This same technique can also be used to combine sitecollections from different content databases to one content database (maybe because in the end the content did not grow as fast as you would have expected ).

Start by exporting the sitecollection. Go to central admin and choose Backup and Restore:

Backup and Restore

Next choose ‘Perform a sitecollection backup’:

Export a sitecollection

Choose a sitecollection and give a name and location for your backup:

You have now exported the sitecollection. Next we will import the sitecollection in another contentdatabase. Go to central admin -> Application management -> Manage Content Databases and create a new contentdatabase for the webapplication in which the above exported sitecollection lives:

Add a new content database

Now we will move the sitecollection to the other contentdatabase. Start up Powershell (SharePoint 2010 Management Shell) and enter the following command:

Restore-SPSite -Identity -Path [-DatabaseServer ] [-DatabaseName ] [-HostHeader ] [-Force] [-GradualDelete] [-Verbose]

Which in my example will look like:

Restore-SPSite -Identity http://sp2010:82 -Path c:\test.bak -DatabaseServer SP2010 -DatabaseName WSS_Content_2f5af4672a134a9e9414c704cd3ac806 -force

Do not forget to add the ‘-force’ or else the existing sitecollection will not be overwritten.

Powershell

After this command the sitecollection is moved to the other contentdatabase:

Result

Advertisements

Custom Document Set Actions

Leave a comment

I just created my first project on Codeplex. I created 2 custom document set actions that could become handy when using document sets in SharePoint Designer workflows.

With the first action you can get a property (a column value) from the upper document set while the workflow is running on the underlying document. The value is stored in a local workflow variable and can be used to update a column of the current item or to make a workflow decision.

In English the above action looks like:
Returns the Column of the parent DocumentSet in Variabel.

The second action I created unrecords all documents in a document set. This action becomes handy if you want to send a document set to another location while some of it’s underlying documents are in-place records or records.

In English the above action looks like:
Unrecord all Documents in DocSet

You can find the codeplex project here:
Custom Document Set Actions