Run code automatically when SQL Server starts


spacer

Run code automatically when SQL Server starts

By John Sheesley, Special to ZDNet Asia
Thursday, December 11, 2008 11:55 AM


  Here is an overview of the ways to execute SQL stored procedures or SQL Agent jobs on startup.

The ability to run procedures or SQL Agent jobs on startup provides a great tool for database administration.

Running procedures on startup gives the ability to run cleanup routines, maintenance, auditing, business rules, or run a SQL trace.

The SQL Server service
The SQL Server service (MSSQLSERVER) is the Windows service that runs the SQL Server database engine. This service provides the ability to execute stored procedures when the service is first started.

You can specify this startup procedure by using the sp_procoption system stored procedure.

In the following script, I use the code from a previous article where I outlined how to define your own custom trace scripts.

Read more »

Recent Enterprise Servers & Storage TechGuides

 

Taking a look at an iSCSI-based highly available architecture

High availability is an important consideration in any service and becomes more important all the time. Find out more about Westminster College's example.
Thursday, December 04, 2008 01:46 PM
Find more stories in::  Storage

Reviewing SQL Server permissions

Find out the importance of database permissions, and how you can use internal SQL Server system views to easily identify which users have access on your system.
Thursday, November 27, 2008 01:21 PM
Find more stories in::  Servers, Server platforms, Database management, Databases

Defining SQL Server 2008 policies

Learn how you can use SQL Server Management Studio to define your own policies.
Thursday, November 20, 2008 03:29 PM
Find more stories in::  Microsoft Windows, Data Management

spacer

Latest TechGuides

10 roles you need for ITIL configuration management
Classic Windows NT tip: Dump Registry to text files for tracking
Simple hardware approaches to secure laptops
Five HTML oddities that you may not know
Use Excel's DGET function to zero in on information you need

Whitepapers / Case Studies

Green Data Center Storage Part II: Sustained Cost Effectiveness in Transitioning Times
Email Archiving for Business
Video case study
Email Archiving: On-Premise vs. SaaS whitepaper
IDC whitepaper - Using a Hosted Service for Holistic Email Management
Apple stabilizes new Mac notebooks
SSDs: Nothing to fear but the hype
Sony cuts costs, but not brand problems
Sun launches Shanghai-based servers
Broadcom introduces combo 802.11n chip

Blog Central

Emergency excitement online Emergency excitement online
Video game Zero Hour: America's Medic lets responders try out real-time strategies in hazardous virtual environments, with sound effects...Read more »
BCP Confidential - Wednesday, October 29 2008 03:16 PM
A tricky part of convergence A tricky part of convergence
A few weeks ago, I attended a press briefing where a local fast-food company revealed it had signed a contract...Read more »
The Pinoy Post - Wednesday, December 10 2008 11:07 AM

spacer