July 28, 2009 at 3:14 pm
Hi,
We setup a login for Active Directory group on the server. But the members get an error when they try to create new database. The error says " Cannot open default database. Login failed for user."
Now MSDB is set as the default database for this group.
Creating the database using T-SQL works. So I am thinking that he error is associated with SSMS GUI only.
Has anyone encountered this error? I googled and all references point towards setting 'Default database' which is already set.
thank you
Yogesh
July 28, 2009 at 7:43 pm
Yoseph
I did came accross issue with this in the past and the way I solved the login issue was by setting master database as the default database login.
U can use the following T-SQL to create the login:
CREATE LOGIN [DOMAINNAME\ADAccountName] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
Good Luck
IT
July 29, 2009 at 7:01 am
I tried that. No luck.
July 29, 2009 at 5:27 pm
Hi Yogesh
Try this with sqlcmd:
sqlcmd -d master -U sa -P mypassword
and then:
alter login sa with default_database = master
IT
July 30, 2009 at 7:12 am
DId that. No luck either.
July 30, 2009 at 7:22 am
So if you login to SSMS with the sa account it is not allowed to create a DB either?
Shawn Melton
Twitter: @wsmelton
Blog: wsmelton.github.com
Github: wsmelton
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply