| How to mark a stored procedure for automatic startup execution? |
|
Execute the following
Microsoft SQL Server T-SQL script to demonstrate the configuration of the stored procedure "ServerInitSprocs" for startup execution. The sp_procoption system stored procedure marks the application stored procedure for automatic execution when SQL Server starts or rebooted. Only objects in the master database owned by dbo can have the startup execution and the option is restricted to sprocs that have no parameters.
USE master
EXEC sp_procoption 'ServerInitSprocs', 'startup', 'true'
GO
|
| |
| SQLUSA.com
Home Page |
|
|
SQL Server Training at www.sqlusa.com.
Microsoft SQL Server 2012 Training Videos at www.sqlusa.com.
SQL Server 2008 Video Training at www.sqlusa.com.
SQL Server 2005 Training Videos at www.sqlusa.com.
|
|
|
FREE SS SQL / BI OLAP Short Videos on YOUTUBE.com |
|
Search SQLUSA FREE SQL Server Articles & FREE T-SQL Scripts |
Copyright 2005-2012, SMI Corp. All Rights Reserved.
SQL Server 2012 is a program product of Microsoft Corporation. SQL Server 2008 is a program product of Microsoft Corporation. SQL Server 2005 is a program product of Microsoft Corporation. SQL Server 2000 is a program product of Microsoft Corporation. |