The sqldiag utility gathers and stores diagnostic information and the contents of the query history trace (if running.) The output file includes error logs, output from sp_configure and additional version information. If the query history trace was running when the utility was invoked, the trace file will contain the last 100 SQL events and exceptions. sqldiag is intended to expedite and simplify information gathering by Microsoft Product Support Services.
Syntax
sqldiag
[-?] |
[-I instance_name]
[ [-U login_ID] [-P password] | [-E] ]
[-O output_file]
[-X] [-M] [-C]
Arguments
-?
Displays usage information.
-I instance_name
Specifies the instance of Microsoft® SQL Server™ 2000 on the local server on which to connect. Omit the -I option to connect to the default instance on the local server.
-U login_ID
Is the user login ID. Login IDs are case-sensitive.
-P password
Is the password for the specified login_ID. If the -P option is specified at the end of the command prompt specifying password, sqldiag uses the default without password of NULL. Passwords are case-sensitive.
Security Note NULL passwords are not recommended.
-E
Uses a trusted connection instead of requesting a password.
-O output_file
Redirects sqldiag output to the file named output_file. If the -O option is not specified, the output file name defaults to sqldiag.txt. In this case, the trace file names remain unchanged as blackbox.trc and blackbox_01.trc.
If the -O option is specified, sqldiag renames trace files blackbox.trc and blackbox_01.trc based on the name used for output_file (for example, if output_file is specified as MyDiagnostics.txt, the trace files will be renamed to MyDiagnostics.trc and MyDiagnostics_01.trc respectively).
Use of the -O option enables users to store several sqldiag outputs in the same directory.
-X
Excludes error logs.
-M
Performs DBCC stackdump.
-C
Retrieves cluster information.