Pages

Saturday, June 1, 2013

How to mark a stored procedure for automatic startup execution?

Execute the following Microsoft SQL Server T-SQL script to demonstrate the configuration of the stored procedure "ServerInitSprocs" for startup execution. The sp_procoption system stored procedure marks the application stored procedure for automatic execution when SQL Server starts or rebooted. Only objects in the master database owned by dbo can have the startup execution and the option is restricted to sprocs that have no parameters.
USE master
EXEC sp_procoption 'ServerInitSprocs', 'startup', 'true'
GO

No comments:

Post a Comment