What is my db name?

  • Hi,

    I am just writing a simple procedure to backup a database through my application but I don't know what the db will be called until i install the application. I can get to this information through other means but I'm sure that there must be a method within SQL. Is there

    anyway I can tell which of the datbases listed in sys.databases my stored procedure is being called from?

    Thanks

    John

  • Try the db_name() function?

  • ahem... I swear to the almighty that I scanned BOL and google for that.

    **feeling rather sheepish**

    thank you

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply