Search code examples
azureazure-sql-databaseazure-cloud-shell

Azure Cloud shell fails to identify server. Throws error : Can not perform requested operation on nested resource. Parent resource not found


I am trying to get firewall rules configured on an existing azure sql server. I am using Azure Cloud shell to run the following command which results in an error.

~$ az sql server firewall-rule list --server mydbserver.database.windows.net --resource-group myresourcegroup

Can not perform requested operation on nested resource. Parent resource 'mydbserver.database.windows.net' not found.


Solution

  • .database.windows.net should not be there. myserver.database.windows.net is the server's fully qualified DNS name, but in the API the server's "name" is just myserver.