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



The information in this article applies to:

  • Microsoft SQL Server 6.5

This article was previously published under Q230196
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 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.

Modification Type:MajorLast Reviewed:10/3/2003
Keywords:kbBug kbpending KB230196