TYPEPERF.EXE is a command line tool included with the Windows operating system that writes performance data to the command window or to a file.
To get a list of counters with instances enter the following command:
TYPEPERF -qx "SQLServer:Databases" | FIND "tempdb"
You will see output similar to the following:
\SQLServer:Databases(tempdb)\Data File(s) Size (KB)
\SQLServer:Databases(tempdb)\Log File(s) Size (KB)
...
C:\Documents and Settings\automatingdba>TYPEPERF -q "SQLServer:Databases"
\SQLServer:Databases(*)\Data File(s) Size (KB)
\SQLServer:Databases(*)\Log File(s) Size (KB)
...
TYPEPERF -f CSV -o MyCounters.csv -si 15 -cf MyCounters.txt -sc 60
The above example writes the counter values to MyCounters.csv every 15 seconds. It stops after writing out the counters 60 times (i.e. 15 minutes).
The list of counters in MyCounters.txt is:
\SQLServer:Databases(_Total)\DBCC Logical Scan Bytes/sec
\SQLServer:Databases(tempdb)\Percent Log Used
...
the following link talks about how to load the output into sqlserver to analyze.
http://www.mssqltips.com/tip.asp?tip=2395
To get a list of counters with instances enter the following command:
TYPEPERF -qx "SQLServer:Databases" | FIND "tempdb"
You will see output similar to the following:
\SQLServer:Databases(tempdb)\Data File(s) Size (KB)
\SQLServer:Databases(tempdb)\Log File(s) Size (KB)
...
C:\Documents and Settings\automatingdba>TYPEPERF -q "SQLServer:Databases"
\SQLServer:Databases(*)\Data File(s) Size (KB)
\SQLServer:Databases(*)\Log File(s) Size (KB)
...
TYPEPERF -f CSV -o MyCounters.csv -si 15 -cf MyCounters.txt -sc 60
The above example writes the counter values to MyCounters.csv every 15 seconds. It stops after writing out the counters 60 times (i.e. 15 minutes).
The list of counters in MyCounters.txt is:
\SQLServer:Databases(_Total)\DBCC Logical Scan Bytes/sec
\SQLServer:Databases(tempdb)\Percent Log Used
...
the following link talks about how to load the output into sqlserver to analyze.
http://www.mssqltips.com/tip.asp?tip=2395
Comments
Post a Comment