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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access