How to: Change Transaction Safety in a Database Mirroring Session (Transact-SQL)

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).

Note

For more information about operating with safety on, see Synchronous Database Mirroring (High-Safety Mode). For more information about operating with safety off, see Asynchronous Database Mirroring (High-Performance Mode).

To turn on transaction safety

  1. Connect to the principal server.

  2. Issue the following Transact-SQL statement:

    ALTER DATABASE <database> SET PARTNER SAFETY FULL
    

    where <database> is the name of the mirrored database.

To turn off transaction safety

  1. Connect to the principal server.

  2. Issue the following statement:

    ALTER DATABASE <database> SET PARTNER SAFETY OFF
    

    where <database> is the mirrored database.

See Also

Concepts

Asynchronous Database Mirroring (High-Performance Mode)
Synchronous Database Mirroring (High-Safety Mode)

Other Resources

ALTER DATABASE (Transact-SQL)
Database Mirroring How-to Topics

Help and Information

Getting SQL Server 2005 Assistance