How does SP Item Auditing works?
Hello everybody,
I have auditing enabled in my site and is not working properly. For example, if I access the document 2 times consecutively only one access is going to be logged. I suspect that theres some service or job that inserts the data into the AuditData Table because,
it takes about 5 minutes to the record show up on the table. Do you guys have any clues how the Item auditing works?
August 16th, 2010 4:22pm
Auditing, like most other things, are driven from the Service Jobs. Using STSADM you can execute:
stsadm -o execadmsvcjobs
to force any pending jobs in the queue to complete.
I trust that answers your question...
Thanks
C
http://www.cjvandyk.com/blog
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2010 4:12pm
I have tried the command but that's not the problem. The good news is that I've found some partern. Let's imagine I have a document library with 3 documents: A.doc, B.pdf and C.dot. If I click on document A and open, the AuditData table will
not have the record relative to document A. Now, if access B.pdf, document A will show up on the AuditData. If I access C.dot, now B will be among the records. It seems that there's a queue where the last cocument accessed gets stucked. I dont know if
it may help but there it goes the query I'm using to keep track of the table.
DECLARE @BEGINDATE DATETIME
DECLARE @ENDDATE DATETIME
SET @BEGINDATE = '2010-08-17 00:00:00.000'
SET @ENDDATE = '2010-08-17 23:59:59.000'
SELECT tp_login ,
tp_Title ,
a.occurred as data,
b.Leafname
FROM auditData A
JOIN AllDocs b
ON b.Id = a.ItemId
AND a.SiteID = b.SiteID
JOIN userinfo
ON tp_Id = a.userId
AND a.SiteId = tp_SiteId
WHERE a.Event = 3
AND
(
a.occurred >= @BEGINDATE
AND a.occurred <= @ENDDATE
)
AND b.ListId IN (select tp_id from allLists where tp_title = 'Document_Library_Name')
AND DocLibRowId IS NOT NULL
AND b.ExtensionForFile IN ('doc' ,
'docx',
'txt' ,
'xlsx',
'xls' ,
'gif' ,
'jpg' ,
'jpeg',
'pdf' ,
'rar' ,
'dot' ,
'zip')
GROUP BY tp_login ,
tp_Title ,
a.occurred,
b.Leafname
Any ideas?
August 17th, 2010 10:21pm