az sql

Manage Azure SQL Databases and Data Warehouses.

Commands

az sql down

Delete the SQL server and its cached information.

az sql up

Set up an Azure Database for SQL server and configurations.

az sql down

Delete the SQL server and its cached information.

az sql down [--delete-group]
            [--no-wait]
            [--resource-group]
            [--server-name]
            [--yes]

Examples

Delete the server and the cached data, aside from the resource group.

az sql down

Delete the resource group and the full cache.

az sql down --delete-group

Optional Parameters

--delete-group

Delete the resource group.

--no-wait

Do not wait for the long-running operation to finish.

--resource-group -g

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

--server-name -s

Name of the server.

--yes -y

Do not prompt for confirmation.

az sql up

Set up an Azure Database for SQL server and configurations.

az sql up [--admin-password]
          [--admin-user]
          [--database-name]
          [--generate-password]
          [--location]
          [--resource-group]
          [--server-name]
          [--tags]
          [--version]

Examples

Ensure that a Azure Database for SQL server is up and running and configured for immediate use.

az sql up

To override default names, provide parameters indicating desired values/existing resources.

az sql up -g MyResourceGroup -s MyServer -d MyDatabase -u MyUsername -p MyPassword

Optional Parameters

--admin-password -p

The login password of the administrator. Minimum 8 characters and maximum 128 characters. Password must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers, and non-alphanumeric characters.Your password cannot contain all or part of the login name. Part of a login name is defined as three or more consecutive alphanumeric characters.

--admin-user -u

The login username of the administrator.

--database-name -d

The name of a database to initialize.

--generate-password

Generate a password.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--resource-group -g

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

--server-name -s

Name of the server.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--version

Server version.

default value: 12.0