Viewing 8 posts - 1 through 9 (of 9 total)
I may end up going that route, Lowell. Thanks.
As an aside, this is the Oracle code I'm essentially trying to emulate...
create or replace trigger tr_logon
begin
If user not in ('SYS','SYSTEM','SYSMAN') then
Update...
June 18, 2015 at 9:38 am
Lowell (6/18/2015)
i think the OP is really...
June 18, 2015 at 8:49 am
Michael L John (6/18/2015)
mark.dickinson (6/18/2015)
Michael L John (6/17/2015)
3. I don't think Database name is part of...
June 18, 2015 at 8:44 am
Michael L John (6/17/2015)
3. I don't think Database name is part of the EventData Function. Try...
June 18, 2015 at 6:13 am
Okay... here's where I am...
Table create script works fine...
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Server_Logon_History](
[EventType] [nvarchar](100) NULL,
[PostTime] [datetime] NULL,
[LoginName] [nvarchar] (512) NULL,
[ClientHost] [nvarchar] (512)...
June 17, 2015 at 3:00 pm
Ed Wagner (6/17/2015)
mark.dickinson (6/17/2015)
Michael L John (6/17/2015)
CREATE TRIGGER [Server_Logon_Trigger]
ON ALL SERVER
FOR LOGON
AS
INSERT INTO DBAUtilities.dbo.Server_Logon_History(EventType, PostTime, ServerName, LoginName, LoginType, SID, ClientHost, IsPooled)
SELECT EVENTDATA().value('(/EVENT_INSTANCE/EventType)[1]', 'nvarchar(100)'),
EVENTDATA().value('(/EVENT_INSTANCE/PostTime)[1]',...
June 17, 2015 at 1:46 pm
Michael L John (6/17/2015)
CREATE TRIGGER [Server_Logon_Trigger]
ON ALL SERVER
FOR LOGON
AS
INSERT INTO DBAUtilities.dbo.Server_Logon_History(EventType, PostTime, ServerName, LoginName, LoginType, SID, ClientHost, IsPooled)
SELECT EVENTDATA().value('(/EVENT_INSTANCE/EventType)[1]', 'nvarchar(100)'),
EVENTDATA().value('(/EVENT_INSTANCE/PostTime)[1]', 'datetime'),
EVENTDATA().value('(/EVENT_INSTANCE/ServerName)[1]', 'nvarchar(512)'),
EVENTDATA().value('(/EVENT_INSTANCE/LoginName)[1]', 'nvarchar(512)'),
EVENTDATA().value('(/EVENT_INSTANCE/LoginType)[1]',...
June 17, 2015 at 1:40 pm
seaport (6/17/2015)
http://sqlblog.com/files/folders/release/entry35240.aspx
Create an agent job (schedule for every 5 minutes or any frequency you need), use the code from the script to get user...
June 17, 2015 at 12:54 pm
Viewing 8 posts - 1 through 9 (of 9 total)