[cvsnt] CVSNT Auditing continued

Bo Berglund bo.berglund at telia.com
Wed Apr 29 18:23:07 BST 2009


On Wed, 29 Apr 2009 12:53:13 -0400 (EDT), "Mike Kay"
<mikekay at channelk.ca> wrote:
>> Try this (tested on a CVSNT repo audited by MSSQL Server, but the
>> command should be almost identical:
>>
>> SELECT Command, [Date], Username, Hostname, VirtRepos
>> FROM SessionLog
>> WHERE
>> (Command='update' OR Command='checkout')
>> AND ([Date] > '2006-01-05')
>> AND ([Date] < '2006-02-01')
>>
>> Notice the brackets surrounding Date, needed on MSSQL since Date is a
>> reserved word and here is also defining a column name. Bracketing
>> makes sure it is treated as a column name.
>>
>> Enter your own dates here...
>>
>> Of course there are more stuff possible to do on Commit and Tag
>> commands because they supply more data into the auditing....

>Well I'm back on this little project again after getting sidetracked with
>1000 other projects.
>
>I tried the commands as posted - ran execute - and absolutely nothing
>happens except for a quick blink of the screen.
>
>For me, there are a bunch of issues here - I am out of my depth being the
>number one. I'm not sure if the code incorrect, if my Explorer is
>non-functioning - or if I need different commands for SQLite.
>
>I'm going to join an SQLite forum and see if I can get help there.
>
>Can I not just go straight into the tables and look at the data?
>
>Thanks again for all the help and support.

As you might have seen from other posts in this forum the Audit table
column names have changed over time so if you database is of later
vintage than mine you should probably use this commadn instead:

 SELECT Command, StartTime, Username, Hostname, VirtRepos
 FROM SessionLog
 WHERE
 (Command='update' OR Command='checkout')
 AND (StartTime > '2006-01-05')
 AND (StartTime < '2006-02-01')

Notice also that if you do not use the two last lines the returned
dataset will not be time limited.
Another notice:
It might be a problem with using dates since the format sometimes is
localized and then you need to use the one appropriate for your
location.
I'd start without the two last lines to push that issue ahead a bit.



-- 

/Bo
(Bo Berglund, developer in Sweden)


More information about the cvsnt mailing list