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,130 reads

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,090 reads

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,232 reads

Blogs

ASF 030: Benni De Jagere interview

By

Introduction Benni De Jagere is a Senior Data Insights Consultant with a strong focus...

Going Dark in SSMS

By

I haven’t been a big fan of dark mode in many tools, but I’ve...

Figuring Out How To Hide Production Data

By

There’s a really simple conundrum that we go through all the time. The best...

Read the latest Blogs

Forums

Query Optimization Level

By Grant Fritchey

Comments posted to this topic are about the item Query Optimization Level

Now Is a Good Time for Choices

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Now Is a Good Time...

Design ideas for hostoric data & trending

By kazim.raza

Hi everyone, I have a use case (below) for which I am considering multiple...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

SQLCMD Output

See possible answers