Category: Tips

SQL Tip: Get Log Space with DBCC SQLPERF(LOGSPACE)

Every so often I’m reminded that the “basics” aren’t really basics. None of us go to take “How to be a Microsoft SQL Server DBA 101” before our first gig. So for your perusal, use and enjoyment: here is the easiest way to get a report on log space usage: DBCC SQLPERF(LOGSPACE); Go ahead, type it […]

Quick Tip: Navigating to a UNC within SQLPS

I’ve been getting a funky error with a new Powershell script, running as a SQL Agent job step. Let’s pretend for the moment that the script is simply “cd \\backup\SQL; dir *.bak” The error information returned by PowerShell is: ‘Cannot find path ‘\\backup\SQL’ because it does not exist. The script I have runs fine manually in Powershell, […]

Quick Tip: Where’s my SQL Server Job History?

Here’s a quick mystery. You have a SQL Server with several jobs that appear to be running properly and on schedule, but many of them show no history. You look around, and there doesn’t seem to be a nightly job history purge (you’re looking for something with “sp_purge_jobhistory“).  So where is the record of these […]