Tuesday, November 27, 2012

How To Run A Stored Procedure Automatically When SQL Server Start-Up

Execute a stored procedure on SQL Server Start-up

One of the most useful future in SQL Server is to run a stored procedure at start-up of the server. Here is the simple steps to run a stored procedure at start up of the server. You must remember that yours stored procedure must be reside in the master database and the owner of the Stored Procedure must be a DBO.

Here is the simple steps to run the stored procedure when sql server starts, Please change your start up stored procedure name with "Your_Stored_Procedure"

USE master;
GO

EXEC sp_configure 'show advanced option', '1';
RECONFIGURE 
GO

EXEC sp_configure 'scan for startup procs', '1';
RECONFIGURE 
GO

exec sp_procoption N'Your_Stored_Procedure', 'Startup', 'ON'
GO

How to run a stored procedure at SQL Server start-up. Automatic Execution of Stored Procedures. Execute a stored procedure on SQLServer Startup. Automatically Running Stored Procedures at SQL Server Startup. How to run a stored procedure at SQL Server start-up. Run a Stored Procedure when SQL Server starts. Startup Stored Procedures in SQL Server 2008 R2. Startup Stored Procedures in SQL Server 2012. Execute Stored Procedure when SQL Server starts. How to schedule a stored procedure.

0 comments:

Post a Comment