Peristiwa
31 Mac, 11 PTG - 2 Apr, 11 PTG
Acara pembelajaran SQL, Fabric dan Power BI terbesar. 31 Mac - 2 April. Gunakan kod FABINSIDER untuk menjimatkan $400.
Daftar hari iniPelayar ini tidak lagi disokong.
Naik taraf kepada Microsoft Edge untuk memanfaatkan ciri, kemas kini keselamatan dan sokongan teknikal yang terkini.
Applies to:
SQL Server
This topic describes how to pause or resume database mirroring in SQL Server by using SQL Server Management Studio or Transact-SQL.
In This Topic
Before you begin:
To ReplaceThisText, using:
Follow Up: After Pausing or Resuming Database Mirroring
At any time, you can suspend a database mirroring session, which might improve performance during bottlenecks, and you can resume a suspended session at any time.
Awas
After a forced service, when the original principal server reconnects, mirroring is suspended. Resuming mirroring in this situation could possibly cause data loss on the original principal server. For information about managing the potential data loss, see Role Switching During a Database Mirroring Session (SQL Server).
Requires ALTER permission on the database.
To pause or resume a database mirroring session use the Database Properties Mirroring page.
During a database mirroring session, connect to the principal server instance, in Object Explorer, click the server name to expand the server tree.
Expand Databases, and select the database.
Right-click the database, select Tasks, and then click Mirror. This opens the Mirroring page of the Database Properties dialog box.
To pause the session, click Pause.
A prompt asks for confirmation; if you click Yes, the session is paused, and the button changes to Resume.
For more information about the impact of pausing a session, see Pausing and Resuming Database Mirroring (SQL Server).
To resume the session, click Resume.
Connect to the Database Engine for either partner.
From the Standard bar, click New Query.
Issue the following Transact-SQL statement:
ALTER DATABASE database_name SET PARTNER SUSPEND
where database_name is the mirrored database whose session you want to you want to suspend.
The following example pauses the AdventureWorks2022
sample database.
ALTER DATABASE AdventureWorks2022 SET PARTNER SUSPEND;
Connect to the Database Engine for either partner.
From the Standard bar, click New Query.
Issue the following Transact-SQL statement:
ALTER DATABASE database_name SET PARTNER RESUME
where database_name is the mirrored database whose session you want to resume.
The following example pauses the AdventureWorks2022
sample database.
ALTER DATABASE AdventureWorks2022 SET PARTNER RESUME;
After pausing database mirroring
On the primary database, take precautions to avoid a full transaction log. For more information, see The Transaction Log (SQL Server).
After resuming database mirroring
Resuming database mirroring places the mirror database in the SYNCHRONIZING state. If the safety level is FULL, the mirror catches up with the principal and the mirror database enters the SYNCHRONIZED state. At this point, failover becomes possible. If the witness is present and ON, automatic failover is possible. In the absence of a witness, manual failover is possible.
Peristiwa
31 Mac, 11 PTG - 2 Apr, 11 PTG
Acara pembelajaran SQL, Fabric dan Power BI terbesar. 31 Mac - 2 April. Gunakan kod FABINSIDER untuk menjimatkan $400.
Daftar hari iniLatihan
Modul
Manage and monitor data warehouse activities in Azure Synapse Analytics - Training
Manage and monitor data warehouse activities in Azure Synapse Analytics
Pensijilan
Microsoft Certified: Azure Database Administrator Associate - Certifications
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.
Dokumentasi
Mirrored databases are disconnected - SQL Server
This article provides a resolution for the problem where mirrored databases are left in a Disconnected or In Recovery state.
Remove Database Mirroring (SQL Server) - SQL Server Database Mirroring
Learn how to remove database mirroring from a database by using SQL Server Management Studio or Transact-SQL in SQL Server.
Removing Database Mirroring (SQL Server) - SQL Server Database Mirroring
Learn about the impact of stopping a database mirroring session, which a database owner can do at any time on either partner in SQL Server.