Microsoft KB Archive/295939

= BUG: sp_OAMethod May Cause Access Violation When @@servername Is NULL =

Article ID: 295939

Article Last Modified on 2/11/2003

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q295939



BUG#: 56309 (SQLBUG_70)



SYMPTOMS
When @@servername returns NULL and is passed as a parameter to the sp_OAMethod stored procedure, an access violation (AV) may occur.

The following can be seen in the errorlog for SQL Server 7.0 SP3: Short Stack Dump 0x410766ed Module(opends60+166ed) (srv_rpcp::FCopyFromRpcParam+19f) 0x41076313 Module(opends60+16313) (int_setRPC+77) 0x005fcec5 Module(sqlservr+1fcec5) (CParamExchange::FillSrvProc+10e) 0x00601e36 Module(sqlservr+201e36) (CXProc::Execute+e6) 0x005349d8 Module(sqlservr+1349d8) (CSQLSource::Execute+2ab) 0x0046225f Module(sqlservr+6225f) (CStmtExec::XretLocalExec+127) 0x0046211e Module(sqlservr+6211e) (CStmtExec::XretExecute+253) 0x0040f487 Module(sqlservr+f487) (CMsqlExecContext::ExecuteStmts+11b) 0x0040ef35 Module(sqlservr+ef35) (CMsqlExecContext::Execute+16b)



CAUSE
The sp_OAMethod stored procedure does not handle NULL values properly.



WORKAROUND
Run the sp_addserver stored procedure to add the server name.



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

Additional query words: servername, AV

Keywords: kbbug kbpending KB295939

-

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

© Microsoft Corporation. All rights reserved.