Sets a stored procedure for auto execution. Auto execution stored procedures are executed every time the server is started.
sp_makestartup procedure_name
where
There is no limit to the number of startup procedures you can have, but be aware that each auto execution procedure consumes one connection. If you need to execute multiple procedures at startup but don't need to execute them in parallel, you can make one procedure the startup procedure and have that procedure call the other procedures. For more information, see the CREATE PROCEDURE statement.
This example makes the update_all_stats procedure an auto execution procedure.
sp_makestartup update_all_stats
Only the system administrator can use this procedure.
master.dbo.sysobjects, master.dbo.syscolumns
CREATE PROCEDURE | sp_unmakestartup |
sp_helpstartup |