question

sakuraime avatar image
0 Votes"
sakuraime asked SaurabhSharma-msft commented

Azure sql database : sys.dm_geo_replication_link_status

Apart from sys.dm_geo_replication_link_status to monitor Auto-Failover group . are there any metric from Azure monitoring or Azure sql diagnostic to reflect these information?

azure-sql-database
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SaurabhSharma-msft avatar image
0 Votes"
SaurabhSharma-msft answered SaurabhSharma-msft commented

Hi @sakuraime,

Thanks for using Microsoft Q&A !!

There are two ways you can get this information -

  1. Using Az SQL Powershell cmdlet (Get-AzSqlDatabaseReplicationLink)
    Get-AzSqlDatabaseReplicationLink -DatabaseName {Datbase Name} -PartnerResourceGroupName {Secondary Resource Group Name} -ResourceGroupName {Primary Resource Group Name} -ServerName {Server Name}
    You will be getting the results like below -
    108697-image.png

  2. Using Replication Links Rest API (List By Database/List by Server)
    GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks?api-version=2021-02-01-preview

Results -
108740-image.png

Please let me know if you have any other questions.

Thanks
Saurabh


Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.


image.png (20.1 KiB)
image.png (29.8 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

thanks .pretty good , but from tsql it's actually in second measuring the lag .

however in here using powershell or restAPI , it show the percentage......... sounds percentage is quite hard to transfer to seconds.......

0 Votes 0 ·

Hi @sakuraime,

I agree. Could you please help me with the actual use case of getting the geo replication status using other method than existing (sys.dm_geo_replication_link_status) and I will be providing this feedback internally to products team.

I also suggest you to provide your feedback over uservoice as well.

Thanks
Saurabh


0 Votes 0 ·

Hi @sakuraime,

Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

Thanks
Saurabh

0 Votes 0 ·