[cvsnt] Audit failure when using 3055 client against 2260 server - tracelog.zip (0/1)

Bo Berglund bo.berglund at telia.com
Wed May 28 22:55:52 BST 2008


On Wed, 28 May 2008 15:47:05 -0500, Glen Starrett
<glen.starrett at march-hare.com> wrote:

>Bo Berglund wrote:
>> audit_trigger error (session): [Microsoft][ODBC SQL Server Driver][SQL
>> Server]String or binary data would be truncated.[Microsoft][ODBC SQL
>> Server Driver][SQL Server]The statement has been terminated.
>> Audit trigger initialiasation failed: 
>> cvs server: Pre-command check failed
>
>I'm wondering if WinCVS is tacking on some additional information to the 
>  info that audit is storing in the session table.  It's easy enough to 
>kill the problem -- widen the field or truncate the data you're sending 
>to it.
>
>Offhand I'd say the easiest workaround for your side is to alter the 
>table to be larger column sizes.  The trace doesn't indicate which 
>column is the problem, but if you traced the SQL server you could find 
>out exactly what's going on.

I have now looked at the upgrade_1 and upgrade_2 sql files from build
3055. As far as I can see there are the following changes done from
the original layout:

Upgrade 1:
----------
Create new table 'SchemaVersion' and add a record where Version = 2
Add a column 'Endtime' to table Sessionlog
Rename the existing column 'SessionLog.Date' to 'StartTime'

Upgrade 2:
----------
Delete all records from SchemaVersion
Add record SchemaVersion.Version=3 
Add column Sessionlog.FinalReturnCode

The column sizes in my database are the same as specified by the 3055
create table sql code.

I could excecute the upgrade scripts against my database if it was not
for the fact that an existing column has changed name. This *must*
make the database incompatible to the version of CVSNT I am running
with now because whenever a record is to be stored in SessionLog it
will not be able to get it into the 'Date' column. This is a backwards
incompatible upgrade that I dare not do.

SOLUTION
--------
However, I noted that SessionLog.Client is only nvarchar(64) in the
original structure and is not changed by the upgrades.
When looking at the data in this column I saw that the client
identifier is rather long so I changed the width of that column to
nvarchar(256)

Now the commands entered in WinCvs do not fail anymore! :-)
And here is the contents of the Client column:
CVSNT 2.5.04 (Zen) Build 3055 (Release Candidate 7) (cvsgui active)

Notice that this text is actually 67 chars long, so it did not fit
into the original Audit table SessionLog.Client....

I suggest that the upgrade script changes the width of this column to
128 or 256 to cope with the extra text added from users of the cvsgui
protocol.

HTH

/Bo
(Bo Berglund, developer in Sweden)


More information about the cvsnt mailing list