Sethu's blog

April 20, 2012

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

Filed under: debugging — sethusrinivasan @ 12:11 pm

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 a local folder.  Here is the link http://msdn.microsoft.com/en-us/library/bb787181(VS.85).aspx

Copy the following to notepad and name the file as localdumps.reg, You can then import it to Registry. Make sure that you have created a folder %LOCALAPPDATA%\CrashDumps

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]

“DumpCount”=dword:00000100

“DumpType”=dword:00000002

“DumpFolder”=hex(2):25,00,4c,00,4f,00,43,00,41,00,4c,00,41,00,50,00,50,00,44,\   00,41,00,54,00,41,00,25,00,5c,00,43,00,72,00,61,00,73,00,68,00,44,00,75,00,\   6d,00,70,00,73,00,00,00

You can download .reg file from here. Sample .NET application that simulates a Crash is available here

This posting is provided “AS IS” with no warranties, and confers no rights. 

April 13, 2012

SQL 2012 Developer edition for MSDN subscribers

Filed under: Uncategorized — sethusrinivasan @ 11:10 am

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

April 6, 2012

Export the query to excel sheet automatically

Filed under: Uncategorized — sethusrinivasan @ 11:58 am

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:

April 4, 2012

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

Filed under: Uncategorized — sethusrinivasan @ 10:57 am

# 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 }

 

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.