Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.
Hello, I'm trying to enable the audit database on a Microsoft SQL Server. The problem seems to be that the SessionId field in the CommitLog and HistoryLog tables is always inserted as '0'. (Using this value then probably makes the final update of the EndTime field also fail.) See the log below. This seems to be a supported database server. (Version is SQL Server 9.0.1399 - that's SQL Server 2005.) I created the tables from the CVSNT control panel and enabled auditing -- all pretty much plain and simple: select "mssql", set up connection, select logging of Sessions, Commits, Tags and History, click "Test Connection", click "Create Tables", click "OK". Is there something specific that needs to be done when connecting to this server? Or is it not supported? Thanks, Gerhard ------------------------------------------------- 09:56:03: -> Tracelevel set to 3. PID is 2660 09:56:03: -> Session ID is a644a1e89e35c14 09:56:03: -> Session time is Thu May 28 12:56:03 2009 09:56:03: -> Loading protocol sspi as sspi.dll 09:56:03: -> CLibraryAccess::Load loading C:\PROGRA~1\CVS\CVSNT/protocols/sspi.dll 09:56:03: -> main loop with CVSROOT=:sspi:xsprada\gfiedler at cvs.xsprada.local:/Engineering 09:56:06: -> Server codepage is CP1252 09:56:06: -> Client codepage is CP1252 09:56:06: -> Server version is CVSNT 2.5.04 (Zen) Build 3236 () 09:56:06: -> Client version is CVSNT 2.5.03 (Scorpio) Build 2382 ... 07:55:50: S -> LoadTrigger(audit.dll) 07:55:50: S -> CLibraryAccess::Load loading C:\PROGRA~1\CVSSUI~1/triggers/audit.dll 07:55:50: S -> call library init with physical_repository=C:/cvsrepo/Engineering. 07:55:50: S -> Connecting to mssql 07:55:50: S -> CLibraryAccess::Load loading C:\PROGRA~1\CVSSUI~1/database/mssql.dll 07:55:50: S -> Select Version From SchemaVersion 07:55:50: S -> Select Version From SchemaVersion 07:55:50: S -> MSSQL Execute Done 07:55:50: S -> MSSQL Execute all complete now get the Number of Result Columns 07:55:50: S -> Audit SchemaVersion=3 07:55:50: S -> Insert Into SessionLog (Command, StartTime, Hostname, Username, SessionId, VirtRepos, PhysRepos , Client) Values (?,'2009-05-28 12:55:47',?,?,'14904a1e89d35be0',?,?,'CVSNT 2.5.03 (Scorpio) Build 2382') sele ct @@IDENTITY 07:55:50: S -> Bind vtString (SQL Server) 07:55:50: S -> Bind vtString as type SQL_NTS (Null Terminated String) 07:55:50: S -> Bind vtString as SQL_VARCHAR/text C_WCHAR 07:55:50: S -> Bind vtString (SQL Server) 07:55:50: S -> Bind vtString as type SQL_NTS (Null Terminated String) 07:55:50: S -> Bind vtString as SQL_VARCHAR/text C_WCHAR 07:55:50: S -> Bind vtString (SQL Server) 07:55:50: S -> Bind vtString as type SQL_NTS (Null Terminated String) 07:55:50: S -> Bind vtString as SQL_VARCHAR/text C_WCHAR 07:55:50: S -> Bind vtString (SQL Server) 07:55:50: S -> Bind vtString as type SQL_NTS (Null Terminated String) 07:55:50: S -> Bind vtString as SQL_VARCHAR/text C_WCHAR 07:55:50: S -> Bind vtString (SQL Server) 07:55:50: S -> Bind vtString as type SQL_NTS (Null Terminated String) 07:55:50: S -> Bind vtString as SQL_VARCHAR/text C_WCHAR 07:55:50: S -> Insert Into SessionLog (Command, StartTime, Hostname, Username, SessionId, VirtRepos, PhysRepos , Client) Values (?,N'2009-05-28 12:55:47',?,?,N'14904a1e89d35be0',?,?,N'CVSNT 2.5.03 (Scorpio) Build 2382') s elect @@IDENTITY 07:55:50: S -> MSSQL Execute Done 07:55:50: S -> MSSQL Execute all complete now get the Number of Result Columns ... 07:55:52: S -> Call pre-loaded 'audit.dll' 07:55:52: S -> Insert Into HistoryLog (SessionId, Type, Workdir, Revs, Name, BugId, Message) Values (0, 'M',?, '1.7',?,'', ? ) 07:55:52: S -> Bind vtString (SQL Server) 07:55:52: S -> Bind vtString as type SQL_NTS (Null Terminated String) 07:55:52: S -> Bind vtString as SQL_VARCHAR/text C_WCHAR 07:55:52: S -> Bind vtString (SQL Server) 07:55:52: S -> Bind vtString as type SQL_NTS (Null Terminated String) 07:55:52: S -> Bind vtString as SQL_VARCHAR/text C_WCHAR 07:55:52: S -> Bind vtString (SQL Server) 07:55:52: S -> Bind vtString as type SQL_NTS (Null Terminated String) 07:55:52: S -> Bind vtString as SQL_VARCHAR/text C_WCHAR 07:55:52: S -> Insert Into HistoryLog (SessionId, Type, Workdir, Revs, Name, BugId, Message) Values (0, N'M',? ,N'1.7',?,N'', ? ) 07:55:52: S -> MSSQL Execute Done 07:55:52: S -> MSSQL Execute all complete now get the Number of Result Columns ... 07:55:52: S -> Call pre-loaded 'audit.dll' 07:55:52: S -> Insert Into CommitLog (SessionId, Directory, Message, Type, Filename, Tag, BugId, OldRev, NewRe v, Added, Removed, Diff) Values (0, ?, ? ,'M',?,'','','1.6','1.7',0, 1, ? ) 07:55:52: S -> Bind vtString (SQL Server) 07:55:52: S -> Bind vtString as type SQL_NTS (Null Terminated String) 07:55:52: S -> Bind vtString as SQL_VARCHAR/text C_WCHAR 07:55:52: S -> Bind vtString (SQL Server) 07:55:52: S -> Bind vtString as type SQL_NTS (Null Terminated String) 07:55:52: S -> Bind vtString as SQL_VARCHAR/text C_WCHAR 07:55:52: S -> Bind vtString (SQL Server) 07:55:52: S -> Bind vtString as type SQL_NTS (Null Terminated String) 07:55:52: S -> Bind vtString as SQL_VARCHAR/text C_WCHAR 07:55:52: S -> Bind vtString (SQL Server) 07:55:52: S -> Bind vtString as type SQL_NTS (Null Terminated String) 07:55:52: S -> Bind vtString as SQL_VARCHAR/text C_WCHAR 07:55:52: S -> Insert Into CommitLog (SessionId, Directory, Message, Type, Filename, Tag, BugId, OldRev, NewRe v, Added, Removed, Diff) Values (0, ?, ? ,N'M',?,N'',N'',N'1.6',N'1.7',0, 1, ? ) 07:55:52: S -> MSSQL Execute Done 07:55:52: S -> MSSQL Execute all complete now get the Number of Result Columns ... 07:55:52: S -> Call pre-loaded 'audit.dll' 07:55:52: S -> postcommand_proc() 07:55:52: S -> Update SessionLog set EndTime='2009-05-28 12:55:52', FinalReturnCode=0 where Id=0 07:55:52: S -> Update SessionLog set EndTime=N'2009-05-28 12:55:52', FinalReturnCode=0 where Id=0 07:55:52: S -> MSSQL Execute Done audit_trigger error (session end):