I write about SQL Server…and occasionally something else.

  • This script will show when the last backup occurred as well as the backup type for each database. This covers all the backup types available and pivots the output into a simple and easily readable format. It will state the…

  • Here is an example function to return free space remaining on a volume with associated details. Updated 27/04/2012 to fix mount points. Usage Examples: Get-VolumeFreeSpace|ft Get-VolumeFreeSpace|Select ComputerName,Name,MountPoint,FreeSpaceGiB|ft Get-VolumeFreeSpace|Where-Object {!$_.SystemVolume}|Select ComputerName,Name,MountPoint,FreeSpaceGiB|ft Get-VolumeFreeSpace “ComputerA”,”ComputerB” |ft

  •   The Dell soap API now returns a HTTP Error 503. The service is unavailable so the code listed below no longer functions. Dell provide an alternative method to retrieve the information via a REST API. Please search for Dell…

  • Given a particular date how do you determine the start date of that week? But more importantly what is the start of the week? The first column returned in the script below will return the start of the week as…

  • Simple example using SMO to get database storage information. You will need SMO installed for this script to work. Note Size relates to the file size on disk, where as space refers to the storage used or available. Usage Examples:…

  • A script to show the log usage on a per session basis, which can be useful when determining the potential impact of a query. It can be good to know for example if a session has generated a lot of…

  • The difference between ISNULL and COALESCE? It is quicker to type ISNULL. Plus COALESCE always takes me a few goes to spell correctly, luckily there is intellisense and I can wait for the color of the text to change. Well…

  • Just to make everyone aware that SQL Relay is back in November this year. These are all day events, and well worth attending. The link you will need is: http://www.sqlrelay.co.uk/register.html The dates are: WEEK 1 Mon 11 Nov Reading Tue 12…

  • Previously we had looked at how to configure alerts to log the messages that we are interested in picking up. In this previous post I very briefly showed how to add logging for messages that were not normally logged such…

  • As a base set of alerts for monitoring SQL Server I tend to use the following out of the box categories, with the obvious exception of syntax errors. This will cover all of the really bad alerts that you never…

Join 900+ subscribers

Stay in the loop with everything you need to know.