You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--and collection_time BETWEEN master.dbo.utc2local($__timeFrom()) AND master.dbo.utc2local($__timeTo())
146
-
andobject_name='SQLServer:SQL Statistics'and counter_name in ('Batch Requests/sec')
147
-
order bytimeasc
158
+
andpc.object_name='SQLServer:Buffer Manager'--and counter_name not in ('Memory Grants Pending')
159
+
--and collection_time BETWEEN master.dbo.utc2local($__timeFrom()) AND master.dbo.utc2local($__timeTo())
160
+
161
+
162
+
select distinctobject_name, counter_name, instance_name, cntr_type from DBA..dm_os_performance_counters as pc whereobject_name='SQLServer:Buffer Manager'
163
+
164
+
select*fromsys.dm_os_performance_countersas pc
165
+
where--object_name like 'SQLServer:Buffer Manager%'
166
+
pc.counter_namelike'%available%'
167
+
--or pc.counter_name like 'SQL Compilations/sec%'
168
+
--or pc.counter_name like 'SQL Re-Compilations/sec%'
169
+
/*
170
+
SQL Attention rate
171
+
SQL Compilations/sec
172
+
SQL Re-Compilations/sec
173
+
*/
174
+
175
+
selectmaster.dbo.local2utc(collection_time) astime, cast(free_memory_kb/1024asdecimal(20,2)) as [Available Mbytes], used_page_file_mb =cast(used_page_file_kb*1024asdecimal(30,2))
176
+
from DBA.[dbo].[dm_os_sys_memory]
177
+
where1=1
178
+
--and collection_time BETWEEN master.dbo.utc2local($__timeFrom()) AND master.dbo.utc2local($__timeTo())
179
+
--and server_name = $server_name
180
+
order bytimeasc
181
+
182
+
183
+
selectrtrim(object_name) asobject_name, rtrim(counter_name) as counter_name, rtrim(instance_name) as instance_name, rtrim(cntr_type) as cntr_type
select distinctrtrim(object_name) asobject_name, rtrim(counter_name) as counter_name, rtrim(instance_name) as instance_name, rtrim(cntr_type) as cntr_type
0 commit comments