Thursday, March 22, 2012

Database Mirroring : Asynchronous mirroring without a witness

Hi

I am testing the manual failover of a Asynchronous mirroring without a witness but i get the following error when i issue "ALTER DATABASE testdb SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS" on the mirror database server.

Both the mirror and principal is in a synchronized state before i issue the above command.

Msg 1455, Level 16, State 2, Line 1

The database mirroring service cannot be forced for database "testdb" because the database is not in the correct state to become the principal database.

Thanks,

Priyanga


To failover with Asyncronous mirroring, the preferred way to failover is to turn the safety to FULL and issue the ALTER DB SET PARTNER FAILOVER command. that way you will not lose any data when you failover.

The FORCE_SERVICE_ALLOW_DATA_LOSS command should only be used when the principal database is completely broken and it has been decided (by humans) that the mirror server should be promoted to be the new principal. Then the command is issued on the mirror.

State 2 indicates that you are issuing the command on the principal. FORCE_SERVICE can only be issued on the mirror and the mirror cannot talk to the principal.

thanks,
mark

|||

Thanks Mark.

The partner force_service_allow_data_loss command will only work on the mirror when the principal server is not reachable.

Cheers,
Priyanga


No comments:

Post a Comment