|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, October 17, 2012 1:26 PM
Points: 2,
Visits: 43
|
|
| How do you know which is your default database for your server?
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 1:14 PM
Points: 130,
Visits: 304
|
|
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'
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Sunday, May 05, 2013 3:41 PM
Points: 110,
Visits: 368
|
|
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 !! - desparately trying to fish
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, October 17, 2012 1:26 PM
Points: 2,
Visits: 43
|
|
| Thay you two for the replies. That's exactly what i needed.
|
|
|
|