sqldiag

Beginning with SQL Server 7.0, Microsoft ships a handy tool called sqldiag.exe, which can be found in the <SQL Server Path>\BINN directory. This command-line utility gathers information about your SQL Server from several sources, and combines the data into one file that you can use to troubleshoot (including sending it to Microsoft Support).

The following information is included in a text file named sqldiag.txt, which is in the <SQL Server Path>\Logs directory:

  • Last five SQL Server error logs

  • Registry information

  • DLL information and versions

  • Results of an sp_configure report

  • Results of sp_who and sp_lock

  • Inventory of all the system extended stored procedures

  • OS, network, and hardware configuration information

  • Last 100 queries run if black box is configured

For optimal use, SQL Server must be running when you execute sqldiag. If SQL Server is not running, some information is skipped. If you are trying this from a Windows 98 workstation, you must use the -U and -P parameters for the user name and password, respectively.

Tip 

It is a good idea to generate one of these reports right after you build your server so you can take a snapshot of the server configuration.




SQL Server 2000 for Experienced DBAs
ppk on JavaScript, 1/e
ISBN: 72227885
EAN: 2147483647
Year: 2005
Pages: 126

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net