BUG: Insert .. Exec Fails Inside a Stored Procedure with Error 702 if the Table Contains a TEXT Column

ID: Q230196


The information in this article applies to:

BUG #: 18715 (SQLBUG_65)

SYMPTOMS

A stored procedure that performs an:


INSERT INTO <table_name> EXEC (...) 
on a table that contains a text column will fail with the following error:
Msg 702, Level 20, State 1
Memory request for 4116 bytes exceeds the size of single page of 2044 bytes.
The SQL Server is terminating this process.


WORKAROUND

Do not put the INSERT .. EXEC statement in a stored procedure when the table being inserted into contains a text column.


STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5.


MORE INFORMATION

The following script demonstrates the problem:


create table text_table
(col1 text)
go

create proc load_data
as
insert into text_table exec("select 'go'")
go

exec load_data
go 
The following error occurs:
Msg 702, Level 20, State 1
Memory request for 4116 bytes exceeds the size of single page of 2044 bytes.
The SQL Server is terminating this process.

Additional query words:


Keywords          : kbSQLServ650bug 
Version           : winnt:6.5
Platform          : winnt 
Issue type        : kbbug 

Last Reviewed: June 1, 1999