We have a database server running SQL Server 2008 and we connect using Windows authentication based on Active Directory group membership. The group that gives me my login rights has the default database set to Abel, and that is how other members of the group like to have it. I want my default database to be Baker. Back when I had my own SQL Server login, I knew how to change its defaults. Can I still change my default database under Windows group authentication in away that will affect only me, an开发者_如何转开发d not the other members of my group?
Go to the SQL Server's Security
node in Object Explorer (inside SQL Server Management Studio), find your AD group's login, and change that group's "default database" property to whatever you want it to be:
Update: in response to your comment: no, you cannot have a different default database than your AD group's login defines. If you authenticate by means of the AD group login, then that group login has one and only one default database that applies to ALL members of the group
精彩评论