The problem about Sharepoint implementations is that typically when you create your
Sharepoint Web Application from Central Admin, there is one ContentDB that you assign.
Then spare no more thought to it……
In update KB934525 MS added a
new command to stsadm called MergeDBs.
This handles it all for you in a single command. You need to specify, WebApp1 address,
contentDB1 and an excerpt of the stsadm -o enumsites command to specify
the site(s) you want to ‘migrate’ to ContentDB2.
Here’s a great step by step article by Todd
Well done!