See what database a site is connected to
I think this is what you are looking for:

https://drupal.org/project/show_database_name


  Display the host and database name of the default database on the status report, toolbar (Drupal 7) and/or on the admin_menu bar if enabled (either Drupal 6 or 7) and/or in a block (to use with the admin module).


It is marked as dev but it looks like a simple use-case and I don't expect there should be any problems.