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 an existing server Active Directory Administrator.
az sql server ad-admin list Returns a list of server Administrators.
az sql server ad-admin update Update an existing server Active Directory administrator.
az sql server create Create a server.
az sql server delete Deletes a server.
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 create

Create a server.

az sql server create --admin-password
--admin-user
--location
--name
--resource-group
[--assign-identity]
[--tags]

Required Parameters

--admin-password -p
The administrator login password (required for server creation).
--admin-user -u
Administrator username for the server. Once created it cannot be changed.
--location -l
Location. You can configure the default location using `az configure --defaults location=<location>`.
--name -n
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

Optional Parameters

--assign-identity -i
Generate and assign an Azure Active Directory Identity for this serverfor use with key management services like Azure KeyVault.
--tags
Resource tags.

az sql server delete

Deletes a server.

az sql server delete --name
--resource-group
[--yes]

Required Parameters

--name -n
The name of the server.
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

Optional Parameters

--yes -y
Do not prompt for confirmation.

az sql server list

List available servers.

az sql server list [--resource-group]

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

--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

az sql server list-usages

Returns server usages.

az sql server list-usages --name
--resource-group

Required Parameters

--name -n
The name of the server.
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

az sql server show

Gets a server.

az sql server show --name
--resource-group

Required Parameters

--name -n
The name of the server.
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

az sql server update

Update a server.

az sql server update --name
--resource-group
[--add]
[--admin-password]
[--assign_identity]
[--remove]
[--set]

Required Parameters

--name -n
The name of the server.
--resource-group -g
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.

Optional Parameters

--add
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty .
--admin-password -p
The administrator login password.
--assign_identity -i
Generate and assign an Azure Active Directory Identity for this serverfor use with key management services like Azure KeyVault.
--remove
Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.
--set
Update an object by specifying a property path and value to set. Example: --set property1.property2=.