high availability
#high-availability#change-transaction-safety

Change transaction safety

Transaction safety is the attribute that controls the operating mode of the session. At any time, however, the database owner can change the transacti

Transaction safety is the attribute that controls the operating mode of the session. At any time,

however, the database owner can change the transaction safety. By default, the level of

transaction safety is set to FULL (synchronous operating mode).

Turning off transaction safety shifts the session into asynchronous operating mode, which

maximizes performance. If the principal becomes unavailable, the mirror stops but is available

as a warm standby (failover requires forcing service with possible data loss).

  1. Connect to the principal server.

  2. Issue the following Transact-SQL statement:

where

is the name of the mirrored database.

  1. Connect to the principal server.

  2. Issue the following statement:

where

is the mirrored database.

ALTER DATABASE Database Mirroring (Transact-SQL)

Database Mirroring Operating Modes

ALTER DATABASE <database> SET PARTNER SAFETY FULL
ALTER DATABASE <database> SET PARTNER SAFETY OFF