﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 Administration  / Security question / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Mon, 20 May 2013 16:15:18 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Security question</title><link>http://www.sqlservercentral.com/Forums/Topic1381127-1550-1.aspx</link><description>DDL Triggers can help you.---------------------------------------------------------------------Create Trigger Deny_db_datareader on Databasefor ADD_ROLE_MEMBERasbegin     SELECT 1 where EVENTDATA().value      ('(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]','nvarchar(max)') Like '%sp_addrolemember%db_datareader%'If @@ROWCOUNT &amp;lt;&amp;gt; 0BeginPrint  'Add Rolemember being called in this database.' ROLLBACKEndPrint  'No Issues.' end---------------------------------------------------------------------------------------------Better try this in non-prod environment.</description><pubDate>Tue, 06 Nov 2012 04:00:07 GMT</pubDate><dc:creator>SQL Show</dc:creator></item><item><title>RE: Security question</title><link>http://www.sqlservercentral.com/Forums/Topic1381127-1550-1.aspx</link><description>Yes you can do that sort of thing if you want, just need to query the correct tables to get the information out and check it against a previosu run to capture any differences, alternativly setup a trace which does what you need and you can just review the trc file.</description><pubDate>Tue, 06 Nov 2012 01:49:16 GMT</pubDate><dc:creator>anthony.green</dc:creator></item><item><title>RE: Security question</title><link>http://www.sqlservercentral.com/Forums/Topic1381127-1550-1.aspx</link><description>Is it possible to create a sql job which runs every 15 mins to check if any user is added to the db_datareader database role?</description><pubDate>Mon, 05 Nov 2012 09:48:00 GMT</pubDate><dc:creator>sunny.tjk</dc:creator></item><item><title>RE: Security question</title><link>http://www.sqlservercentral.com/Forums/Topic1381127-1550-1.aspx</link><description>Then you start from top.First revoke sysadmin privileges and give less privilege to them better restrict them to database roles and then you can implement.</description><pubDate>Mon, 05 Nov 2012 09:21:50 GMT</pubDate><dc:creator>Ratheesh.K.Nair</dc:creator></item><item><title>RE: Security question</title><link>http://www.sqlservercentral.com/Forums/Topic1381127-1550-1.aspx</link><description>[quote][b]anthony.green (11/5/2012)[/b][hr]If you impliment the right security at the login level to prevent people adding people into the role then yes, but remember if a user has sysadmin rights they can do what they want even if you put an explict deny on the operation.[/quote]That doesn't sound like an option since we'd like to restrict everyone even sysadmins.</description><pubDate>Mon, 05 Nov 2012 09:03:05 GMT</pubDate><dc:creator>sunny.tjk</dc:creator></item><item><title>RE: Security question</title><link>http://www.sqlservercentral.com/Forums/Topic1381127-1550-1.aspx</link><description>If you impliment the right security at the login level to prevent people adding people into the role then yes, but remember if a user has sysadmin rights they can do what they want even if you put an explict deny on the operation.</description><pubDate>Mon, 05 Nov 2012 08:41:41 GMT</pubDate><dc:creator>anthony.green</dc:creator></item><item><title>Security question</title><link>http://www.sqlservercentral.com/Forums/Topic1381127-1550-1.aspx</link><description>Is it possible to restrict from adding new members to db_datareader role?</description><pubDate>Mon, 05 Nov 2012 08:36:04 GMT</pubDate><dc:creator>sunny.tjk</dc:creator></item></channel></rss>