Row- and Cell-Level Security

The SQL Agent view msdb.dbo.sysjobs_view is an example of row level security.

http://msdn.microsoft.com/en-us/library/cc966395.aspx

SELECT *
FROM dbo.sysjobs
WHERE owner_sid = SUSER_SID()
   OR ISNULL(IS_SRVROLEMEMBER(N'sysadmin'), 0) = 1
   OR ISNULL(IS_MEMBER(N'TargetServersRole'), 0) = 1
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s