Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


What happen to the redo queue?


What happen to the redo queue?

Author
Message
mah_j
mah_j
SSC-Enthusiastic
SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)

Group: General Forum Members
Points: 127 Visits: 1261
In Mirroring ,If the principal server suddenly fails or crashes when running synchronously
,what happen to the redo queue ?Are these loges hardened to the mirror db?These loges ,on principal do not be harden ,and if we have automatic failover when the session reconnects,it acts as mirror and they run synchronously.

Do I understand correctly?

What about unsent log?If I have unsent log what happen to them ?Do I loose them?
How can I prevent data loss?
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47189 Visits: 44356
The redo queue is the queue of log records on the mirror, log records that have already been hardened on the principal and mirror and only need to be redone (against the data file) on the mirror. The redo queue must be completely redone before the mirror comes online.

You won't have unsent log in synchronous mirroring unless the mirror is not in the synchronised state (due to latency or line failure)


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


mah_j
mah_j
SSC-Enthusiastic
SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)

Group: General Forum Members
Points: 127 Visits: 1261
so if I have latency(I can see unsent log when inserting a 10000000 records loop in Launch Database Mirroring Monitor)how can I prevent data loss?Is there any solution?

This is the test script:


DECLARE @i INT
SET @i=1
WHILE @i<10000000
BEGIN
   INSERT INTO dbo.Table_1
   VALUES( (cast(RAND() AS NVARCHAR(20))),GETDATE() )
   SET @i=@i+1
END

If the principal server fails, how can I prevent data loss?manual failover is better or automatic failover?

I am so confused :-(
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47189 Visits: 44356
If the principal fails and you have unsent log then it doesn't matter whether you go for automatic or manual failover, failing over manually won't magically make the unsent log records materialise on the mirror. Depending on the type of failure, you might be able to salvage the data after the principal comes back online. Of course, if it was a drive failure and the DB files are gone, then not so much.

Make sure the line can handle the expected load, test, test, test, make sure that the unsent log never gets above the allowable data loss for your system.


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


HowardW
HowardW
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1211 Visits: 9892
mah_j (8/6/2013)
so if I have latency(I can see unsent log when inserting a 10000000 records loop in Launch Database Mirroring Monitor)how can I prevent data loss?Is there any solution?

This is the test script:


DECLARE @i INT
SET @i=1
WHILE @i<10000000
BEGIN
   INSERT INTO dbo.Table_1
   VALUES( (cast(RAND() AS NVARCHAR(20))),GETDATE() )
   SET @i=@i+1
END

If the principal server fails, how can I prevent data loss?


If Transaction Safety is set to FULL, you shouldn't see latency and therefore shouldn't have data loss. The point of this mode is to delay commit on the primary until the log is hardened on the secondary. What transaction safety mode is set when you see the latency?

http://technet.microsoft.com/en-us/library/ms179344(v=sql.105).aspx
mah_j
mah_j
SSC-Enthusiastic
SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)

Group: General Forum Members
Points: 127 Visits: 1261
Thanks a lot Gail

Another question,if the principal fails,the way for manual failover is

USE master
go
ALTER DATABASE mirrordb SET PARTNER OFF
GO
RESTORE DATABASE mirrordb WITH RECOVERY
GO

and it will bring the mirror online?

and when the principal is available again,I should configure mirroring again?
mah_j
mah_j
SSC-Enthusiastic
SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)

Group: General Forum Members
Points: 127 Visits: 1261
The mode is High Performance,but I configure mirroring on my local for test not main server.Is it because of low resources?
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47189 Visits: 44356
High performance is asynchronous, not synchronous. If you run mirroring in async then you must accept the possibility of data loss.

And no, that's not how you do a manual failover. That's how you remove mirroring entirely. May I suggest you get your hands on a book on mirroring and read up a bit more?


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


mah_j
mah_j
SSC-Enthusiastic
SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)SSC-Enthusiastic (127 reputation)

Group: General Forum Members
Points: 127 Visits: 1261
I am so sorry ,I mean High Protection,with safety FULL, but has no witness server .

I know that with set partner off I remove mirroring,but when I run SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS the mirror db is in (in Recovery) mode.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search