Change Transaction Safety in a Database Mirroring Session (Transact-SQL)
Applies to: SQL Server
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
Connect to the principal server.
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
Connect to the principal server.
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
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho