Detach the content databases and reattach them. When you detach the
ContentDB, SharePoint removes all references to it from the Sites table
in the ConfigDB. When you reattach it, SharePoint will interrogate the
ContentDB's Sites table to make the appropriate entries in the
ConfigDB's Sites table.