Microsoft KB Archive/197242

= FIX: Logging Large Error Messages May Generate Access Violation =

Article ID: 197242

Article Last Modified on 3/14/2006

-

APPLIES TO


 * Microsoft SQL Server 6.5 Standard Edition

-



This article was previously published under Q197242



BUG #: 16775 (SQLBUG_65)



SYMPTOMS
When performing a database or transaction log dump, the SQL Server process attempts to log the action in the error log. If the length of the combined message exceeds the maximum error message size, the SQL Server will fail to log the message and may encounter a handled access violation (AV). Note that to exceed the message length, seven stripe dump devices with 255-byte names are required.



CAUSE
Large error messages exceed the internal message buffer, leading to unexpected behavior.



WORKAROUND
To work around this problem, reduce the size of the message to be logged. To do this, you can break the error message into smaller sections using the state to signify each relevant piece, as in the following example: raiserror("Part 1", 12, 1) with log raiserror("Part 2", 12, 2) with log raiserror("Part 3", 12, 3) with log go This places the following in the SQL Server error log:   1998-10-19 08:15:57.74 spid7    Error: 50000, Severity: 12, State: 1 1998-10-19 08:15:57.74 spid7   Part 1. 1998-10-19 08:15:57.82 spid7   Error: 50000, Severity: 12, State: 2 1998-10-19 08:15:57.82 spid7   Part 2. 1998-10-19 08:15:57.82 spid7   Error: 50000, Severity: 12, State: 3 1998-10-19 08:15:57.82 spid7   Part 3. NOTE: In versions of SQL Server earlier than SQL Server 6.5 Service Pack 5, the length restriction was 512 bytes. SQL Server 6.5 Service Pack 5 extends the allowable length to 1,024 bytes.



STATUS
Microsoft has confirmed this to be a problem in SQL Server 6.5. This problem has been corrected in Service Pack 5a for Microsoft SQL Server 6.5.For more information, click the following article number to view the article in the Microsoft Knowledge Base:

197177 INF: How to Obtain SQL Server 6.5 Service Pack 5a

For more information, contact your primary support provider.

Additional query words: prodsqlsp sp5errorlog

Keywords: kbbug kbfix KB197242

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.