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,131 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,093 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,236 reads

Blogs

What Agent Jobs are Running??

By

Do you run SQL Agent Jobs in your environment?  Do you know what is...

Unboxing SQL Clone 2020 for a PoC

By

When I got a new machine, I had SQL Clone on my old machine,...

Daily Coping 4 Aug 2020

By

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

Read the latest Blogs

Forums

Extended Events

By Michael L John

I have set up an extended event to capture the queries users may be...

Script logins and all permissions: no longer supported in SSMS generate script?

By Maxer

Okay, maybe I've just gone crazy but I was certain it used to be...

Recursive Select runs slow

By Soleya

Hello, I have a recursive Select that runs ultra slow. My test table has...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers