Microsoft KB Archive/299366

= FIX: Calling Remote Stored Procedure Inside Local Stored Procedure While Passing Text Parameter Causes AV =

Article ID: 299366

Article Last Modified on 11/5/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q299366



BUG #:351307 (SHILOH_BUGS)



SYMPTOMS
Calling a remote stored procedure inside a local stored procedure while passing a TEXT parameter may cause an access violation (AV) on the local server.

This problem has been isolated to the following conditions:
 * On the destination server, there is a stored procedure that accepts a TEXT (or NTEXT) parameter.
 * On the source server, there is a local stored procedure that calls the remote stored procedure on the destination server by fully qualified name while passing a TEXT (or NTEXT) parameter.



RESOLUTION
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack



WORKAROUND
Modify the TEXT (or NTEXT) field directly, instead of making stored procedure calls.



STATUS
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.



Steps to Reproduce Behavior
The following steps reproduce the problem on SQL Server 2000 build 8.00.194:  On the source server, create a linked server for the destination server.  Connect to the source server using Query Analyzer and run the following query: use pubs go

CREATE procedure sp_local @ptxtText TEXT as exec destination_servername here.pubs.dbo.sp_remote @ptxtText GO   On the destination server, create a stored procedure as follows: use pubs go

create procedure sp_remote @ptxtTest TEXT as go   Run the following query on the source server: sp_local 'mytest' An access violation occurs on the source server. </ol>

<pre class="fixed_text">--- Short Stack Dump 00000000 Module(sqlservr+FFC00000) 006D6FF9 Module(sqlservr+002D6FF9) (CXVariant::ClearDeep(void)+00000047) 0040A849 Module(sqlservr+0000A849) (CXVariant::Clear(void)+0000000D) 006134D6 Module(sqlservr+002134D6)(CExecParamTbl::ResetTextParams(void)+00000046) 0079726F Module(sqlservr+0039726F) (CRuleCollection::LoadRules(class IMemObj *)+00004B19) ---

Additional query words: AV; Remote Procedure Call

Keywords: kbbug kbfix kbsqlserv2000sp1fix KB299366

-

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

© Microsoft Corporation. All rights reserved.