Powershell script to delete SQL server databases matching a filter

I previously shared a SQL server script to bulk delete all SQL server databases which matched a search filter (http://tinyurl.com/oucvxfs), I have recently written a powershell script to perform the same process and to remove the database backup history. Firstly, we will need to specify the parameters required to run the script. Param ([Parameter(Mandatory=$true)][string] $ServerInstance, … More Powershell script to delete SQL server databases matching a filter

Monitor the status of SQL Server Agent jobs with Nagios XI

I am looking into monitoring the status of  SQL Server Agent jobs and reporting them with Nagios with the following requirements For each step report the ‘run_status’. Provide date arithmetic to determine a time span for when the step was last run in days. Return a status of Critical if the run_status is  reported as … More Monitor the status of SQL Server Agent jobs with Nagios XI

Checking to see if CLR Integration is enabled for SQL Server

In order to check if command language runtime (CLR) integration feature is enabled within SQL Server, run the following query agaisnt the master database: SELECT * FROM sys.configurations WHERE name = ‘clr enabled’ If CLR is enabled the value returned will be ‘1’, as displayed in the ‘value’ row. By default this feature is turned … More Checking to see if CLR Integration is enabled for SQL Server