Tag Archives: Script

SQL Recursive CTE example

* Recursive CTE

Posted in Script, SQL, SQL Query | Tagged , , , , , , | Leave a comment

Windows Server storage capacity and usage report using Powershell

Below Scrip generates list of all Drives and mount points configured, thery storage capacity and free space. Following Script to check the storage on a single server; If you want to calculate the storage to be added to maintain certain … Continue reading

Posted in Powershell, Productivity, Uncategorized, Windows Server | Tagged , , , , | Leave a comment

Generate SQL Query for Database Snapshot creation using Powershell

Following PowerShell script generates SQL Query to take a snapshot;

Posted in Powershell, Productivity, SQL, Uncategorized | Tagged , , , , | Leave a comment

Tip – Excel formula to convert Instance Name to Server Name

Below formula will give sub string preceding \

Posted in Script, Uncategorized | Tagged , , , , , | Leave a comment

Powershell script to test Geo-Replication Configuration

Recently we have upgraded and downgraded multiple databases in SQLAzure and as part of that we have deleted and recreated geo-replication on large number of databases. Considering the number of databases and priority we end up performing manual changes. Created … Continue reading

Posted in Azure, Powershell, SQL, Uncategorized | Tagged , , , , | Leave a comment

Powershell script to search specific error on all log files in given servers

I have used this code to find specific activity failure during a critical process which is running across 25 different servers. this script also searches the log files which are created in last 5 days.

Posted in Powershell, Productivity | Tagged , , , , , | Leave a comment

Delete old files using powershell script

Powershell script to delete old backup files

Posted in Powershell, Productivity, Uncategorized | Tagged , , , | Leave a comment