Default Database

  • How do you know which is your default database for your server?

  • sp_helplogins should tell you this, look in the DefDBName, but will require elevated priviliges to run. Otherwise you can go to a database the user has been added to and run:

    sp_helpuser 'UserAccountHere'

  • sp_helplogins 'your loginame' would give you the default database name along with other info ...... If you are just looking for login name and default database .... you could run this

    select [name],dbname from sys.syslogins

    -------------------------------------------------
    -Amit
    Give a man a fish and he'll ask for a lemon. Teach a man to fish and he wont get paged on weekends !! :w00t: - desparately trying to fish [/size]

  • Thay you two for the replies. That's exactly what i needed.

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

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