On each SQL Server database startup, I need to execute a procedure in my database. It's a very basicscenario in all places.
For this, SQL Server is providing an option of using a system stored procedure sp_procoption
create procedure Murli_Insert_Procedure
insert into tblMurli(id,val) values (5,'F')
EXEC sp_procoption @ProcName = 'Murli_Insert_Procedure',@OptionName = 'startup',@OptionValue = 'true'
Now, your stored procedure is set as a initial startup which will execute on DB start.