Try detaching and re-attach the content databases to fix the orphaned site collections. If there is any missing features ...