How do you get the name of the database you are attached to if you do not have the database ID and vice a versa? Is there an SP or @@ or something? I am doing this for debugging purposes and need to make sure I am querying the correct database.
Thank you in advanced for your help!