Thursday, December 2, 2010

Splitting of content database

FYI The recommended size for a Content Database in SharePoint 2007 is: 100 GB


case study:
The Size of content Database of intranet site is 450 GB, with this content database size XYZ is facing issues in managing such a huge database.So in this case we have to split the content database.


One solution may be like this :

If there is only one Site Collection in the Content DB which consumes 450 GB then it's not possible to split the content Database but we have to tweak with subsites.

If  SiteCollection count >1 then we can move the Data of some selected site collections to another Content DB.

Add new content database (demo_content_2) from Central Administration àApplication Management à Content Databases to the existing Webapplication as shown below:
http://blogs.technet.com/photos/corybu/images/1315131/original.aspx 
From the above screenshot the delta for demo_content_1 is (500 – 3 = 497) and the delta for demo_content_2 is (500 – 0 = 500).  The larger the delta is determines where your site goes.  So the next site collection created will go into demo_content_2.

To perform the move of SiteCollections use the following 3 commands:

stsadm -o backup -url http://demo/sites/test2 -filename e:\test2.bak
stsadm -o deletesite -url http://demo/sites/test2
stsadm -o restore -url http://demo/sites/test2 -filename e:\test2.bak

If we refresh the content database page we can see that sitecollection has been moved to demo_content_2.
 http://blogs.technet.com/photos/corybu/images/1315132/original.aspx

To perform the move of subsites use the following 3 Commands:

stsadm -o export -url http://<path_to_site> -filename c:\<exportedSite>.cmp -overwrite -nofilecompression -includeusersecurity -cabsize 1024
Delete the subsite via SharePoint UI or stsadm command
stsadm -o import –url http://<path_to_site> -filename c:\<location_of_your_exorted_package>.cmp -nofilecompression -haltonfatalerror –includeusersecurity”
Now the sub-site would be created in new content database demo_content_2.
Note: A subsite has to be restored to a subsite only but not to a sitecollection.



No comments:

Post a Comment