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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.