Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 1.89 KB

File metadata and controls

54 lines (40 loc) · 1.89 KB
title Change Transaction Safety in a Database Mirroring Session (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/04/2017
ms.prod sql-server-2016
ms.reviewer
ms.suite
ms.technology
dbe-high-availability
ms.tgt_pltfrm
ms.topic article
helpviewer_keywords
transaction safety [SQL Server database mirroring]
ms.assetid 8b03bb82-8589-4558-8545-9942fe008391
caps.latest.revision 38
author MikeRayMSFT
ms.author mikeray
manager jhubbard
ms.workload Inactive

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

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

ALTER DATABASE Database Mirroring (Transact-SQL)
Database Mirroring Operating Modes