• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 190
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

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