Troubleshooting
Problem
How to configure Windows to dump a user mode dump file when requested by DB2 support.
Symptom
You can be asked to collect a Windows user-mode dump file if there is insufficient DB2 diagnostics created after a DB2 application crashes.
Environment
Microsoft Windows
Resolving The Problem
These instructions enable dumping for ALL applications running on the system including non-DB2 applications. A user mode dump is similar to a corefile/coredump on UNIX/Linux operating systems.
Notes:
There are other alternatives to generating a user mode dump such as running the ADPlus Visual Basic script included with Microsoft's Debugging tools or that use ProcDump from Microsoft Sysinternals. See links for more details.
Refer to link "Unexpected DB2 service termination in Windows" for detailed instructions regarding use of AdPlus included with Windows Debugging Tools.
Configuring Windows (32-bit) XP / 2000 / 2003
1. In the command line, type: drwtsn32, to bring up the Dr. Watson.
2. Make sure the checkboxes are checked:
- Dump Symbol Table
- Dump All Thread Contexts
- Append to Existing Log File
- Visual Notification
- Create Crash Dump File
3. Set the 'Log File Path' and 'Crash Dump' to an appropriate directory. This can be any directory you create.
For example, create a "F:\dump" directory, and set
Log File Path: F:\dump
Crash Dump: F:\dump\user.dmp
4. Click OK.
Note that the crash dumps are a complete dump of your computer virtual memory and can be quite large. Specify a drive, which has enough disk space to store the crashdump file.
5. In the command line, type: "drwtsn32 -i", to set Dr.Watson as the default debugger.
C:\>drwtsn32 –i
Configuring Windows Vista / 7 / 10 / 2008 / 2012 / 2016
1) Create a directory to store the dump files. Ensure everyone can write to the directory. Each time any process/program is abnormally terminated, Windows generates a userdump file in this directory. For example, if five processes crash then there will be five userdump files created.
The size of each userdump file would depend on how much memory is being consumed in memory. Check Windows Task Manager to get a rough estimate. Expect a minimum file size of several hundred megabytes.
mkdir c:\crashdump
2) Start Windows Registry Editor (regedit) via a command Window.
3) Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting
4) Create a new key LocalDumps
5) Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps
6) Create the following values.
DumpCount limits the number of userdump files to 3 to reduce disk space usage. The oldest userdump is deleted once the 3th userdump is created.
Value
|
Type
|
Value
|
Description |
DumpFolder | REG_EXPAND_SZ | c:\crashdump | Location to store crash dumps |
DumpType | REG_DWORD | 2 | 2= Full dump |
DumpCount | REG_DWORD | 3 | The maximum number of dump files in the folder. When the maximum value is exceeded, the oldest dump file in the folder will be replaced with the new dump file. |
For more information on these registry variables see "Collecting User Mode Dumps ..." in Related URL.
Note: These steps will create dumps for all applications.
To enable dump for only db2syscs.exe on step (5) create:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\db2syscs.exe
then continue to step (6) to create all the keys under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\db2syscs.exe instead of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps
Alternate Methods
These methods generate user dumps for only the specified process.
Task Manager: Generate Userdump
An alternate method is:
1) Start Windows Task Manager-->Processes tab
2) Right click on the process name-->Create Dump File
3) A pop-up window appears indicating the dump was successfully created and located in C:\Users\<userid>\AppData\Local\Temp\2\db2sysc.DMP
Note: On v10.x the process is called db2syscs.exe thus dump file will be db2syscs.DMP
Microsoft ADPlus tool
See related link "Unexpected DB2 service termination in Windows" below for instructions on how to use this script included with Microsoft's debugging tools.
How to Collect a Memory Dump Using ADPLUS and DebugDiag
Microsoft Debug Diagnostic Tool
Related Information
[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Operating System \/ Hardware - OS Configuration","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.8;9.7;9.5;9.1;8.2;10.1;7.2;10.5;11.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Was this topic helpful?
Document Information
Modified date:
10 April 2023
UID
swg21569373