Databases Reference
In-Depth Information
Note that service registration is done using the Log On As account as Local System . The major-
ity of environments in which you will be using SQLdiag as a service will likely not have SQL Server
sysadmin privileges granted to the Local System account. Therefore, after registering the utility as
a service, you will need to change the service account to an account that has Administrator rights
on the Windows machine and sysadmin privileges on the SQL Server instance(s) to which the service
will connect.
WARNING If you run the service using a user account that is not part of the
Windows Administrator group or the sysadmin role of SQL Server without
the / G switch, you will get the following message in the Windows Application
Event Log:
Warning: User SYSTEM is not a member of the sysadmin role on < SQL
Server instance name > . Diagnostics for < SQL Server instance name >
will not be collected
The next decision you need to make is which parameters you want to specify for the service. While
registering the service, you can provide parameters as appropriate. In the following example,
SQLdiag is being registered as a service:
'C:\Program Files\Microsoft SQL Server\110\Tools\Binn\sqldiag.exe' /R /I
C:\SQLDIAG_Data\SQLDIAG_Custom.XML /O 'C:\SQLDIAG_Data'
A successful service registration reports the message “SQLDIAG Service installed. Exiting.” Note
that in the above command, we needed to specify the path of the coni guration i le and the output
folder, as well as to ensure that the right set of coni guration options are used and the diagnostic
data collected is captured in the correct folder.
WARNING The aforementioned success message is reported if you have mul-
tiple versions of SQLdiag available on the machine even if the SQL Server 2012
SQLdiag was not used for the service registration. This happens because your
environment path variable points to the path of an older version of SQLdiag
from another SQL Server 2005, 2008, or 2008 R2 installation, before the SQL
Server 2012 path was added to the environment variable. Once you start the
SQLdiag service, the following error will be reported in the SQLdiag log as well
as in the Windows Application Event Log:
SQLDIAG . Function result: 87. Message: The parameter is incorrect.
SQLDIAG Invalid SQL Server version specified. SQL Server version
11 is not supported by this version of the collector
Search WWH ::




Custom Search