Solved

SQL 2005 Column-Level Security

Posted on 2009-05-11
10
646 Views
Last Modified: 2012-05-06
How can I apply column level security on my tables? I understand that is easily done on a view but I cannot see how to do it on the tables.
0
Comment
Question by:afsfire
10 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 24357881
0
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 100 total points
ID: 24357893
you can also grant column-specific permissions per column in sql server.

listing: sp_column_privileges : RTFM:
http://msdn.microsoft.com/en-us/library/ms187765.aspx

the link has also in "see also" the links to GRANT and REVOKE

it's also possible to do it in the GUI ...
0
 
LVL 9

Expert Comment

by:ezraa
ID: 24357998
Use the GRANT, REVOKE, and DENY statements:

example - don't allow username to select the [MyColumn] column from the table [MyTable]:

revoke select ([MyColumn]) on [MyTable] to username

Open in new window

0
 

Author Comment

by:afsfire
ID: 24358476
How is it done in the GUI You ean in the Management Studio? Also if not in the GUI... where do I go to apply the Grant, Revoke, and Deny statements?
0
 
LVL 9

Accepted Solution

by:
ezraa earned 400 total points
ID: 24358803
right click on the table and choose properties -> Permissions

on the bottom you should see the button "Column Permissions"

You need to click (or add) a role, then you can select a permission and select the columns that has (or is revoked) that permission.
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

Author Comment

by:afsfire
ID: 24358892
When I right click on a table I don't have permissions see the screenshot. The version is MS SQL 2005 Standard SP2
screen.bmp
0
 

Author Comment

by:afsfire
ID: 24358905
Oh okay i think I found it under properties
0
 
LVL 9

Expert Comment

by:ezraa
ID: 24358913
Right click and click on Properties

Then in the window that opens you should see permission on the left side.
0
 
LVL 9

Assisted Solution

by:ezraa
ezraa earned 400 total points
ID: 24358964
Your looking for this:
perms.jpg
0
 

Author Closing Comment

by:afsfire
ID: 31580278
Thanks a bunch everyone
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now