How to format date with getdate() function result:
SELECT replace(convert(varchar, getdate(), 111), '/', '-') + ' 00:00:00' AS EndDate, replace(convert(varchar, getdate()-1, 111), '/', '-') + ' 00:00:00' AS StartDate
http://anubhavg.wordpress.com/2009/06/11/how-to-format-datetime-date-in-sql-server-2005/
Technology Innovation - Blog para Programadores Esta é uma ideia que surgiu para divulgar as possíveis soluções que possam facilitar a vida aos programadores
quinta-feira, julho 11, 2013
terça-feira, julho 09, 2013
SCOM Reporting - How To get Performance counters by Day instead of Hour
To get Performance counters by Day instead of Hour:
SELECT FullName, InstanceName, DateTime, AverageValue, MaxValue, MinValue
FROM OperationsManagerDW.dbo.vManagedEntity,
OperationsManagerDW.dbo.vPerformanceRule,
OperationsManagerDW.dbo.vPerformanceRuleInstance,
OperationsManagerDW.Perf.vPerfDaily
WHERE vPerfDaily.ManagedEntityRowId = vManagedEntity.ManagedEntityRowId
AND vPerfDaily.PerformanceRuleInstanceRowId = vPerformanceRuleInstance.PerformanceRuleInstanceRowId
AND vPerformanceRuleInstance.RuleRowId = vPerformanceRule.RuleRowId
AND vPerformanceRule.ObjectName = 'Processor'
AND vPerformanceRule.CounterName = '% Processor Time'
AND DateTime > '2013-06-01'
AND DateTime < '2013-07-01'
ORDER BY FullName, InstanceName, DateTime
sexta-feira, julho 05, 2013
SCOM Reporting - How to get Performance Counter
http://capacitas.wordpress.com/2012/12/05/retrieving-data-from-the-scom-database/
You can now construct a query to get back, for instance, CPU data for every server between two dates (knocked together quickly to show how it all links up, you could probably write one more elegantly):
You can now construct a query to get back, for instance, CPU data for every server between two dates (knocked together quickly to show how it all links up, you could probably write one more elegantly):
SELECT FullName, InstanceName, DateTime, AverageValue
FROM OperationsManagerDW.dbo.vManagedEntity,
OperationsManagerDW.dbo.vPerformanceRule,
OperationsManagerDW.dbo.vPerformanceRuleInstance,
OperationsManagerDW.Perf.vPerfHourly
WHERE vPerfHourly.ManagedEntityRowId = vManagedEntity.ManagedEntityRowId
AND vPerfHourly.PerformanceRuleInstanceRowId = vPerformanceRuleInstance.PerformanceRuleInstanceRowId
AND vPerformanceRuleInstance.RuleRowId = vPerformanceRule.RuleRowId
AND vPerformanceRule.ObjectName = ‘Processor’
AND vPerformanceRule.CounterName = ‘% Processor Time’
AND DateTime > ’2012-11-01′
AND DateTime < ’2012-11-08′
ORDER BY FullName, InstanceName, DateTime
FROM OperationsManagerDW.dbo.vManagedEntity,
OperationsManagerDW.dbo.vPerformanceRule,
OperationsManagerDW.dbo.vPerformanceRuleInstance,
OperationsManagerDW.Perf.vPerfHourly
WHERE vPerfHourly.ManagedEntityRowId = vManagedEntity.ManagedEntityRowId
AND vPerfHourly.PerformanceRuleInstanceRowId = vPerformanceRuleInstance.PerformanceRuleInstanceRowId
AND vPerformanceRuleInstance.RuleRowId = vPerformanceRule.RuleRowId
AND vPerformanceRule.ObjectName = ‘Processor’
AND vPerformanceRule.CounterName = ‘% Processor Time’
AND DateTime > ’2012-11-01′
AND DateTime < ’2012-11-08′
ORDER BY FullName, InstanceName, DateTime
quarta-feira, julho 03, 2013
APPFabric - A nova tecnologia de Caching
Cache Administration with Windows PowerShell (Windows Server AppFabric Caching)
Commands
http://msdn.microsoft.com/en-us/library/ff718177(v=azure.10).aspxHow to know if the caching is healthy
http://msdn.microsoft.com/en-us/library/ff921010(v=azure.10).aspx
Throttling Troubleshooting (Windows Server AppFabric Caching)
http://msdn.microsoft.com/en-us/library/ff921030(v=azure.10).aspx
Subscrever:
Mensagens (Atom)