Tuesday, March 27, 2012

Difference between permission to connect database engine (grant,deny ) & Login(enabled ,disa

When I create a new login in Sql server 2005.

I do two operations :-

Database engine ( grant ,deny ) - > set to deny

While Login(enabled ,disabled ) -> set to enabled

Now I tried to login with this login but unable to login to Database engine.

Again I do

Database engine ( grant ,deny ) - > set to grant

While Login(enabled ,disabled ) -> set to disabled

Now I try to login with this login but unable to login to Database engine.

Basically what is the functional difference between these two attributes :-

1> Database engine (grant,deny) &

2> Login(enabled ,disabled)

Thanks in advance .

In order to successfully login, you'd need to both Grant permission to connect to the database engine and Enable the login.

Granting permission to the DB Engine basically says this login can connect to this server instance...enabling/disabling a login does just that - enables or disables it's ability to login to the instance.

If you still have trouble after this, also take a look at the default database for the login and make sure the login has permission to access that database. For more information, see the following topics in BOL:

CREATE LOGIN (server level login to allow permission at the instance level)

CREATE USER (database level user that maps to a login to allow permissions at a particular database level)

Once you have the user in a database, you'll need to grant permissions to that user to allow it to do whatever you are trying to do with it (i.e. select, update, delete, etc.)

HTH,

sql

No comments:

Post a Comment