When the size of your content grows, it might be a good idea to split the content into smaller chunks that are specific to a certain entity. This will also help in backing up and restoring individual content dbs that are easy to manage. The following set of stsadm operations would help with this process:
Before splitting / merging content databases, use the following stsadm command to see the existing content databases on the system:
stsadm -o enumcontentdbs -url http://[server_name]
To list the existing site collections on a specific content database:
stsadm -o enumsites -url http://[server_name] -databasename [contentdb_name]
The site collections list can be stored in an xml file by redirecting the output of the above command to an xml file as:
stsadm -o enumsites -url http://[server_name] -databasename [contentdb_name] > splitSites.xml
Before performing an actual merge, we can analyze how merge will happen.
stsadm -o mergecontentdbs -url http://[server_name] -sourcedatabasename [sourcedb_name] -destinationdatabasename [destinationdb_name] -operation 1
If the destination database is not present, it must be created via the Central Admin site.
On the Central Administration site, browse to Application Management and click Content databases link under SharePoint Web Application Management section. On this screen, click on Add a content database link to create a new content database. (Leave the settings at their default).
Now modify the splitSites.xml so that only the site collections that are to be moved to the new content database are left while deleting the other site collection references from the xml file.
Now, to actually split/merge the site collections to the new content db, execute the following command:
stsadm -o mergecontentdbs -url http://[server_name] -sourcedatabasename [sourcedb_name] - destinationdatabasename [destinationdb_name] -operation 3 -filename splitSites.xml
Perform an iisreset once the operation completes successfully.
All the site collections would continue to be accessed as before while they are housed in the respective content databases.