January 14, 2020 at 8:11 pm
I want to get output as
X hours and x minutes ( 1 hours and 30 minutes) how do I get output from below query
select
CAST((rs.redo_queue_size/rs.redo_rate/60.0) as decimal(10)) [estimated_recovery_time_minutes]
from sys.availability_replicas r
inner join sys.dm_hadr_database_replica_states rs on r.replica_id = rs.replica_id
Right now I am getting 200 Minutes, but I need 3 hours and 20 minutes
January 14, 2020 at 8:30 pm
I don't have any data returned when I run your query, but could you run something like this?
declare @i int = 200
select @i/60 as hours, @i % 60 as minutes
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 14, 2020 at 8:44 pm
Thanks it worked for me
Thanks once again
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply