使用物件總管詳細資料監視可用性群組Use Object Explorer Details to Monitor Availability Groups

適用範圍:Applies to: 是SQL ServerSQL Server (所有支援的版本) yesSQL ServerSQL Server (all supported versions) 適用範圍:Applies to: 是SQL ServerSQL Server (所有支援的版本) yesSQL ServerSQL Server (all supported versions)

此主題描述如何使用 SQL Server Management StudioSQL Server Management Studio 的 [物件總管詳細資料] 窗格來監視及管理現有的 AlwaysOn 可用性群組、可用性複本和可用性資料庫。This topic describes how to use the Object Explorer Details pane of SQL Server Management StudioSQL Server Management Studio to monitor and manage existing Always On availability groups, availability replicas, and availability databases.

注意

如需使用 [物件總管詳細資料] 窗格的詳細資訊,請參閱 物件總管詳細資料窗格For information about using the Object Explorer Details pane, see Object Explorer Details Pane.

必要條件Prerequisites

您必須連接到裝載主要複本或次要複本的 SQL ServerSQL Server 執行個體 (伺服器執行個體)。You must be connected to the instance of SQL ServerSQL Server (server instance) that hosts either the primary replica or a secondary replica.

使用 SQL Server Management StudioUsing SQL Server Management Studio

監視可用性群組、可用性複本和可用性資料庫To monitor availability groups, availability replicas, and availability databases

  1. 在 [檢視] 功能表上,按一下 [物件總管詳細資料] 或按 F7 鍵。On the View menu, click Object Explorer Details, or press the F7 key.

  2. 在 [物件總管] 中,連接到您要監視可用性群組的 SQL ServerSQL Server 執行個體,然後按一下伺服器名稱以展開伺服器樹狀目錄。In Object Explorer, connect to the instance of SQL ServerSQL Server on which you want to monitor an availability group, and click the server name to expand the server tree.

  3. 依序展開 [Always On 高可用性] 節點和 [可用性群組] 節點。Expand the Always On High Availability node and the Availability Groups node.

  4. [物件總管詳細資料] 窗格會顯示連接之伺服器執行個體裝載複本的每個可用性群組。The Object Explorer Details pane displays every availability group for which the connected server instance hosts a replica. 對於每個可用性群組,[伺服器執行個體 (主要)] 資料行會顯示目前裝載主要複本的伺服器執行個體名稱。For each availability group, the Server Instance (Primary) column displays the name of the server instance that is currently hosting the primary replica. 若要顯示有關給定之可用性群組的詳細資訊,請在 [物件總管] 中選取它。To display more information about a given availability group, select it in Object Explorer.

  5. 接著 [物件總管詳細資料] 窗格會顯示此可用性群組的 [可用性複本][可用性資料庫] 節點:The Object Explorer Details pane then displays the Availability Replicas and Availability Databases nodes for this availability group:

    • 當您在 [物件總管] 中展開 [可用性群組] 節點並選取 [可用性複本] 節點時, [物件總管詳細資料] 窗格會顯示有關群組中每個可用性複本的資訊。When you expand the Availability Group node in Object Explorer and select the Availability Replicas node, the Object Explorer Details pane displays information about each of the availability replicas in the group. 如需詳細資訊,請參閱本主題稍後的< 可用性複本詳細資料>。For more information, see Availability Replica Details, later in this topic.

      若要對多個可用性複本執行作業,請選取它們,並以滑鼠右鍵按一下它們,開啟列出可用命令的內容功能表。To perform operations on multiple availability replicas, select them, and right-click them to open up a context menu that lists the available commands.

    • 當您在 [物件總管] 中展開 [可用性群組] 節點並選取 [可用性資料庫] 節點時, [物件總管詳細資料] 窗格會顯示有關群組中每個可用性資料庫的資訊。When you expand the Availability Group node in Object Explorer and select the Availability Databases node, the Object Explorer Details pane displays information about each of the availability databases in the group. 如需詳細資訊,請參閱本主題稍後的< 可用性資料庫詳細資料>。For more information, see Availability Database Details, later in this topic.

      若要對多個可用性資料庫執行作業,請選取它們,並以滑鼠右鍵按一下它們,開啟列出可用命令的內容功能表。To perform operations on multiple availability databases, select them, and right-click them to open up a context menu that lists the available commands.

