Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Discrepancy Between sys.dm_os_performance_counters and DBCC SQLPERF(logspace) Expand / Collapse
Author
Message
Posted Monday, December 10, 2012 9:44 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, September 12, 2014 7:53 AM
Points: 246, Visits: 659
Background -

A deployment gone bad. Deployment caused the transaction log to grow to the point where I needed to add a 2nd one. Deployment is done, and now I am cleaning up. I am getting alerts that my TLog is over it's threshold, but it is not. When I run DBCC SQLPERF(loginfo), it shows my log as ~8.5 GB. When I look at the actual file on disk, it also shows 8.5 GB. This is what I expect.

The issue is that the alert is being generated from:

select * from sys.dm_os_performance_counters 
where object_name = 'SQLServer:Databases'
and instance_name = ...
and counter_name = 'Log File(s) Size (KB)'

This tells me that the log file is 18.5 GB. When I run system monitor I see the same result.

The log file that I added, and deleted after the fact was 10 GB. PerMon thinks it is still there. I have verified from the file system that there is no file there anymore.

Has anyone seen a similar discrepancy, or can anyone explain to me why I might be seeing this? Thanks in advance.
Post #1394687
Posted Tuesday, December 11, 2012 4:44 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 10:28 AM
Points: 1,973, Visits: 3,272
Not 100%, but some sys views only refresh on a SQL restart - could be that the extraneous counter will vanish then.
Post #1395042
Posted Tuesday, December 11, 2012 6:41 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 11:55 PM
Points: 6,350, Visits: 13,676
have you run a log backup since removing the extra log file?

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1395087
Posted Tuesday, December 11, 2012 7:11 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, September 12, 2014 7:53 AM
Points: 246, Visits: 659
Perry Whittle (12/11/2012)
have you run a log backup since removing the extra log file?


Yup - we run them every 10 minutes, for log shipping.
Post #1395110
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse