BUG: Dynamic Execution with Long Comments May Fail with AV

Last reviewed: April 15, 1997
Article ID: Q166916
The information in this article applies to:
  • Microsoft SQL Server, version 6.0
BUG #: 15706

SYMPTOMS

Dynamic execution of a Transact-SQL command with comments from a stored procedure may fail with an access violation (AV). You will receive the following error message at the client:

   language_exec: Process # generated access violation;
   SQL Server is terminating this process
   DB-Library Process Dead - Connection Broken

You will find the following error message in the error log on the server, followed by the stack dump information:

   Error : 0, Severity: 19, State: 0
   language_exec: Process 11 generated access violation;
   SQL Server is terminating this process

WORKAROUND

To work around this problem, either move the comments around or shorten the comments.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The following two sample scripts demonstrate the problem:

   CREATE PROCEDURE sp_updateAuthors
   AS
   EXEC("
   UPDATE authors
   SET n.au_fname = o.au_fname,
      n.au_lname = o.au_lname,
      n.au_id = o.au_id,
      n.phone = o.phone,
      n.address = o.address,
      n.city = o.city,
      n.state = o.state
   FROM authors o, authors n
   /*12345678901234567890123456789012345678901234567890
     12345678901234567890123456789012345678901234567890
     12345678901234567890123456789012345678901234567890
     12345678901234567890123456789012345678901234567890
     12345678901234567890*/
   ")
   GO

   CREATE PROCEDURE sp_selectAuthors
   AS
   EXEC("
   SELECT *
   FROM authors a
   WHERE a.au_id IS NOT NULL and
         a.au_fname IS NOT NULL and
         a.au_lname IS NOT NULL and
         a.au_id IS NOT NULL and
         a.phone IS NOT NULL and
         a.address IS NOT NULL and
         a.city IS NOT NULL and
         a.state IS NOT NULL
   /*12345678901234567890123456789012345678901234567890
     12345678901234567890123456789012345678901234567890
     1234567890123456789012345678901234567890123456
   */
   ")
   GO
 

	
	


Keywords : kbbug6.00 kbusage SSrvStProc SSrvTran_SQL
Version : 6.0
Platform : WINDOWS
Issue type : kbbug
Resolution Type : kbpending


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 15, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.