powershell - 如何查找Azure SQL数据库的复制角色

标签 powershell azure azure-sql-database azure-sql-server

我正在尝试查找 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 数据库的复制角色。

enter image description here

注意:

如果异地复制数据库和服务器与主数据库位于同一资源组中,则 partnerResourceGroupNameresourceGroupName 可以相同。

关于powershell - 如何查找Azure SQL数据库的复制角色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46135772/

相关文章:

azure - 未加载运行时堆栈 - Azure - Github Actions

Azure 数据工厂复制数据管道停留在“进行中”状态;但甚至没有加载任何数据

sql-server - 无法更新 ssms 2016 中数据库的 COMPATIBILITY_LEVEL

不带逗号的 Powershell 十进制格式

asp.net - 我需要 VM 才能在 Windows Azure 上运行 Jira 吗?

用于获取物理 CPU 数量的 Powershell 脚本

azure - 自动部署到 Azure 模拟器?

php - 在 Ubuntu 上从 PHP 连接到 SQL Azure

PowerShellPack - TaskScheduler 模块 - 在没有登录用户的情况下运行任务

powershell - 在PowerShell中阻止在线搜索获取帮助