可用性群組詳細資料Availability Groups Details

[可用性群組] 詳細資料畫面顯示下列資料行:The Availability Groups details screen displays the following columns:

名稱Name
列出所選可用性群組的 [可用性複本]、[可用性資料庫] 和 [可用性群組接聽程式] 資料夾。Lists the Availability Replicas, Availability Databases, and Availability Group Listeners folders of the selected availability group.

可用性複本詳細資料Availability Replica Details

[可用性複本] 詳細資料畫面顯示下列資料行:The Availability Replica details screen displays the following columns:

伺服器執行個體Server Instance
顯示裝載可用性複本的伺服器執行個體名稱,以及表示此伺服器執行個體與本機伺服器執行個體之間目前連接狀態的圖示。Displays the name of the server instance that hosts the availability replica, along with an icon that indicates the current connection state of the server instance to the local server instance.

角色Role
指出可用性複本的目前角色: 主要次要Indicates the current role of the availability replica, either Primary or Secondary. 如需 Always On 可用性群組Always On availability groups 角色的詳細資訊,請參閱 Always On 可用性群組概觀 (SQL Server)For information about Always On 可用性群組Always On availability groups roles, see Overview of Always On Availability Groups (SQL Server).

次要角色的連接模式Connection Mode in Secondary Role
指出執行次要角色之給定可用性複本 (也就是做為次要複本) 的資料庫是否可接受來自用戶端的連接。Indicates whether the databases of a given availability replica that is performing the secondary role (that is, is acting as a secondary replica) can accept connections from clients.

可能的值如下:The possible values are as follows:

Value 描述Description
不允許連接Disallow Connections 當此可用性複本做為次要複本時,不允許直接連接到可用性資料庫。No direct connections are allowed to the availability databases when this availability replica is acting as a secondary replica. 次要資料庫不適用於讀取。Secondary databases are not available for read access.
只允許讀取意圖的連接Allow Only Read Intent Connections 當此複本做為次要複本時,只允許進行直接唯讀連接。Only direct read-only connections are allowed when this replica acting as a secondary replica. 可讀取複本中的所有資料庫。All database(s) in the replica are available for read access.
允許所有連接Allow All Connections 當此複本做為次要複本時,允許與這些資料庫之間的所有連接。All connections are allowed to these databases for read-only access when this replica acting as a secondary replica.

連接狀態Connection State
指出次要複本目前是否已連接到主要複本。Indicates whether a secondary replica is currently connected to the primary replica. 可能的值如下:The possible values are as follows:

Value 描述Description
已中斷連線Disconnected 若為遠端可用性複本,表示它與本機可用性複本已中斷連接。For a remote availability replica, indicates that it is disconnected from the local availability replica. 本機複本對 [已中斷連接] 狀態的回應取決於其角色,如下所示:The response of the local replica to the Disconnected state depends on its role, as follows:

在主要複本上,如果次要複本已中斷連接,主要複本上的次要資料庫就會標示為 [未同步處理] ,而且主要複本會等候次要複本重新連接。On the primary replica, if a secondary replica is disconnected, the secondary databases are marked as Not Synchronized on the primary replica, and the primary replica waits for the secondary to reconnect.

在次要複本上,一旦偵測到它已中斷連接之後,次要複本就會嘗試重新連接到主要複本。On the secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica.
已連接Connected 目前連接到本機複本的遠端可用性複本。A remote availability replica that is currently connected to the local replica.
NULLNULL 如果本機複本是次要複本,其他次要複本的此值就是 NULL。If the local replica is a secondary replica, this value is NULL for other secondary replicas.

