我正在尝试查找 Azure SQL DB 的复制角色(主或辅助)。
我使用:Get-AzureRmSqlDatabase
命令,但找不到复制信息。
是否有不同的 powershell 命令来查找复制角色?
最佳答案
The Get-AzureRMSqlDatabaseReplicationLink cmdlet replaces the Get-AzureSqlDatabaseCopy cmdlet.
It gets all geo-replication links between the specified Azure SQL Database and a resource group or AzureSQL Server.
Get-AzureRmSqlDatabaseReplicationLink -DatabaseName <databaseName> -PartnerResourceGroupName <partnerResourceGroupName> -ResourceGroupName <resourceGroupName> -ServerName <databaseServerName> | Select Role
下面是上面的 Azure PowerShell cmdlet 的结果,它获取异地复制的 Azure SQL 数据库的复制角色。
注意:
如果异地复制数据库和服务器与主数据库位于同一资源组中,则 partnerResourceGroupName 和 resourceGroupName 可以相同。
关于powershell - 如何查找Azure SQL数据库的复制角色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46135772/