BUG: Insert .. Exec Fails Inside a Stored Procedure with Error 702 if the Table Contains a TEXT ColumnID: Q230196
|
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.
Do not put the INSERT .. EXEC statement in a stored procedure when the table being inserted into contains a text column.
Microsoft has confirmed this to be a problem in SQL Server version 6.5.
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