sp_procoption (Transact-SQL)
SQL Server 2012
Sets or clears a stored procedure for automatic execution. A stored procedure that is set to automatic execution runs every time an instance of SQL Server is started.
The following example sets a procedure for automatic execution.
EXEC sp_procoption @ProcName = '<procedure name>'
, @OptionName = ] 'startup'
, @OptionValue = 'on';
The following example stops a procedure from executing automatically.
EXEC sp_procoption @ProcName = '<procedure name>' , @OptionValue = 'off';
