Sitecore Desktop Database selection shows duplicate or non-existent database
Do you see multiple instance of db listed in the database switcher on Sitecore Desktop after migrating to Sitecore 9. Hope I am not alone with this issue. After some search, I came to know that's a common issue, if you dont take care of the config files as a part of the migration. The following places can help you identify the issue.
Connection String
Ensure the ConnectionStrings.config has valid entries and no duplicates. Mostly we will have this valid. The next place to hit is the showconfig.aspx which had been always a life saver.
Showconfig.aspx
Open /sitecore/admin/ShowConfig.aspx from your instance and do a search for the <database id="dbname" or just id="dbname". In my case dbname was master, Find the non existent or Duplicate node, once discovered identify the source something like patch:source="Sitecore.Buckets.config"> on the end.
Found the duplicate entry from a invalid patch.
Lets fix the patch file to update the attributes and not to add a duplicate entry.