Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
learntsql
524 Posts |
Posted - 2011-03-03 : 05:40:02
|
Hi All,I created 2 logins.say log1 and log2 each have respective users.log1 has rights to access DB1 and log2 has rights to access DB2.but when i login in to system as log1 then i can able to access both DB1 and DB2.where in DB2 should not be accessed.Please guide me.TIA. |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-03-03 : 09:20:13
|
Can log1 SEE DB2 or can it actually access it? |
 |
|
namman
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-03-08 : 21:35:46
|
Access is about users not login. Your log1 may have 2 users, one in db1 and another in db2. Check db2 to make sure no user maps to the log1 |
 |
|
learntsql
524 Posts |
Posted - 2011-03-09 : 01:19:27
|
Yes,There are some users in DB2 who are mapped to not log1 but have access to DB1 via some other login and user.Is this causing problem?Please guide me.TIA. |
 |
|
namman
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-03-09 : 11:45:53
|
To access a db, a login must map to a user in that db, and some cases, it is implicit. You have to check not only users but also logins.if your log1 has special server role, like sysadmin, it can access to any db because it is map to dbo user in that db.if guest user in a db is enable, login can access the db because it can map to the guest. It is disabled by default.In short, your log1 maps to a user in db2. Remember it may be implicit, so check it. |
 |
|
|
|
|