Ankith


Hi

Can anyone please tell me what happens if I have Asynchronous mirroring setup and my Primary server physically dies and not available then what happens . Does

1. Automatic failover occur to Secondary server

2. What does the Database state show as. Primary, disconnected .

3. what happens to my transactions. Are they lost

4. Does any data loss occur

If I rebuild a new server how do I sync back my current primary to the new one In that case is it going to be just a fail back

Any information is appreciated,

Thank you

AK





Re: Asynchronous Mirroring and Server Failure

Deepak Rangarajan


In Asynchronous mirroring the following occurs,
1. failover has to be forced only as it will be in High performance mode and witness server will not be present
2. safety is set OFF, the principal does not wait for acknowledgment from the mirror, and so the principal and mirror may not be fully synchronized (that is, the mirror may not quite keep up with the principal)
3. yes the if the principal server is down it will be shown as disconnected
4. The mirror will attempt to keep up with the principal, by recording transactions as quickly as possible, but some transactions may be lost if the principal suddenly fails and you force the mirror into service.
5. you need to failover using the option force_service allow data loss.......you need to run the below command in mirror server,

Code Snippet

ALTER DATABASE <dbname> SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS


The forced service failover causes an immediate recovery of the mirror database. It may involve potential data loss on the mirror when it is recovered, if some of the transaction log blocks from the principal have not yet been received by the mirror. The High Performance mode is best used for transferring data over long distances (that is, for disaster recovery to a remote site), or for mirroring very active databases where some potential data loss is acceptable.


refer the below links,
http://sql-articles.com/articles/dbmrr.htm
sql-articles.com

Thanxx
Deepak







Re: Asynchronous Mirroring and Server Failure

Ankith

Hi Deepak

Thanks for your answers. So my question is after failing forceover and the mirror database has been recovered what do we need to do to apply those transaction log blocks from principal that have not been recieved . does restoring the transaction logs backups from the principal (if they are available) and applying them on recoverd mirror database is something that guarantees no data loss

Thank you

AK






Re: Asynchronous Mirroring and Server Failure

Deepak Rangarajan

Hi Ankith,
Definitely data loss is bound to be present in High performance mode (Asynchronous mirroring). You cannot apply the transaction logs from principal because mirroring works on the concept of transactions and not transaction logs........transaction logs are present only in log shipping ! in mirroring all the transactions occur internally and cannot perform any restorations Smile

Thanxx
Deepak





Re: Asynchronous Mirroring and Server Failure

Ankith

Hi Deepak,

Great Explanation. In such a case, how can we

1.Find out how much data loss has occured. Is there any way to know this (I am thinking not).

2.what is the best way to verify to know if data loss has occured

3. Is there any way to mitigate or reduce the data loss if we cant prevent it

Thanks

AK





Re: Asynchronous Mirroring and Server Failure

Deepak Rangarajan

Hi Ankith,
1. I don't think its possible to identify the data loss
2. Definitely data loss will occur but i am not sure
3. The only thing that comes to my mind is High availability mode which has automatic failover as witness server is present ! since you need to perform forced failover i.e you need to run the query so that failover occurs instantly ! if you want to mitigate it in asynchronous mode i think you need to configure alerts which will let you know the status of mirroring so that you can perform failover