az sql server
Manage SQL servers.
Commands
az sql server ad-admin |
Manage a server's Active Directory administrator. |
az sql server ad-admin create |
Create a new server Active Directory administrator. |
az sql server ad-admin delete |
Deletes the Azure Active Directory administrator with the given name. |
az sql server ad-admin list |
Gets a list of Azure Active Directory administrators in a server. |
az sql server ad-admin update |
Update an existing server Active Directory administrator. |
az sql server ad-only-auth |
Manage Azure Active Directly only Authentication settings for this Server. |
az sql server ad-only-auth disable |
Disable Azure Active Directly only Authentication for this Server. |
az sql server ad-only-auth enable |
Enable Azure Active Directly only Authentication for this Server. |
az sql server ad-only-auth get |
Get a specific Azure Active Directly only Authentication property. |
az sql server audit-policy |
Manage a server's auditing policy. |
az sql server audit-policy show |
Show server audit policy. |
az sql server audit-policy update |
Update a server's auditing policy. |
az sql server audit-policy wait |
Place the CLI in a waiting state until a condition of the server's audit policy is met. |
az sql server conn-policy |
Manage a server's connection policy. |
az sql server conn-policy show |
Gets a server's secure connection policy. |
az sql server conn-policy update |
Updates a server's secure connection policy. |
az sql server create |
Create a server. |
az sql server delete |
Deletes a server. |
az sql server dns-alias |
Manage a server's DNS aliases. |
az sql server dns-alias create |
Creates a server dns alias. |
az sql server dns-alias delete |
Deletes the server DNS alias with the given name. |
az sql server dns-alias list |
Gets a list of server DNS aliases for a server. |
az sql server dns-alias set |
Sets a server to which DNS alias should point. |
az sql server dns-alias show |
Gets a server DNS alias. |
az sql server firewall-rule |
Manage a server's firewall rules. |
az sql server firewall-rule create |
Create a firewall rule. |
az sql server firewall-rule delete |
Deletes a firewall rule. |
az sql server firewall-rule list |
List a server's firewall rules. |
az sql server firewall-rule show |
Shows the details for a firewall rule. |
az sql server firewall-rule update |
Update a firewall rule. |
az sql server key |
Manage a server's keys. |
az sql server key create |
Creates a server key. |
az sql server key delete |
Deletes a server key. |
az sql server key list |
Gets a list of server keys. |
az sql server key show |
Shows a server key. |
az sql server list |
List available servers. |
az sql server list-usages |
Returns server usages. |
az sql server show |
Gets a server. |
az sql server tde-key |
Manage a server's encryption protector. |
az sql server tde-key set |
Sets the server's encryption protector. |
az sql server tde-key show |
Gets a server encryption protector. |
az sql server update |
Update a server. |
az sql server vnet-rule |
Manage a server's virtual network rules. |
az sql server vnet-rule create |
Create a virtual network rule to allows access to an Azure SQL server. |
az sql server vnet-rule delete |
Deletes the virtual network rule with the given name. |
az sql server vnet-rule list |
Gets a list of virtual network rules in a server. |
az sql server vnet-rule show |
Gets a virtual network rule. |
az sql server vnet-rule update |
Update a virtual network rule. |
az sql server wait |
Place the CLI in a waiting state until a condition of the SQL server is met. |
az sql server create
Create a server.
az sql server create --admin-password
--admin-user
--name
--resource-group
[--assign-identity]
[--enable-public-network {false, true}]
[--location]
[--minimal-tls-version {1.0, 1.1, 1.2}]
[--no-wait]
[--subscription]
Examples
Create a server.
az sql server create -l westus -g mygroup -n myserver -u myadminuser -p myadminpassword
Create a server with disabled public network access to server.
az sql server create -l westus -g mygroup -n myserver -u myadminuser -p myadminpassword -e false
Required Parameters
The administrator login password (required for server creation).
Administrator username for the server. Once created it cannot be changed.
Name of the Azure SQL server. You can configure the default using az configure --defaults sql-server=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Generate and assign an Azure Active Directory Identity for this serverfor use with key management services like Azure KeyVault.
Set whether public network access to server is allowed or not. When false,only connections made through Private Links can reach this server.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
The minimal TLS version enforced by the sql server for inbound connections.
Do not wait for the long-running operation to finish.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az sql server delete
Deletes a server.
az sql server delete [--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the Azure SQL server. You can configure the default using az configure --defaults sql-server=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az sql server list
List available servers.
az sql server list [--query-examples]
[--resource-group]
[--subscription]
Examples
List all servers in the current subscription.
az sql server list
List all servers in a resource group.
az sql server list -g mygroup
Optional Parameters
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az sql server list-usages
Returns server usages.
az sql server list-usages [--ids]
[--name]
[--resource-group]
[--subscription]
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the Azure SQL server. You can configure the default using az configure --defaults sql-server=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az sql server show
Gets a server.
az sql server show [--ids]
[--name]
[--query-examples]
[--resource-group]
[--subscription]
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the Azure SQL server. You can configure the default using az configure --defaults sql-server=<name>
.
Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az sql server update
Update a server.
az sql server update [--add]
[--admin-password]
[--assign_identity]
[--enable-public-network {false, true}]
[--force-string]
[--ids]
[--minimal-tls-version {1.0, 1.1, 1.2}]
[--name]
[--no-wait]
[--remove]
[--resource-group]
[--set]
[--subscription]
Examples
Update a server. (autogenerated)
az sql server update --admin-password myadminpassword --name MyAzureSQLServer --resource-group MyResourceGroup
Optional Parameters
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.
The administrator login password.
Generate and assign an Azure Active Directory Identity for this serverfor use with key management services like Azure KeyVault.
Set whether public network access to server is allowed or not. When false,only connections made through Private Links can reach this server.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The minimal TLS version enforced by the sql server for inbound connections.
Name of the Azure SQL server. You can configure the default using az configure --defaults sql-server=<name>
.
Do not wait for the long-running operation to finish.
Remove a property or an element from a list. Example: --remove property.list
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az sql server wait
Place the CLI in a waiting state until a condition of the SQL server is met.
az sql server wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Polling interval in seconds.
Name of the Azure SQL server. You can configure the default using az configure --defaults sql-server=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.