﻿<?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 2005 / SQL Server 2005 Security  / Audit Drop login / 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>Tue, 21 May 2013 21:28:06 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Audit Drop login</title><link>http://www.sqlservercentral.com/Forums/Topic1411001-359-1.aspx</link><description>ON ALL SERVER details that the trigger is a instance wide trigger and not specific to a database.</description><pubDate>Thu, 24 Jan 2013 04:18:55 GMT</pubDate><dc:creator>anthony.green</dc:creator></item><item><title>RE: Audit Drop login</title><link>http://www.sqlservercentral.com/Forums/Topic1411001-359-1.aspx</link><description>one more thing anthony this option "ON ALL SERVER" will enable on a specific instance on which we will create this trigger, or something else will do?</description><pubDate>Thu, 24 Jan 2013 03:50:49 GMT</pubDate><dc:creator>Zeal-DBA</dc:creator></item><item><title>RE: Audit Drop login</title><link>http://www.sqlservercentral.com/Forums/Topic1411001-359-1.aspx</link><description>You will need to change the event from DDL_EVENT to the correct event type which is DDL_LOGIN_EVENTS DDL Event Tree - [url]http://msdn.microsoft.com/en-us/library/bb510452%28v=sql.100%29.aspx[/url]You will need to query the eventdata() to get the data which is contained with in which is an XML format, so you need to pull out the information needed from that</description><pubDate>Thu, 24 Jan 2013 03:33:36 GMT</pubDate><dc:creator>anthony.green</dc:creator></item><item><title>RE: Audit Drop login</title><link>http://www.sqlservercentral.com/Forums/Topic1411001-359-1.aspx</link><description>anthony thanks for reply, can you please tell me what else changes required in existing script if i only want to cature events CREATE, DROP, ALTER LOGIN only.. and what info will be catured by this, if a login is droped ....?</description><pubDate>Thu, 24 Jan 2013 03:27:02 GMT</pubDate><dc:creator>Zeal-DBA</dc:creator></item><item><title>RE: Audit Drop login</title><link>http://www.sqlservercentral.com/Forums/Topic1411001-359-1.aspx</link><description>Basic server wide trigger for all DDL events, need to ensure that DB mail is enabled, or change the trigger to insert into an audit table somewhere[code="sql"]CREATE TRIGGER ................. ON ALL SERVERFOR DDL_EVENTSAS BEGIN	DECLARE @data XML;	DECLARE @schema SYSNAME;	DECLARE @object SYSNAME;	DECLARE @eventType SYSNAME;	DECLARE @user SYSNAME;	DECLARE @mess NVARCHAR(MAX);	DECLARE @dbname SYSNAME;	SET @user = SUSER_NAME()	SET @data = EVENTDATA();	SET @eventType = @data.value('(/EVENT_INSTANCE/EventType)[1]', 'SYSNAME');	SET @schema = @data.value('(/EVENT_INSTANCE/SchemaName)[1]', 'SYSNAME');	SET @object = @data.value('(/EVENT_INSTANCE/ObjectName)[1]', 'SYSNAME'); 	SET @dbname = @data.value('(/EVENT_INSTANCE/DatabaseName)[1]','SYSNAME');	SET @mess = 		'&amp;lt;FONT FACE="Arial"&amp;gt; User = ' + '&amp;lt;B&amp;gt;' + UPPER(CONVERT(SYSNAME, @user)) + '&amp;lt;/B&amp;gt;' + ' has done the following DDL operation'		+ ''		+ 'DDL Operation = ' + '&amp;lt;B&amp;gt;' + @eventType + '&amp;lt;/B&amp;gt;'		+ ''		+ 'Object = ' + '&amp;lt;B&amp;gt;' + @dbname + '.' + CONVERT(SYSNAME, @schema) + '.' + CONVERT(SYSNAME, @object) + '&amp;lt;/B&amp;gt;&amp;lt;/FONT&amp;gt;';		SELECT @mess		EXECUTE MSDB.DBO.sp_send_dbmail @profile_name = , @recipients = '', @subject = 'Server level change detected', @body = @mess, @body_format = 'HTML'END[/code]</description><pubDate>Thu, 24 Jan 2013 03:12:18 GMT</pubDate><dc:creator>anthony.green</dc:creator></item><item><title>RE: Audit Drop login</title><link>http://www.sqlservercentral.com/Forums/Topic1411001-359-1.aspx</link><description>as i have seen this link, it is mainly dfor DDL things like create or drop tables on a database, trigger will we created on database level.. but to capture a info regrads DROP  or create loginm there must b a server level trigger define ... mi right?</description><pubDate>Thu, 24 Jan 2013 03:07:51 GMT</pubDate><dc:creator>Zeal-DBA</dc:creator></item><item><title>RE: Audit Drop login</title><link>http://www.sqlservercentral.com/Forums/Topic1411001-359-1.aspx</link><description>[quote][b]Zeal-DBA (1/24/2013)[/b][hr]thanks for reply, how a DDL trigger will work on it can please elaborate?[/quote]see this [url]http://www.mssqltips.com/sqlservertip/2085/sql-server-ddl-triggers-to-track-all-database-changes/[/url]</description><pubDate>Thu, 24 Jan 2013 02:53:53 GMT</pubDate><dc:creator>Bhuvnesh</dc:creator></item><item><title>RE: Audit Drop login</title><link>http://www.sqlservercentral.com/Forums/Topic1411001-359-1.aspx</link><description>thanks for reply, how a DDL trigger will work on it can please elaborate?</description><pubDate>Thu, 24 Jan 2013 02:43:21 GMT</pubDate><dc:creator>Zeal-DBA</dc:creator></item><item><title>RE: Audit Drop login</title><link>http://www.sqlservercentral.com/Forums/Topic1411001-359-1.aspx</link><description>DDL trigger , extended event , profiler trace. etc.</description><pubDate>Thu, 24 Jan 2013 02:36:49 GMT</pubDate><dc:creator>Bhuvnesh</dc:creator></item><item><title>Audit Drop login</title><link>http://www.sqlservercentral.com/Forums/Topic1411001-359-1.aspx</link><description>hello,what are the different ways to audit if some one drops login, and which would be the best.please reply its urgent</description><pubDate>Thu, 24 Jan 2013 02:32:35 GMT</pubDate><dc:creator>Zeal-DBA</dc:creator></item></channel></rss>