Identifying compressed tables on Microsoft SQL Server databases

I was recently attempting to restore a database created on Microsoft SQL Server Enterprise Edition to an instance running Microsoft SQL Server Standard Edition, when the following error was reported on invoking the restore of the database. Restore failed for Server ‘<SQL Server>’. (Microsoft.SqlServer.SmoExtended) ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) Database … More Identifying compressed tables on Microsoft SQL Server databases

Perform Analysis Services database backups using Powershell

I was recently looking into performing SQL Server Analysis Services database backups using Powershell within an automated task, with the following requirements:  Perform a backup of all databases for running instances of Analysis Services. If the target location does not exist, create the directory. Firstly we need to load the Microsoft SQL Server Analysis Services … More Perform Analysis Services database backups using Powershell

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

Preparing a virtual machine template with Microsoft SQL Server 2012

A recent requirement was to create a template within VMware to deploy a configured virtual machine with a named Database Engine instance of SQL Server 2012 installed. Previous versions of SQL Server did not allow for a clean sysprep image, in SQL Server 2012 this has changed with the introduction of the concept image preparation … More Preparing a virtual machine template with Microsoft SQL Server 2012

Delete multiple databases in SQL service using a filter

Below is a query to delete multiple databases where the database name matches the string specified: Replace the <insert database name string> with the database name filter. use master go declare @dbnames nvarchar(max) declare @statement nvarchar(max) set @dbnames = ” set @statement = ” select @dbnames = @dbnames + ‘,[‘ + name + ‘]’ from … More Delete multiple databases in SQL service using a filter