Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Login Auditing Expand / Collapse
Author
Message
Posted Thursday, February 21, 2013 7:46 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:20 AM
Points: 12,916, Visits: 32,080
I've created a pretty decent server side trace script that does a good job of auditing login info;
it definitely captures failed logins, as well as all these events:

--Audit Add DB User Event
--Audit Add Login to Server Role Event
--Audit Add Member to DB Role Event
--Audit Add Role Event
--Audit Addlogin Event
--Audit Login
--Audit Login Change Property Event
--Audit Login Failed
--Audit Login GDR Event
--Audit Logout
--Audit Schema Object GDR Event
--UserConfigurable:4

mylogonTrace.sql.txt


from there, i usually create a view for every trace i create so that i can easily look at the results
here's teh base of the needed SQl :


--SELECT * from sys.traces
declare @TraceIDToReview int
declare @path varchar(255)

SET @TraceIDToReview = 2 --this is the trace you want to review!
SELECT @path = path from sys.traces WHERE id = @TraceIDToReview
SELECT
TE.name As EventClassDescrip,
v.subclass_name As EventSubClassDescrip,
TE.*,
T.*
FROM ::fn_trace_gettable(@path, default) T
LEFT OUTER JOIN sys.trace_events TE ON T.EventClass = TE.trace_event_id
LEFT OUTER JOIN sys.trace_subclass_values V
ON T.EventClass = V.trace_event_id AND T.EventSubClass = V.subclass_value



Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1422589
Posted Friday, March 1, 2013 11:31 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 6, 2013 9:36 AM
Points: 5, Visits: 8
Hello Guys i think that If you want to see, at the time if someone is signed in twice and obtaining the same information look at the hosting server stocks and start information.auditing details is one operation.auditing log on is another operation between both and filtration the occasion audience you should be able to get what you want.Thanks a lot!!
Post #1425659
Posted Friday, March 1, 2013 11:43 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:20 AM
Points: 12,916, Visits: 32,080
saifulislam6720 (3/1/2013)
Hello Guys i think that If you want to see, at the time if someone is signed in twice and obtaining the same information look at the hosting server stocks and start information.auditing details is one operation.auditing log on is another operation between both and filtration the occasion audience you should be able to get what you want.Thanks a lot!!


the example i posted can let you see if the same login is open two or more times, but this trace does not capture WHAT they are looking at(just login/logout times, for exmapel)...you'd need to expand it to a full DML trace that also includes the Login audit events like my example above.



Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1425669
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse