{"id":27605,"library":"azure-cli-sql","title":"Azure CLI SQL Module","description":"Microsoft Azure CLI SQL command module for managing Azure SQL databases, servers, and elastic pools. Current version 2.2.5. Released alongside Azure CLI core; no independent release cadence.","status":"active","version":"2.2.5","language":"python","source_language":"en","source_url":"https://github.com/Azure/azure-cli/tree/main/src/command_modules/azure-cli-sql","tags":["azure","sql","cli","microsoft","command-module"],"install":[{"cmd":"pip install azure-cli-sql","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Required for CLI framework and authentication.","package":"azure-cli-core","optional":false},{"reason":"Python SDK for Azure SQL management APIs.","package":"azure-mgmt-sql","optional":false}],"imports":[{"wrong":"from azure.cli.command_modules.sql import SqlCommandsLoader","symbol":"SqlCommandsLoader","correct":"from azure.cli.command_modules.sql import SqlCommandsLoader"}],"quickstart":{"code":"from azure.cli.core import get_default_cli\nfrom azure.cli.command_modules.sql import SqlCommandsLoader\n\ncli = get_default_cli()\nloader = SqlCommandsLoader(cli)\n# List SQL servers (requires authenticated CLI session)\nresult = cli.invoke(['sql', 'server', 'list'])\nprint(result.result)","lang":"python","description":"Initialize CLI and list SQL servers using the SQL command module. Requires prior `az login`."},"warnings":[{"fix":"Update scripts to use new parameter names: `az sql db create --capacity ... --edition ...`","message":"The SQL module no longer supports the older SQL DB create/update parameters from versions < 2.0.0. Use `--capacity` and `--edition` instead of `--max-size-bytes` and `--sku-name`.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Install the mssql extension: `az extension add --name mssql` and use `az mssql mi` instead.","message":"Azure SQL Managed Instance commands using `az sql mi` are being deprecated in favor of the new `az sql mi` command group in the \"mssql\" extension. This module will eventually drop Managed Instance support.","severity":"deprecated","affected_versions":">=2.2.0"},{"fix":"Install full CLI: `pip install azure-cli` or at least `pip install azure-cli-core`.","message":"Module import fails if Azure CLI is not fully installed. Running `pip install azure-cli-sql` alone will not pull all dependencies; you must also install `azure-cli` or `azure-cli-core`.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2.2.5':22 'alongsid':24 'azur':1,6,13,25,32 'cadenc':31 'cli':2,7,26,34 'command':9,37 'command-modul':36 'core':27 'current':20 'databas':15 'elast':18 'independ':29 'manag':12 'microsoft':5,35 'modul':4,10,38 'pool':19 'releas':23,30 'server':16 'sql':3,8,14,33 'version':21","created_at":"2026-05-09T05:51:07.557983+00:00","updated_at":"2026-05-09T05:51:07.557983+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmp0lucfomu/venv/lib/python3.12/site-packages/azure/__init__.py\", line 6, in <module>\n    import pkg_resources\nModuleNotFoundError: No module named 'pkg_resources'"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"az","cli_version":"sh: 1: az: not found","type":"library","homepage":"https://azure.microsoft.com/en-us/products/azure-sql/","github":"https://github.com/Azure/azure-cli","docs":null,"changelog":null,"pypi":"https://pypi.org/project/azure-cli-sql/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["azure","database","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}