Microsoft KB Archive/272688

= Sqldiag utility defaults to SQL 7.0 path if SQL Server 7.0 is the default instance =

Article ID: 272688

Article Last Modified on 12/21/2004

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q272688



SYMPTOMS
If you run the sqldiag utility on a computer that has Microsoft SQL Server 7.0 installed as the default instance and a named instance of SQL Server 2000, the sqldiag utility might use the SQL Server 7.0 path for collecting data and creating the output file.

For example, on a computer that has SQL Server 7.0 installed on D:\Mssql7 and a named instance of SQL Server 2000 installed on E:\Program Files\Microsoft SQL Server\MSSQL$Server1, running the following sqldiag command from a command prompt: E:\Program Files\Microsoft SQL Server\MSSQL$SERVER1\Binn\sqldiag.exe results in: Getting last 100 queries Getting file d:\MSSQL7\log\ERRORLOG Getting file d:\MSSQL7\log\ERRORLOG.1 Getting file d:\MSSQL7\log\ERRORLOG.2 Getting file d:\MSSQL7\log\ERRORLOG.3 Getting file d:\MSSQL7\log\ERRORLOG.4 Getting file d:\MSSQL7\log\ERRORLOG.5 Getting file d:\MSSQL7\log\ERRORLOG.6 Getting registry information Getting library version information Getting configuration information Getting current user information Getting lock information Getting database information Getting product information Getting extended procedures information Getting process information Getting input buffers Getting head blockers Getting machine information. Please wait, this may take a few minutes Last 100 Queries Stored in d:\MSSQL7\log\SQLdiag.trc Data Stored in d:\MSSQL7\log\SQLdiag.txt



WORKAROUND
A new parameter, -I, has been added to the sqldiag utility in SQL Server 2000 to ensure that SQL Server 2000 is multi-instance aware. For example, the following command reports information about the SERVER1 SQL Server 2000 named instance: E:\Program Files\Microsoft SQL Server\MSSQL$SERVER1\Binn\sqldiag.exe -ISERVER1 NOTE: Be sure to change to the Binn directory beneath the instance name or it continues to output the sqldiag for the default instance.