This article was previously published under Q277809
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 57213 (SQLBUG_70)
Microsoft SQL Server Books Online states the following concerning the execution of the sp_procoption stored procedure:
Execute permissions default to members of the sysadmin andsetupadmin fixed server roles. Startup procedures must be owned by thedatabase owner in the master database.
This is not the intended behavior. Only logins that are a member of the System Administrators fixed server role should have execute permission on sp_procoption.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.
To reproduce the problem use these steps:
Open the SQL Server Query Analyzer.
Create the stored procedure in the master database:
use mastergocreate procedure test_proc asPRINT "Executed test_proc"go
Add a SQL Server login. The default database for the login is master.
When you execute sp_procoption this error message is returned in the SQL Server Query Analyzer:
Server: Msg 5812, Level 14, State 1, Procedure sp_procoption, Line 254Permission denied. Only members of the sysadmin role can run RECONFIGURE.All 1 matched objects now have their 'startup' setting as 'true'. Updates were required for 1 objects.
Restart SQL Server, and then view the current SQL Server error logs. The following text is displayed, which verifies that the procedure was executed upon startup: