Automating stored procedure execution
The sp_procoption system stored procedure can be used to mark the user stored procedure for automatic execution when the SQL Server starts. Only objects in the master database owned by dbo can have the startup setting changed and this option is restricted to objects that have no parameters.
USE master
EXEC sp_procoption 'indRebuild', 'startup', 'true'
USE master
EXEC sp_procoption 'indRebuild', 'startup', 'true'
Comments
Post a Comment