﻿<?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 - General  / Error creating a logon trigger / 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>Thu, 20 Jun 2013 06:25:55 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Error creating a logon trigger</title><link>http://www.sqlservercentral.com/Forums/Topic991525-391-1.aspx</link><description>In that case you could use sp_who2 to log to a table in a job.Or you could do a server side trace as Gail suggested.</description><pubDate>Wed, 22 Sep 2010 14:33:40 GMT</pubDate><dc:creator>  Jack Corbett</dc:creator></item><item><title>RE: Error creating a logon trigger</title><link>http://www.sqlservercentral.com/Forums/Topic991525-391-1.aspx</link><description>sysprocessesHowever, having being where you are, a 2 minute poll to that table is not adequate. It does not take 2 min to connect, change data and disconnect. Rather go with a server-side trace if you can, you'll catch every single login that occurs.</description><pubDate>Wed, 22 Sep 2010 14:31:24 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: Error creating a logon trigger</title><link>http://www.sqlservercentral.com/Forums/Topic991525-391-1.aspx</link><description>thanks GilaMonsterFor all....My case is the following: There is a database in my enterprise which is used by DBA's, Developers and Client People. We believe that Client People are doing changes to the data without autorizathion but We can not deny theirs entrance to the database. We want to comprobate that they are getting access to the database from other client tools different than the application and because of that I want to register the login activity. The idea that I am thinking is to create a job for inserting data each 2min about all the sessions connected to the database for identifying who is connected diferent from our DBAs, Developers and application Server.And for that I need a data dictionary view to see the sessions information. Can you help with the name of that view ?Thanks in advance...</description><pubDate>Wed, 22 Sep 2010 14:27:27 GMT</pubDate><dc:creator>jfrancisco</dc:creator></item><item><title>RE: Error creating a logon trigger</title><link>http://www.sqlservercentral.com/Forums/Topic991525-391-1.aspx</link><description>For SQL 2000? Pretty much only feasible option is server-side trace.</description><pubDate>Wed, 22 Sep 2010 14:15:30 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: Error creating a logon trigger</title><link>http://www.sqlservercentral.com/Forums/Topic991525-391-1.aspx</link><description>Ahhhh ok Jack. Thanksand do you know how Can I check that same  information ( Login information ) with a data dictionary view. A view call sessions.... or something like that ?Thanks in advance</description><pubDate>Wed, 22 Sep 2010 14:11:50 GMT</pubDate><dc:creator>jfrancisco</dc:creator></item><item><title>RE: Error creating a logon trigger</title><link>http://www.sqlservercentral.com/Forums/Topic991525-391-1.aspx</link><description>Earliest version that you can use login triggers is SQL 2005 SP2. SQL 2000 does not have any form of DDL trigger.</description><pubDate>Wed, 22 Sep 2010 14:10:19 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: Error creating a logon trigger</title><link>http://www.sqlservercentral.com/Forums/Topic991525-391-1.aspx</link><description>There aren't logon triggers in Sql Server 2000 so you won't be able to move this to a 2000 server.The reason you are getting this error is because LOGON is a server level event not a database level event so you need to define the trigger as ON ALL SERVER.</description><pubDate>Wed, 22 Sep 2010 14:02:32 GMT</pubDate><dc:creator>  Jack Corbett</dc:creator></item><item><title>Error creating a logon trigger</title><link>http://www.sqlservercentral.com/Forums/Topic991525-391-1.aspx</link><description>Hi I am trying to create this trigger but I am getting an error... I am working in SQL Server 2005 but really the trigger is going to be created in SQL Server 2000.create trigger dbo.trigger_login_registers on databasefor logonasBEGIN        insert into dbo.login_registers values         (SYSTEM_USER, CURRENT_USER, getdate(), host_name());END;The error is the following:Msg 1084, Level 15, State 1, Procedure trigger_login_registers, Line 3'logon' is an invalid event type.I am checking the sintaxis and according to it, All is fine...Thanks</description><pubDate>Wed, 22 Sep 2010 13:34:22 GMT</pubDate><dc:creator>jfrancisco</dc:creator></item></channel></rss>