通过 Azure 视图浏览和管理 Azure SQL 资源

本文档介绍如何通过 Azure Data Studio 中的 Azure 视图浏览和管理 Azure SQL Server、Azure SQL 数据库、专用 SQL 池以及其他资源。

连接到 Azure

Azure 视图位于连接视图中。 选择活动栏以打开 Azure 视图。 如果没有看到 Azure 活动栏,请右键单击左侧菜单栏,然后​​选择“Azure”。

添加 Azure 帐户

若要查看与某个 Azure 帐户关联的 SQL 资源,必须先将该帐户添加到 Azure Data Studio。

  1. 通过左下角的“帐户”图标或 Azure 视图中的“Azure: 登录”图标打开“已关联帐户”对话框。

    Screenshot of Sign into Azure screen.

  2. 在“已关联帐户”对话框中,选择“添加帐户”。

    Screenshot of Add an Azure account screen.

  3. 当浏览器打开进行身份验证时,请输入身份验证的凭据。

    Screenshot of Azure authentication window.

  4. 在 Azure Data Studio 中,现在应该可以在“已关联帐户”对话框中找到已登录的 Azure 帐户。

    Screenshot of linked Azure accounts.

添加更多 Azure 帐户

Azure Data Studio 支持多个 Azure 帐户。 若要添加更多 Azure 帐户,请选择“已关联帐户”对话框右上方的按钮,按照“添加 Azure 帐户”部分中的相同步骤添加更多 Azure 帐户。

Screenshot of Add another Azure account screen.

删除 Azure 帐户

删除现有的已登录的 Azure 帐户:

  1. 通过左下方的帐户管理图标打开“已关联帐户”对话框 。
  2. 选择 Azure 帐户右侧的“X”按钮将其删除。

Screenshot of Remove Azure account screen.

筛选订阅

登录某个 Azure 帐户后,与该 Azure 帐户关联的所有订阅都将显示在 Azure 视图中。 可以筛选每个 Azure 帐户的订阅。

  1. 选择 Azure 帐户右侧的“选择订阅”按钮。

    Screenshot of Filter subscriptions screen.

  2. 选中要浏览的帐户订阅的复选框,然后选择“确定”。

    Screenshot of Select subscriptions screen.

浏览 Azure SQL 资源

若要在 Azure 视图中导航 Azure SQL 资源,请展开 Azure 帐户和资源类型组。

Azure 视图支持 Azure SQL Server、Azure SQL 数据库、Azure SQL 托管实例、Log Analytics、Cosmos DB for Mongo、Azure Database for MySQL、Azure Database for PostgreSQL、Azure 数据资源管理器群集、专用 SQL 池和 Azure Synapse Analytics。

连接到 Azure SQL 资源

Azure 视图提供快速访问,可帮助你连接到 SQL Server 实例和数据库以进行查询和管理。

  1. 从树状视图中浏览要连接的 SQL 资源。

  2. 右键单击资源并选择“连接”,也可以在资源右侧找到连接按钮。

    Screenshot of Connect to an Azure resource screen.

  3. 在打开的“连接”对话框中,选择适当的身份验证类型,输入身份验证信息,选择是否要将连接添加到服务器组(默认为“<不保存>”),然后选择“连接”。

    Screenshot of Configure Azure connection screen.

  4. 连接成功后,“管理服务器”窗口会自动为连接的 SQL Server/数据库打开。 如果连接已添加到“默认”或现有服务器组,则它将显示在 “连接视图”中。