Mergecontentdbs is a new stsadm extension (part of WSS 3.0 SP1) which allows SharePoint administrators to easily move site collection(s) between different content databases, this is really handy when you migrating a monolithic SPS 2003 content db to MOSS 2007 and trying to separate MySites and Team Sites and host them under different Web applications. One caveat of running the tool is that you need to either be a site collection admin of the site collection being moved or need to run the command under farm admin account or you will get a nasty 0x80070005 error in the middle of the process:
12/21/2007 13:39:16.68 STSADM.EXE (0x13C8) 0x1704 Windows SharePoint Services General 8e2s Medium Unknown SPRequest error occurred. More information: 0x80070005
and a related 5762 error in the event log :
Event Type: Error
Event Source: Windows SharePoint Services 3
Event Category: Database
Event ID: 5762
Time: 10:57:11 AM
Duplicate unique index on SQL Server instance 'SqlShareDev' in database 'SharePoint_Config'. Additional error information from SQL Server is included below.
Cannot insert duplicate key row in object 'dbo.SiteMap' with unique index 'IX_SiteMap_ApplicationId_Path'.
The statement has been terminated.