Blog Archives

Gather last 10 Error & critical events from all Windows Event Logs


Windows PowerShell 3.0 cmdlet: get-winevent -FilterXPath “*[System[(Level=1 or Level=2)]]” -MaxEvents 10

Posted in Uncategorized

Complete SSMS is available for free in SQL 2012 SP1


In SQL 2012 SP1, Full SSMS is available as a free download. You can download SSMS (SQL 2012 SP1) from http://www.microsoft.com/en-us/download/details.aspx?id=29062    

Posted in Uncategorized

Multi-server results options to merge results


You could set the Multi Server results Options Merge Results = “False” and rerun the same query. Now you will see multiple result sets. This could help you isolate the issue why the result schema returned by specific server is

Posted in Uncategorized

2012 in review


The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog. Here’s an excerpt: 600 people reached the top of Mt. Everest in 2012. This blog got about 9,500 views in 2012. If every person who reached the

Posted in Uncategorized

SQL 2012 Developer edition for MSDN subscribers


You can download  SQL 2012 Developer edition if you are a MSDN subscriber https://msdn.microsoft.com/en-us/subscriptions/securedownloads/hh442898#searchTerm=&ProductFamilyId=461&Languages=en&PageSize=50&PageIndex=0

Posted in Uncategorized

Export the query to excel sheet automatically


You can use powershell to export query results to a Excel file. You can download script from QueryResultsToExcel.ps1 running the powershell script: View Excel file:  

Posted in Uncategorized

Run multiple SQL script files using Invoke-SqlCmd ( SQL Powershell)


# Right click on Server in Object Explorer ( SQL Management Studio) # Select Start Powershell, In Powershell  window, type in following command. replace c:\sqlscripts with  your own folder dir C:\sqlscripts\*.sql | foreach-object { invoke-sqlcmd -InputFile $_.FullName }  

Posted in Uncategorized