Technical Article

Shrink DBs - Job Script

I'm posting this job script because it gets used by my scheduler script. It simply enumerates through each database on the server, and then executes a DBCC SHRINKDATABASE. The only wrinkle here is that I have it do a quick check to make sure that certain jobs are not already running.

2002-01-04

1,138 reads

Technical Article

Transaction Logs - Job Script

I've included this job script, because it is used by the scheduler scripts that I've also posted. This job is a little more involved than most may need... It first checks to see if certain jobs are running. Is so, it waits for a while, and then checks again. After that it drops the existing […]

2002-01-04

1,096 reads

Technical Article

Check Jobs Current State

I created this script in an attempt to better automate many different jobs that run each morning, as part of a datawarehouse build. I use it to not only tell me what jobs are currently running (so that I can manage how many I would like to run at a time), but what happened to […]

5 (2)

2002-01-03

1,242 reads

Blogs

Daily Coping 28 Jun 2022

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Creating a Database Audit Specification can create new users & schemas in the background

By

I love database audits. They are simple, easy to use, effective, not overly resource...

Alert Filtering in SQL Monitor

By

SQL Monitor has improved a lot over the last couple of years. We have...

Read the latest Blogs

Forums

Does sp_recompile recompiles referenced objects?

By SQL Guy 1

For example we have a stored procedure SP1 and it selects from a table-valued...

MSX enlist failed for JobServer

By Brandie Tarvin

Question on behalf of a coworker. We recently migrated MSX servers. On a majority...

How to make += in updates.

By Edvard Korsbæk

I am trying to update a field , which is defined as an INT....

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers