Microsoft KB Archive/199095

= FIX: Running SQL Trace with RPC Calls and sp_OA May Cause Access Violation =

Article ID: 199095

Article Last Modified on 10/7/2005

-

APPLIES TO


 * Microsoft SQL Server 6.5 Standard Edition

-



This article was previously published under Q199095



BUG #: 18437 (SQLBUG_65)



SYMPTOMS
SQL Server may experience an Open Data Services (ODS) exception error and/or exit if an application is making remote procedure calls (RPCs) to stored procedures where the stored procedures are subsequently making calls to the sp_OA* stored procedures (for example, sp_OACreate) while SQL Trace is running. To work around this problem, do either of the following:
 * If you must use RPC calls to SQL Server and you also need to make sp_OA* calls inside stored procedures, limit the use of SQL Trace on your production server.

-or-
 * Instead of making an RPC call to SQL Server to invoke the stored procedure containing the sp_OA* calls, make direct calls to the stored procedure using normal Transact-SQL. If you are using ADO, do not use the AppendParameter method of the ADODB.Command object. For DB-Library applications, call dbcmd instead of dbrpcexec.



RESOLUTION
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next SQL Server service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix should have the following file attributes or later:

  File name       Version

OpenDS60.dll   6.50.462 NOTE: Due to file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.



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



MORE INFORMATION
This behavior is very specific to the scenario described in the SYMPTOMS section of this article. To further clarify this problem, all of the following conditions must be present to cause this behavior:


 * The application must be making RPC calls to SQL Server. RPC calls are special calls to SQL Server that bypass the Transact-SQL parser on the server. From DB-Library, you would use dbrpcexec; ODBC would use the "{call }" syntax; ADO would use the ADODB.Command object and use the CreateParameter to bind parameters to the Command object.
 * The stored procedure being invoked must be making calls to any of the sp_OA* internal stored procedures. Typically, this will be sp_OACreate.
 * SQL Trace must be running on the server while these calls are being made.

Additional query words: COM xp_sqltrace st proc sproc dblib db-lib

Keywords: kbbug kbfix kbqfe KB199095

-

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

© Microsoft Corporation. All rights reserved.