Hi
I have created user login called "login1". There are two databases on Servers "MYDB1" and "MYDB2". I want user "login1" to access only database "MYDB1" , but not "MYDB2" (So if "login1" use "use MYDB2" command on sqlcmd it should give error").
Currently under Login Properties->User Mapping for "login1" has only database checked is "MYDB1". I have also under "Securable->View any Database" "Deny" options is checked.
But even though after all these settings "login1" can access the database "MYDB2" (Yes it can't access the objects in the database). BTW I am using "Application Role" in my application so "guest" account is enable on both databases so I can create view in one database based on data in other database. So I don't have option to turn off guest account. So am I still missing any settings so "login1" can't access the "MYDB2" (e.g. "use MYDB2" should give error)?
thanks
Drew