2

In Azure database, ServerProperty can get some server property information. But, I want to know the region which database server is running. Is it possible? Can I get this region information with SQL script like below (or something like this):

SELECT SERVERPROPERTY('Region')
Dale K
  • 25,246
  • 15
  • 42
  • 71
L.W
  • 225
  • 1
  • 2
  • 12

1 Answers1

0

Not sure if this can be done from Sql out of the box, but one indirect way could be by using powershell and then calling that powershell script from sql script.

Get-AzureRmSqlServer powershell cmdlet gives detailed information about the servers including region. (Ref)

enter image description here

Then you can call this PS script from SQL as described here.

Not tried it but hope it should work.

Yogi
  • 9,174
  • 2
  • 46
  • 61