| Author |
Topic  |
|
|
Kalaiselvan
Yak Posting Veteran
India
83 Posts |
Posted - 12/03/2012 : 12:43:27
|
Hi, we are using SQL server 2008 as our DB server. And Admin User is used for all Transactions and Applications. Now a New Database is created for Payroll purpose. DB Name: PAYROLL. Need to give User Rights for this particular DB for single User and not even for Admin user.
New User: PayrollUser = Can access this Database. Admin User: Can access all Database other than PAYROLL DB.
Please help me how to provide the Rights for New User and Deny the Rights for Admin User.
Regards, Kalaiselvan R Love Yourself First
Regards, Kalai
|
|
|
sunitabeck
Flowing Fount of Yak Knowledge
5152 Posts |
Posted - 12/03/2012 : 14:17:39
|
| If you mean by "admin user", you mean a login who is a member of the sysadmin role on the server, then you cannot prevent that user from accessing any database they choose to, on that server. |
 |
|
|
Kalaiselvan
Yak Posting Veteran
India
83 Posts |
Posted - 12/04/2012 : 00:46:05
|
K. Then can we create a User who can access All DB except PAYROLL DB. And another User to access only PAYROLL DB.
Regards, Kalai
|
 |
|
|
sodeep
Flowing Fount of Yak Knowledge
USA
7173 Posts |
Posted - 12/05/2012 : 16:00:12
|
| Yes unless they are member of sysadmin |
 |
|
|
Kalaiselvan
Yak Posting Veteran
India
83 Posts |
Posted - 12/10/2012 : 12:26:57
|
Guide me to create a User to access only the PAYROLL DB and not other DB's.
Regards, Kalai
|
 |
|
|
sunitabeck
Flowing Fount of Yak Knowledge
5152 Posts |
Posted - 12/10/2012 : 12:54:01
|
In SSMS object explorer, at the server level, right click on Security -> Logins and select New Login. Select/specify the appropriate fields. To grant access to the specific database, under the User Mapping tab, click on the database name and grant appropriate permissions.
For end users, I usually grant only public role and then grant permissions on specific stored procedures as required. |
 |
|
| |
Topic  |
|