Is the name of the procedure for which to set or view an option. procedure is nvarchar(776), with no default.
[@OptionName =] 'option'
Is the name of the option to set. The only value for option is startup, which sets stored procedure for autoexecution. A stored procedure that is set to autoexection runs every time Microsoft® SQL Server™ is started.
[@OptionValue =] 'value'
Is whether to set the option on (true or on) or off (false or off). value is varchar(12), with no default.
Return Code Values
0 (success) or error number (failure)
Execute permissions default to members of the sysadmin fixed server roles. Startup procedures must be owned by the database owner in the master database.
Pinion is corrected.
On the Schedule Tab and below the "Schedule Type", checked the "Start automatically when SQL Server Agent starts" . However, make sure in the SQL Server Agent's Properties, set the "Auto restart SQL Server if it stops unexpectedly". Nevertheless, sometime I experienced the SQL Agent didn't even started after a reboot, so if you're absolutedly wanted to run something after each reboot, write a batch script to execute a query IMHO.