同步處理狀態Synchronization State
指出次要複本目前是否與主要複本進行同步處理。Indicates whether a secondary replica is currently synchronized with primary replica. 可能的值如下:The possible values are as follows:

Value 描述Description
[未同步處理]Not Synchronized 資料庫未同步處理或者尚未聯結至可用性群組。The database is not synchronized or has not yet been joined to the availability group.
已同步處理Synchronized 資料庫會與目前主要複本 (如果有的話) 或最後一個主要複本的主要資料庫進行同步處理。The database is synchronized with the primary database on the current primary replica, if any, or on the last primary replica.

注意:在效能模式中,資料庫永遠不會處於同步處理狀態。Note: In performance mode, the database is never in the Synchronized state.
NULLNULL 未知的狀態。Unknown state. 當本機伺服器執行個體無法與 WSFC 容錯移轉叢集通訊 (亦即,本機節點不屬於 WSFC 仲裁的一部分) 時,就會出現這個值。This value occurs when the local server instance cannot communicate with the WSFC failover cluster (that is the local node is not part of WSFC quorum).

注意

如需可用性複本效能計數器的相關資訊,請參閱 SQLServer,可用性複本For information about performance counters for availability replicas, see SQL Server, Availability Replica.

可用性資料庫詳細資料Availability Database Details

[可用性資料庫] 詳細資料畫面顯示給定之可用性群組中可用性資料庫的下列屬性:The Availability Database details screen displays the following properties of the availability databases in a given availability group:

名稱Name
可用性資料庫的名稱。The name of the availability database.

同步處理狀態Synchronization State
指出可用性資料庫目前是否與主要複本進行同步處理。Indicates whether the availability database is currently synchronized with primary replica.

可能的同步處理狀態如下所示:The possible synchronization states are as follows:

Value 描述Description
正在同步處理Synchronizing 次要資料庫已經收到主要資料庫中尚未寫入磁碟 (強行寫入) 的交易記錄檔記錄。The secondary database has received the transaction log records for the primary database that are not yet written to disk (hardened).

注意:在非同步認可模式中,同步處理模式一律為 [正在同步處理]。Note: In asynchronous-commit mode, the synchronization state is always Synchronizing.

已暫停Suspended
指出可用性資料庫目前是否已上線。Indicates whether the availability database is currently online. 可能的值如下:The possible values are as follows:

Value 描述Description
已暫停Suspended 此狀態指出資料庫在本機已暫停,需要手動恢復。This state indicates that the database is suspended locally and needs to be manually resumed.

在主要複本上,此值對次要資料庫是不可靠的。On the primary replica, the value is unreliable for a secondary database. 若要可靠地判斷次要資料庫是否已暫止,請在裝載此資料庫的次要複本上查詢它。To reliably determine whether a secondary database is suspended, query it on the secondary replica that hosts the database.
未聯結Not Joined 指出次要資料庫尚未聯結至可用性群組或已從群組中移除。Indicates that the secondary database either has not been joined to the availability group or has been removed from the group.
線上存取Online 指出在本機可用性複本上的資料庫未暫止,並且已連接到資料庫。Indicates that the database is not suspended on the local availability replica and that the database is connected.
未連接Not Connected 指出次要複本目前無法連接到主要複本。Indicates that the secondary replica is currently unable to connect to the primary replica.

注意

如需可用性資料庫效能計數器的詳細資訊,請參閱 SQL Server,資料庫複本For information about performance counters for availability databases, see SQL Server, Database Replica.

另請參閱See Also

sys.dm_os_performance_counters (Transact-SQL) sys.dm_os_performance_counters (Transact-SQL)
使用 AlwaysOn 儀表板 (SQL Server Management Studio) Use the Always On Dashboard (SQL Server Management Studio)
檢視可用性群組屬性 (SQL Server) View Availability Group Properties (SQL Server)
檢視可用性複本屬性 (SQL Server)View Availability Replica Properties (SQL Server)