home *** CD-ROM | disk | FTP | other *** search
Wrap
SET NOCOUNT ON GO --Drop static table DROP TABLE dbmsys_perf_data DROP TABLE dbmsys_perf_descr GO -- Create the stats table CREATE TABLE dbmsys_perf_descr (counter_id TINYINT PRIMARY KEY NONCLUSTERED NOT NULL, counter_name VARCHAR(33) NOT NULL, description VARCHAR(255), log_this bit) GO CREATE TABLE dbmsys_perf_data (counter_id TINYINT NOT NULL REFERENCES dbmsys_perf_descr(counter_id), stats_value REAL NOT NULL, capture_time SMALLDATETIME NOT NULL, CONSTRAINT dbm_perf_data_fk PRIMARY KEY (counter_id, capture_time)) GO -- Populate dbmsys_perf_descr INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(1, 'Log Flush Requests', 'Number of requests to flush the log to disk.', 1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(2,'Log Logical Page IO','Logical page I/O for transaction log.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(3,'Log Physical IO','Physical I/O for transaction log.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(4,'Log Flush Average','Log flush requests per physical write.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(5,'Log Logical IO Average','Logical pages written per physical write for transaction log.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(6,'Batch Writes','The number of times multiple pages were written to disk in a batch.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(7,'Batch Average Size','The average number of pages written in a batch.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(8,'Batch Max Size','The maximum number of simultaneous outstanding physical I/Os.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(9,'Page Reads','The number of 2K pages read from disk (physical reads).',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(10,'Reads Outstanding','The number of read requests issued to the operating system that have not been completed.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(11,'Writes Outstanding','The number of write requests issued to the operating system that have not completed.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(12,'Transactions','The number of Transact-SQL batches executed. This value is useful in computing ratios involving log write numbers.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(13,'Transactions/Log Write','The number of transaction records written to disk during each physical log write.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(14,'Cache Hit Ratio','The percentage of times a data page was found in the cache.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(15,'Cache Flushes','The number of times a page needed to be flushed from cache to make room for another page.',0) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(16,'Free Page Scan (Avg)','The average number of buffer pages that had to be scanned in order to find a free page.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(17,'Free Page Scan (Max)','The maximum number of buffer pages that had to be scanned in order to find a free page.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(18,'Min Free Buffers','The lazy writer will attempt to maintain at least this number of buffers on the free list.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(19,'Cache Size','The total number of pages in the cache.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(20,'Free Buffers','The number of buffers currently on the free list.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(21,'Network Reads','The total number of reads from the network.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(22,'Network Writes','The total number of writes to the network.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(23,'Command Queue Length','The number of client requests waiting to be handled by the SQL Server worker threads.',0) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(24,'Max Command Queue Length','The maximum number of client requests waiting to be handled by the SQL Server worker threads.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(25,'Worker Threads','The current number of worker threads servicing the command queue.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(26,'Max Worker Threads','The highest number of worker threads that serviced the command queue since the network application was started or since the statistics were cleared.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(27,'Network Threads','',0) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(28,'Max Network Threads','',0) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(29,'RA Pages Found in Cache','How many pages the RA Manager found already in the cache when trying to perform scans.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(30,'RA Pages Placed in Cache','How many pages were brought into the cache by the RA Manager.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(31,'RA Physical IO','How many 16K reads were done by the RA Manager.',1) INSERT dbmsys_perf_descr(counter_id, counter_name, description, log_this) VALUES(32,'Used Slots','How many RA slots are being used by active queries. Note that a single query may use multiple RA slots.',1) GO