Default Database when user is in multiple NT Groups

  • We are using Windows NT Authentication.  Each developer is part of some domain group.  The appropriate domain groups are granted access to one or more databases with various roles and various default databases.

    Here's the issue...(the groups permissions are all 'system admin' and they all have 'dbo' database roles..this is a DEV server)

    'User A' belongs to a domain group (WindowsDomain\GroupA) and the default database for that group is 'Database A'

    'User A' also belongs to ANOTHER domain group (WindowsDomain\GroupB) and the default db for that group is 'Database B'.

    How can I know which database the user will default into?  Is the only way to force one or the other to make an individual login for the user?

    Any thoughts?  Thanks!

  • This was removed by the editor as SPAM

  • Hi ellen feller,

    I'll be honest and say I don't know definitively which database the user will connect to.

    A quick way for you to check is to create a test user that belongs to each of these domain groups, connect to the server, and see which database you get connected to (something like select db_name()). My first guess would be that they will connect to whichever database is specified for the domain group that comes first, alphabetically. I'm on leave, or I'd do a bit more investigation, this is an interesting question.

    One quick comment on sysAdmin in DEV: Make sure the sql server runs under a different domain account in DEV than in PROD or everybody with sysAdmin in DEV is a deFacto sysAdmin on your PROD boxes, as well.

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

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