System Error Detected: Database error - SQLEXECDirect failed

Viewed 0

Hi,

We're currently using PA File Signt v5.3.0 Build 192 and we frequently get this error. Is there something that can be done to resolve this?

SQLExecDirect failed with [[ODBC Error: state=22001, nativeErr=8152, err=[Microsoft][SQL Server Native Client 10.0][SQL Server]String or binary data would be truncated.]

[ODBC Error: state=01000, nativeErr=3621, err=[Microsoft][SQL Server Native Client 10.0][SQL Server]The statement has been terminated.]
] for SQL=[SET NOCOUNT ON;
BEGIN TRAN;
INSERT INTO FileSightFindings (EventTime, FileName, UserID, ProgramID, Change, OwningComputerID, BytesRead, BytesWritten, ReadFullFile, bDirectory, SourceIPID, SourceNameID) VALUES ({ts N'2014-06-25 22:02:04'}, N'D:long filepathfilename.pdf
-to->
D:[Trimmed]]

Thanks

3 Answers

Hi Comp1,

This error message doesn't look like the complete error message or at least I there should be more information in the log file. Will you please zip up and send us the services log file? Please send it to support@poweradmin.com . Please also include a link to this post.

Thanks
Quinn

Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer.

Hi Comp1,

The database error is due to the length of a file name being recorded in the database and the column FileName set to handle 500 characters. To allow longer names you will need to increase the size of the column in the database to a size that you believe will allow your file name's length. I can't tell from the logs what a good column size would be for your database, so you will need to think about what would work for your company. Remember that the increase of this field will also increase the amount of space the database will need.

You can run this command on the database and it will increase the column to the size you need:
ALTER TABLE FileSightFindings ALTER COLUMN FileName nvarchar([ENTER THE SZIE YOU NEED]);

Here is an example if you want to increase to 600 characters:
ALTER TABLE FileSightFindings ALTER COLUMN FileName nvarchar(600);

Thanks
Quinn

Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer.

Thanks for that. Query ran successfully and hopefully the error no longer comes back after the increase in size

Related