Microsoft KB Archive/303666

= BUG: SP_Processmail @set_user Parameter Defaults to Guest Instead of the Security Context of the Current User =

Article ID: 303666

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q303666



BUG #: 354773 (SHILOH_BUGS)



SYMPTOMS
In the sp_processmail stored procedure, the value for the @set_user parameter incorrectly defaults to &quot;Guest&quot; instead of the security context of the user that is currently executing the query.

The sp_processmail topic in SQL Server 2000 Books Online states the following about the sp_processmail parameter [@set_user =] 'user':

Is the security context in which the query should be run. user is sysname. If user is not specified, the security context defaults to that of the user executing xp_sendmail.

However, the output of sp_helptext @objname = 'sp_processmail' reveals the following: create procedure sp_processmail @subject varchar(255)=NULL, @filetype varchar(3)='txt', @separator varchar(3)='tab', @set_user varchar(132)='guest', @dbuse varchar(132)='master' as ... If a user database does not have the Guest account enabled and you execute the sp_processmail stored procedure without explicitly specifying the @set_user option, you may see the following error message:

ODBC error 916 (08004) Server user 'guest' is not a valid user in database 'Database_name'.



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

Keywords: kbbug kbpending KB303666

-

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

© Microsoft Corporation. All rights reserved.