Autostart Procedures

A SQL Server administrator can create procedures called autostart stored procedures, which are normal stored procedures that are flagged to be executed automatically when SQL Server starts. Autostart procedures are useful to perform housekeeping type tasks or start up a background process when SQL Server starts. Some possible uses for autostart procedures include the following:

  • Automatically setting permissions in tempdb.

  • Creating a global temporary table and keeping the procedure in an indefinite WAITFOR loop to keep the global temp table permanently available.

  • Enabling “Black Box” recording for SQL Profiler (for more information on “black box” trace files, see Chapter 7.

  • Automatically starting other external processes on the ...

Get Microsoft® SQL Server™ 2000 Unleashed, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.