Get-AzureRmSqlSyncMember
傳回 Azure SQL 資料庫 同步成員的相關信息。
警告
自 2024 年 2 月 29 日起,AzureRM PowerShell 模組已正式淘汰。 建議使用者從 AzureRM 遷移至 Az PowerShell 模組,以確保持續支援和更新。
雖然 AzureRM 模組可能仍可運作,但不再維護或支援它,但會根據用戶的判斷權和風險放置任何繼續使用。 如需轉換至 Az 模組的指引,請參閱我們的 移轉資源 。
Syntax
Get-AzureRmSqlSyncMember
[-Name <String>]
[-SyncGroupName] <String>
[-ServerName] <String>
[-DatabaseName] <String>
[-ResourceGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Get-AzureRmSqlSyncMember Cmdlet 會傳回一或多個 Azure SQL 資料庫 同步成員的相關信息。 指定同步成員的名稱,只查看該同步成員的資訊。
範例
範例 1:取得指派給同步群組的所有 Azure SQL 同步成員實例
PS C:\>Get-AzureRmSqlSyncMember -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -SyncGroupName "SyncGroup01" | Format-List
ResourceId : subscriptions/{subscriptionId}/resourceGroups/{ResourceGroup01}/servers/{Server01}/databases/{Database01}/syncGroups/{SyncGroup01}/syncMembers/{SyncMember01}
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
SyncGroupName : SyncGroup01
SyncMemberName : SyncMember01
SyncDirection : OneWayMemberToHub
MemberDatabaseType: : AzureSqlDatabase
SyncAgentId :
SqlServerDatabaseId :
MemberServerName : memberServer01.full.dns.name
MemberDatabaseName : memberDatabase01
MemberDatabaseUserName : myAccount
MemberDatabasePassword :
SyncState : Good
ResourceId : subscriptions/{subscriptionId}/resourceGroups/{ResourceGroup01}/servers/{Server01}/databases/{Database01}/syncGroups/{SyncGroup01}/syncMembers/{SyncMember02}
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
SyncGroupName : SyncGroup01
SyncMemberName : SyncMember02
SyncDirection : OneWayMemberToHub
MemberDatabaseType: : AzureSqlDatabase
SyncAgentId :
SqlServerDatabaseId :
MemberServerName : memberServer01.full.dns.name
MemberDatabaseName : memberDatabase01
MemberDatabaseUserName : myAccount
MemberDatabasePassword :
SyncState : Good
此命令會取得指派給同步群組 SyncGroup01 之所有 Azure SQL 資料庫 Sync Member 的相關信息。
範例 2:取得 Azure SQL 資料庫 Sync 成員的相關信息
PS C:\>Get-AzureRmSqlSyncMember -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -SyncGroupName "SyncGroup01" -Name "SyncMember01" | Format-List
ResourceId : subscriptions/{subscriptionId}/resourceGroups/{ResourceGroup01}/servers/{Server01}/databases/{Database01}/syncGroups/{SyncGroup01}/syncMembers/{SyncMember01}
ResourceGroupName : ResourceGroup01
ServerName : Server01
DatabaseName : Database01
SyncGroupName : SyncGroup01
SyncMemberName : SyncMember01
SyncDirection : OneWayMemberToHub
MemberDatabaseType: : AzureSqlDatabase
SyncAgentId :
SqlServerDatabaseId :
MemberServerName : memberServer01.full.dns.name
MemberDatabaseName : memberDatabase01
MemberDatabaseUserName : myAccount
MemberDatabasePassword :
SyncState : Good
此命令會取得名稱為 「SyncMember01」 的 Azure SQL 資料庫 Sync Member 的相關信息
參數
-DatabaseName
Azure SQL 資料庫 的名稱。
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
同步成員名稱。
Type: | String |
Aliases: | SyncMemberName |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
資源群組的名稱。
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServerName
Azure SQL Server 的名稱。
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SyncGroupName
同步群組名稱。
Type: | String |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |