Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to be able to run maintenance scripts against my SQL server to expire records and generally clean up the database. Is this best accomplished with some sort of trigger or something within the database itself? I'd like to run the script daily if possible. How can I do this, exactly. I have a feeling it is pretty easy.

share|improve this question

migrated from Jun 2 '11 at 16:57

This question came from our site for professional and enthusiast programmers.

You'll want to create a SQL Server job.

share|improve this answer
I do not have a "SQL Server Agent" node in my Object Explorer tree. – Jordan Jun 2 '11 at 14:13
You probably have the Express version of Management Studio. – daemon_x Jun 2 '11 at 14:16
On this site should be some free tool for this (SQL Scheduler), but the site seems dead. – daemon_x Jun 2 '11 at 14:28
@daemon_x, I do not. – Jordan Jun 2 '11 at 15:14
it came down to an issue of rights. My DB Admin has the server locked down. I have to ask for permission to do anything. I thought it might still show up, but I guess not. – Jordan Jun 2 '11 at 15:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.