Yearly Archives: 2012

2012 in review

The 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

Collecting User mode dumps in even if Windows Error reporting is disabled

At times mini dumps may not be sufficient to debug a specific issue. We may need a full process dump to further investigate the problem. came across a MSDN article that explains how to enable collecting user mode dumps  to

Posted in debugging

SQL 2012 Developer edition for MSDN subscribers

You can download  SQL 2012 Developer edition if you are a MSDN subscriber

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

Execute multiple scripts at Once

You can use SQL Powershell’s invoke-sqlcmd to run multiple sql script files at once. Related thread:

Posted in Uncategorized

Index rebuild on large database – SQL Agent Powershell job

Index rebuild on a large database could take longer time. One of our customer was looking for a solution to rebuild index one by one  when index  fragmentation is greater than 30%.  Related  newsgroup thread: In this blog post, I have

Posted in DB Management, Powershell, SQL Agent, SQL Power shell, SQL Server