Archive for the ‘Scripts’ Category

SQL Server health check using PowerShell and T-SQL   15 comments

I am back with another interesting blog which hopefully the production DBAs would find more useful. We often have the need to capture aggregated data related to SQL Server health which can not only be captured quickly but also be able to customize as per the requirements.

We have many tools available to capture the performance data but it mostly has some data lag and does not tell us what’s currently running on the system.

Since last few days, I have been working on a script based solution which helps us to perform quick health check of our production instance to resolve any production issue with this blog, I intend to share the solution as I have found it quite useful Read the rest of this entry »

Powershell script to manipulate SQL Server backup files   Leave a comment


I use Ola Hallengren’s famous backup solution to back up my SQL Server databases. The destination for full backups is a directory on local disk; let’s say D:\SQLBackup\

If you are familiar with Ola’s backup scripts, you know the full path for backup file looks something like:


where InstanceName is a placeholder for the name of the SQL server instance, similarly, DatabaseName is for the Database Name. Read the rest of this entry »