This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Convert-Size { | |
[cmdletbinding()] | |
Param ( | |
[parameter(ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)] | |
[Alias("Length")] | |
[int64]$Size | |
) | |
Begin { | |
If (-Not $ConvertSize) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT db_name(database_id ), database_id as di, | |
datediff(minute, last_sent_time, last_received_time) AS SendRec, | |
datediff(minute, last_received_time, last_redone_time) AS RecRedo, | |
--datediff(minute, last_sent_time, last_redone_time) as MinsRedo, | |
case when redo_queue_size = 0 then 0 | |
when redo_rate = 0 then 0 | |
else cast(redo_queue_size / (redo_rate*1.0) as numeric(12,3)) end as MinToRedo, | |
case when log_send_queue_size = 0 then 0 | |
when log_send_rate = 0 then 0 | |
else cast(log_send_queue_size / (log_send_rate*1.0) as numeric(12,3)) |
NewerOlder