This article describes how to use the Sqldumper.exe utility to generate a dump file for Watson Error reporting or for debugging tasks that may be performed by Microsoft Product Support Services (PSS).
Sqldumper.exe is included with Microsoft SQL Server 2000 starting with SQL Server 2000 Service Pack 3 (SP3). Sqldumper.exe will generate a dump file on demand for any Microsoft Windows application. For example, Microsoft PSS might ask you to run this program to generate a dump file (a mini-dump file or a full dump file) for debugging an application problem. One example is a computer that is running SQL Server that is not responding to user requests, a "hung" server.
However, you cannot use the Sqldumper.exe utility for general purpose debugging. For additional information about general purpose debugging, visit the following Microsoft Web site:
- Microsoft recommends that you install the fix that is described in the following Microsoft Knowledge Base article before you run the Sqldumper.exe utility:
FIX: The Sqldumper.exe file does not generate a userdump file when it runs against a Windows service
- You must use version 184.108.40.206 or later of the Dbghelp.dll file because it supports the functions that Sqldumper.exe requires. If your computer has the wrong version of Dbghelp.dll, you may receive the following error message:
The procedure entry point MiniDumpWriteDump could not be located in the dynamic link library dbghelp.dllThe correct version of the Dbghelp.dll file is installed as part of the SQL Server 2000 SP3 installation. To make sure that Sqldumper.exe uses the correct version of Dbghelp.dll, run Sqldumper.exe from the correct BINN folder of your SQL Server 2000 SP3 instance.
Note If you have not installed SQL Server 2000 SP3, and you want to run the Sqldumper.exe utility, contact Microsoft Product Support Services to obtain a copy of Dbghelp.dll.
How to obtain a Windows application process identifier
To generate a dump file by using Sqldumper.exe, you must have the process identifier of the Windows application that you want the dump file for. To obtain the process identifier, follow these steps:
- Press CTRL+ALT+DELETE, and then click Task Manager.
- In the Windows Task Manager window, click the Processes tab.
- On the View menu, click Select Columns.
- In the Select Columns dialog box, click to select the PID (Process Identifier) check box, and then click OK.
Make a note of the process identifier of the Windows application that you want.
You can also obtain the process identifier of the SQL Server application that is running on your computer by using the SQL Server error log file. For example, part of the SQL Server error log is similar to the following:
2003-08-25 15:10:27.59 server Microsoft SQL Server 2000 - 8.00.760(Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 1) 2003-08-25 15:10:27.61 server Copyright (C) 1988-2002 Microsoft Corporation.2003-08-25 15:10:27.61 server All rights reserved.2003-08-25 15:10:27.61 server Server Process ID is 3968.
The number after Server Process ID is the process identifier for Sqlservr.exe. In this example, the process identifier for Sqlservr.exe is 3968.
How to run Sqldumper.exe
You must run Sqldumper.exe under the context of the folder where Microsoft SQL Server 2000 installs the Dbghelp.dll file. To do this, follow these steps:
- Start a command prompt.
- Locate the following folder:
Installation Drive:\Program Files\Microsoft SQL Server\MSSQL$instance name\Binn Make sure that the Dbghelp.dll file is also in that folder.
- For a full dump file, run Sqldumper.exe by typing the following command:
..\..\80\Com\Sqldumper.exe ProcessID 0 0x34 0 ..\LOGNote In this command, replace ProcessID with the process identifier of the Windows application that is running for which you want the dump file.
For a mini-dump file, run Sqldumper.exe by typing the following command:
\..\80\com\sqldumper.exe ProcessID 0 0x24 0 ..\LOGIf you have an instance of SQL Server 2000 SP4 installed on this server, you can also generate a filtered dump file of the SQL Server process. For a filtered dump file, run Sqldumper.exe by typing the following command:
..\..\80\Com\Sqldumper.exe ProcessID 0 0x804 0 ..\LOGNote In this command, replace ProcessID with the process identifier of the Windows application that is running for which you want the dump file.
- If you want to run Sqldumper.exe from any other location, you must set the Path environment variable to include the installation location of the Dbghelp.dll file.
- When you run Sqldumper.exe from the command prompt to capture a filtered dump file of a SQL Server process that is running as a service, the following must be true:
- You must be logged in to the same Windows session as the one in which the SQL Server service is running. Therefore, you must either be logged on to the computer itself or, if you are connected through a Terminal Server environment, be logged in to a console session. For example, run mstsc.exe /console to run Terminal Server in console mode.
- You must be logged in with a user account that has full administrative privileges. We recommend that you log in with the same user account under which the SQL Server service is running. You must do this to prevent error messages that are similar to the following when you attempt to generate a filtered dump file of the SQL Server process:
Open Process Error 0x5
If Sqldumper.exe runs successfully, a dump file is created in the current folder. The dump file that is generated has a file name pattern that is similar to the following:
In this pattern, nnnn
is an increasing number that is determined based on other files with a similar file name in the current folder. If you already have files in the current folder with the file names in the specified pattern, you may have to check the date and the time when the file was created to identify the new file.
If Sqldumper.exe does not run successfully, you may receive an error on the console. For example, if a ProcessId
that is specified does not exist, you will receive the following error message:
OpenProcess failed 0x57 - The parameter is incorrect.
When you are working on a particular support incident, your support professional may request that you enable various trace flags that alter the flags that SQL Server passes to Sqldumper.exe in the context of an exception or an assertion. These trace flags are in the range from 254x
, for example, trace flag 2542. These trace flags let the support professional request certain dump types.