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')

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.