• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

SQL security

If we use the grant or deny to restrict access to certain database fields, do we have to use sql authentication for it to work. We currently use Windows Authentication.
0
qbjgqbjg
Asked:
qbjgqbjg
  • 2
1 Solution
 
Barry CunneyCommented:
There should already be a Login principal for your Windows user in SQL Server under Security | Logins
You can create a database user principal in the required database associated with the Login principal
CREATE USER <yourDBUser> FOR LOGIN <YourWindowsUser>

You can then give whatever permissions you required to <yourDBUser>
0
 
Barry CunneyCommented:
You could also create a Database Role which has the necessary field(column) permissions and associate this role with the user
0
 
qbjgqbjgConsultantAuthor Commented:
Thanks. I think this will work.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now