Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a firewall rule allowing access from a specific IP address.
Azure
az sql server firewall-rule create --resource-group myResourceGroup --server myServer --name AllowMyIP --start-ip-address [1] --end-ip-address [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the server name instead of an IP address.
Using an IP range when only a single IP is needed.
✗ Incorrect
The start and end IP address must be the specific IP you want to allow, here '192.168.1.1'.
2fill in blank
mediumComplete the code to list all firewall rules for an Azure SQL server.
Azure
az sql server firewall-rule list --resource-group myResourceGroup --server [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing resource group name with server name.
Using a firewall rule name instead of server name.
✗ Incorrect
The server name is required to list its firewall rules.
3fill in blank
hardFix the error in the command to delete a firewall rule named 'AllowMyIP'.
Azure
az sql server firewall-rule delete --resource-group myResourceGroup --server myServer --name [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the server or resource group name instead of the rule name.
Using an incorrect rule name.
✗ Incorrect
The --name parameter must be the firewall rule name to delete, here 'AllowMyIP'.
4fill in blank
hardFill both blanks to create a firewall rule allowing access from IP range 10.0.0.1 to 10.0.0.255.
Azure
az sql server firewall-rule create --resource-group myResourceGroup --server myServer --name AllowRange --start-ip-address [1] --end-ip-address [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping start and end IP addresses.
Using unrelated IP addresses.
✗ Incorrect
The start IP is 10.0.0.1 and the end IP is 10.0.0.255 to cover the range.
5fill in blank
hardFill all three blanks to update a firewall rule named 'AllowOffice' to allow IP 203.0.113.5.
Azure
az sql server firewall-rule update --resource-group [1] --server [2] --name [3] --start-ip-address 203.0.113.5 --end-ip-address 203.0.113.5
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using IP address as resource group or server name.
Mixing up the order of parameters.
✗ Incorrect
Resource group, server name, and rule name must be specified to update the rule.