To get the job done, SQL Server has the possibility to execute a stored procedure at it's startup.
For this you will need to execute:
1: sp_procoption @ProcName = 'stored procedure name',
2: @OptionName = 'startup',
3: @OptionValue = 'on'
4:
To turn it off again:
1: sp_procoption @ProcName = 'stored procedure name',
2: @OptionName = 'startup',
3: @OptionValue = 'off'
4:
To see which procedures will be executed at startup:
1: SELECT Name
2: FROM sysobjects
3: WHERE objectproperty(id, 'ExecIsStartup' ) = 1
4:
Have fun
J.