Reduce content database size / move sites

The intranet is 1 web application as the following URL, http://intranet:3823

Under that are multiple site collections (correct term to use?!) such as..

http://intranet:3823/HR

http://intranet:3823/Finance

http://intranet:3823/Marketing

The problem that I face is that we also have team sites underneath a lot of the above (there are a lot more than those 3 I mentioned by the way) and the content database that http://intranet:3823 sits on is around 500GB.  The project is to reduce this size into smaller and easier databases to manage etc.

A further example of the above team sites are

http://intranet:3823/Finance/CreditControl

http://intranet:3823/Finance/AccountsPayable

http://intranet:3823/Finance/Invoicing

I've done some research and thought I read that a web app cannot have multiple content databases.  I want to split these with PowerShell unless anyone knows of a 3rd party GUI tool?

How would someone approach this and say have 5-10 smaller content databases?  I would imagine that it all still needs to sit under the http://intranet:3823 web app as hell would unleash if lots of embedded URLs all over the company started to break!

Would we be talking of a full structure redesign?

Thanks

August 9th, 2013 6:53pm

Hi,

1. You can also shrink your content database in SQL:

a. You can take a full backup of the Content database: http://technet.microsoft.com/en-us/library/ms187510.aspx

b. See what's the size of Log file (.ldf) and Shrink the transaction log file : http://technet.microsoft.com/en-us/library/ms190757.aspx

(Please be very very careful)

2. A web application can have more than one content database, when you have multiple site collections. Each site collection can have it's own database

In your case (if you confirm that http://intranet:3823/HR, http://intranet:3823/Finance, http://intranet:3823/Marketing etc. are site collection and not subsites on a single site collection http://intranet:3823) you can create a new content database for one site collection and run a PowerShell to move that site collection from original content database to new content database

Move-SPSite http://servername/sites/sitecollection -DestinationDatabase NewContentDb  as per the article :

http://technet.microsoft.com/en-us/library/ff607915.aspx 

Hope that helps.

3.

Free Windows Admin Tool Kit Click here and download it now
August 9th, 2013 7:35pm

Do not shrink content databases, it leads to fragmentation.  You can check your recovery mode and make sure it's simple unless you have a need for full, this is the only time I would shrink your database due to recovery mode.

You can have multiple content databases to one web application.  You just need to add the content databases under application management -> manage content databases.  Once you've created your databases you can use the move-spsite cmdlet to move your sites.  

You'll need to reset IIS for the changes to apply and then run the 'gradually delete site' timer job to completely remove the site from the original database.  This timer job runs daily so it's not necessary to manually run it if you do not want to.

August 10th, 2013 9:54am

You can move site collections around to different content databases without affecting the URL. You can also take a subsite and make it its own site collection by creating an empty site collection in a new content database and then doing export-spweb and import-spweb. the publishing functionality Manage Content and Structure can move sites around with varying results. 3rd party tools like DocAve and Quest and ControlPoint can move sites around 
Free Windows Admin Tool Kit Click here and download it now
August 11th, 2013 1:52am

Thanks all, I'll try some of these commands out on a test system this week.  We have DocAve for our SP backups so I'll explore thei other products also.
August 12th, 2013 4:22am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics