存储资源管理器入门Get started with Storage Explorer

概述Overview

Azure 存储资源管理器是一款独立应用,可用于在 Windows、macOS 和 Linux 上轻松处理 Azure 存储数据。Azure Storage Explorer is a standalone app that enables you to easily work with Azure Storage data on Windows, macOS, and Linux. 本文介绍如何通过多种方式连接到 Azure 存储帐户并对其进行管理。In this article, you learn several ways of connecting to and managing your Azure storage accounts.

Azure 存储资源管理器

先决条件Prerequisites

以下版本的 Windows 支持 Azure 存储资源管理器:Azure Storage Explorer is supported on the following versions of Windows:

  • Windows 10(推荐)Windows 10 (recommended)
  • Windows 8Windows 8
  • Windows 7Windows 7

对于所有 Windows 版本,都需要 .NET Framework 4.6.2 或更高版本。For all versions of Windows, .NET Framework 4.6.2 or greater is required.

下载并安装Download and install

下载并安装存储资源管理器Download and install Storage Explorer

连接到存储帐户或服务Connect to a storage account or service

存储资源管理器提供多种连接到存储帐户的方式。Storage Explorer provides several ways to connect to storage accounts. 一般情况下,你可以:In general you can either:

登录 AzureSign in to Azure

Note

登录后,存储资源管理器要求拥有管理(Azure 资源管理器)和数据层权限才能全面访问资源。To fully access resources after you sign in, Storage Explorer requires both management (Azure Resource Manager) and data layer permissions. 这意味着,你需要拥有 Azure Active Directory (Azure AD) 权限,可以访问自己的存储帐户、该帐户中的容器以及该容器中的数据。This means that you need Azure Active Directory (Azure AD) permissions, which give you access to your storage account, the containers in the account, and the data in the containers. 如果你仅在数据层拥有权限,请考虑通过 Azure AD 添加资源If you have permissions only at the data layer, consider adding a resource through Azure AD. 若要详细了解存储资源管理器所需的具体权限,请参阅故障排除指南For more information about the specific permissions Storage Explorer requires, see the troubleshooting guide.

  1. 在存储资源管理器中选择“管理帐户”,转到“帐户管理”面板。 In Storage Explorer, select Manage Accounts to go to the Account Management panel.

    管理帐户

  2. 左窗格随即显示已登录的所有 Azure 帐户。The left pane now displays all the Azure accounts you've signed in to. 若要连接到另一个帐户,请选择“添加帐户” 。To connect to another account, select Add an account.

  3. 若要登录到某个国家/地区云或 Azure Stack,请选择“Azure 环境”下拉列表以选择要使用的 Azure 云。 If you want to sign in to a national cloud or an Azure Stack, select the Azure environment drop-down list to choose the Azure cloud you want to use. 选择环境后,选择“登录”按钮。 After you've chosen your environment, select the Sign-in button. 有关详细信息,请参阅将存储资源管理器连接到 Azure Stack 订阅For more information, see Connect Storage Explorer to an Azure Stack subscription.

    登录选项

  4. 使用 Azure 帐户成功登录后,该帐户以及与该帐户关联的 Azure Stack 订阅会添加到左窗格中。After you successfully sign in with an Azure account, the account and the Azure subscriptions associated with that account are added to the left pane. 选择要使用的 Azure 订阅,并选择“应用” 。Select the Azure subscriptions that you want to work with, and then select Apply. (选择“所有订阅”会选择所有列出的 Azure 订阅,或者一个都不选。) (Selecting All subscriptions toggles your selection between all or none of the listed Azure subscriptions.)

    选择 Azure 订阅

    左窗格会显示与所选 Azure 订阅关联的存储帐户。The left pane displays the storage accounts associated with the selected Azure subscriptions.

    选择的 Azure 订阅

附加特定的资源Attach a specific resource

可通过多种方式在存储资源管理器中附加资源:There are multiple ways to attach to a resource in Storage Explorer:

通过 Azure AD 添加资源Add a resource via Azure AD

  1. 选择左侧垂直工具栏上的“连接”按钮打开“连接”对话框: Open the Connect dialog box by selecting the Connect button on the vertical toolbar on the left:

    “连接到 Azure 存储”选项

  2. 使用“添加 Azure 帐户”选项登录到有权访问资源的 Azure 帐户(如果尚未执行此操作)。 If you haven't already done so, use the Add an Azure Account option to sign in to the Azure account that has access to the resource. 登录后,返回到“连接”对话框。 After you sign in, return to the Connect dialog box.

  3. 依次选择“通过 Azure Active Directory (Azure AD)添加资源”、“下一步”。 Select Add a resource via Azure Active Directory (Azure AD), and then select Next.

  4. 选择有权访问所要附加到的存储资源的 Azure 帐户和租户。Select the Azure account and tenant that have access to the Storage resource you want to attach to. 选择“下一步”。Select Next.

  5. 选择要附加的资源类型,然后输入用于建立连接的信息。Choose the resource type you want to attach, and then enter the information needed to connect. 在此页上输入的信息取决于要添加的资源类型。The information you enter on this page depends on what type of resource you're adding. 请确保选择正确的资源类型。Make sure to choose the correct type of resource. 输入所需的信息后,选择“下一步”。 After you've entered the required information, select Next.

  6. 检查连接摘要,确保所有信息正确。Review the connection summary and make sure all the information is correct. 如果正确,请选择“连接”。 If it is, select Connect. 否则,请使用“后退”按钮返回到前一页,以修复任何错误的信息。 Otherwise, use the Back button to return to the previous pages to fix any incorrect information.

成功添加连接后,资源树中将自动打开表示该连接的节点。After the connection is successfully added, the resource tree automatically goes to the node that represents the connection. 如果未打开该节点,请在查看“本地和附加” > “存储帐户” > “(附加的容器)” > “Blob 容器”。 If it doesn't go to that node, look under Local & Attached > Storage Accounts > (Attached Containers) > Blob Containers. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后你无法访问自己的数据,请参阅故障排除指南If Storage Explorer couldn't add your connection, or if you can't access your data after successfully adding the connection, see the troubleshooting guide.

使用连接字符串Use a connection string

  1. 选择左侧垂直工具栏上的“连接”按钮打开“连接”对话框: Open the Connect dialog box by selecting the Connect button on the vertical toolbar on the left:

    “连接到 Azure 存储”选项

  2. 依次选择“使用连接字符串”、“下一步”。 Select Use a connection string, and then select Next.

  3. 选择连接的显示名称,并输入连接字符串。Choose a display name for your connection and enter your connection string. 然后,选择“下一步” 。Then, select Next.

  4. 检查连接摘要,确保所有信息正确。Review the connection summary and make sure all the information is correct. 如果正确,请选择“连接”。 If it is, select Connect. 否则,请使用“后退”按钮返回到前一页,以修复任何错误的信息。 Otherwise, use the Back button to return to the previous pages to fix any incorrect information.

成功添加连接后,资源树中将自动打开表示该连接的节点。After the connection is successfully added, the resource tree automatically goes to the node that represents the connection. 如果未打开该节点,请查看“本地和附加” > “存储帐户”。 If it doesn't go to that node, look under Local & Attached > Storage Accounts. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后你无法访问自己的数据,请参阅故障排除指南If Storage Explorer couldn't add your connection, or if you can't access your data after successfully adding the connection, see the troubleshooting guide.

使用 SAS URIUse a SAS URI

  1. 选择左侧垂直工具栏上的“连接”按钮打开“连接”对话框: Open the Connect dialog box by selecting the Connect button on the vertical toolbar on the left:

    “连接到 Azure 存储”选项

  2. 依次选择“使用共享访问签名(SAS) URI”、“下一步”。 Select Use a shared access signature (SAS) URI, and then select Next.

  3. 选择连接的显示名称,并输入 SAS URI。Choose a display name for your connection and enter your SAS URI. 适用于要附加的资源类型的服务终结点应会自动填充。The service endpoint for the type of resource you're attaching should autofill. 如果使用的是自定义终结点,有可能不会填充该终结点。If you're using a custom endpoint, it's possible it might not. 选择“下一步”。Select Next.

  4. 检查连接摘要,确保所有信息正确。Review the connection summary and make sure all the information is correct. 如果正确,请选择“连接”。 If it is, select Connect. 否则,请使用“后退”按钮返回到前一页,以修复任何错误的信息。 Otherwise, use the Back button to return to the previous pages to fix any incorrect information.

成功添加连接后,资源树中将自动打开表示该连接的节点。After the connection is successfully added, the resource tree automatically goes to the node that represents the connection. 如果未打开该节点,请查看“本地和附加” > “存储帐户” > “(附加的容器)” > 适用于附加容器类型的服务节点。 If it doesn't go to that node, look under Local & Attached > Storage Accounts > (Attached Containers) > the service node for the type of container you attached. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后你无法访问自己的数据,请参阅故障排除指南If Storage Explorer couldn't add your connection, or if you can't access your data after successfully adding the connection, see the troubleshooting guide.

使用名称和密钥Use a name and key

  1. 选择左侧垂直工具栏上的“连接”按钮打开“连接”对话框: Open the Connect dialog box by selecting the Connect button on the vertical toolbar on the left:

    “连接到 Azure 存储”选项

  2. 依次选择“使用存储帐户名和密钥”、“下一步”。 Select Use a storage account name and key, and then select Next.

  3. 选择连接的显示名称。Choose a display name for your connection.

  4. 输入存储帐户名称及其任一访问密钥。Enter your storage account name and either of its access keys.

  5. 选择要使用的存储域,然后选择“下一步”。 Choose the Storage domain to use and then select Next.

  6. 检查连接摘要,确保所有信息正确。Review the connection summary and make sure all the information is correct. 如果正确,请选择“连接”。 If it is, select Connect. 否则,请使用“后退”按钮返回到前一页,以修复任何错误的信息。 Otherwise, use the Back button to return to the previous pages to fix any incorrect information.

成功添加连接后,资源树中将自动打开表示该连接的节点。After the connection is successfully added, the resource tree automatically goes to the node that represents the connection. 如果未打开该节点,请查看“本地和附加” > “存储帐户”。 If it doesn't go to that node, look under Local & Attached > Storage Accounts. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后你无法访问自己的数据,请参阅故障排除指南If Storage Explorer couldn't add your connection, or if you can't access your data after successfully adding the connection, see the troubleshooting guide.

附加到本地仿真器Attach to a local emulator

存储资源管理器目前支持两个官方存储仿真器:Storage Explorer currently supports two official Storage emulators:

如果仿真器侦听默认端口,则你可以使用“仿真器 - 默认端口”节点(可在“本地和附加” > “存储帐户”下找到该节点)来快速访问仿真器。 If your emulator is listening on the default ports, you can use the Emulator - Default Ports node (found under Local & Attached > Storage Accounts) to quickly access your emulator.

若要为连接使用不同的名称,或者仿真器不是在默认端口上运行,请执行以下步骤:If you want to use a different name for your connection, or if your emulator isn't running on the default ports, follow these steps:

  1. 启动仿真器。Start your emulator. 执行此操作时,请记下每种服务类型的仿真器所侦听的端口。When you do, make a note of the ports the emulator is listening on for each service type.

    Important

    存储资源管理器不会自动启动你的仿真器。Storage Explorer doesn't automatically start your emulator. 必须手动启动它。You must start it manually.

  2. 选择左侧垂直工具栏上的“连接”按钮打开“连接”对话框: Open the Connect dialog box by selecting the Connect button on the vertical toolbar on the left:

    “连接到 Azure 存储”选项

  3. 依次选择“附加到本地仿真器”、“下一步”。 Select Attach to a local emulator, and then select Next.

  4. 选择连接的显示名称,并输入每种服务类型的仿真器所侦听的端口。Choose a display name for your connection and enter the ports your emulator is listening on for each service type. 文本框中首先会包含大多数仿真器的默认端口值。The text boxes will start with the default port values for most emulators. “文件端口”框保留空白,因为目前没有任何官方仿真器支持文件服务。 The Files port box is left blank, because neither of the official emulators currently support the Files service. 如果使用的仿真器不支持文件服务,你可以输入所用的端口。If the emulator you're using does support Files, you can enter the port that's being used. 然后,选择“下一步” 。Then, select Next.

  5. 检查连接摘要,确保所有信息正确。Review the connection summary and make sure all the information is correct. 如果正确,请选择“连接”。 If it is, select Connect. 否则,请使用“后退”按钮返回到前一页,以修复任何错误的信息。 Otherwise, use the Back button to return to the previous pages to fix any incorrect information.

成功添加连接后,资源树中将自动打开表示该连接的节点。After the connection is successfully added, the resource tree automatically goes to the node that represents the connection. 如果未打开该节点,请查看“本地和附加” > “存储帐户”。 If it doesn't go to that node, look under Local & Attached > Storage Accounts. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后你无法访问自己的数据,请参阅故障排除指南If Storage Explorer couldn't add your connection, or if you can't access your data after successfully adding the connection, see the troubleshooting guide.

使用连接字符串连接到 Azure Cosmos DB 帐户Connect to an Azure Cosmos DB account by using a connection string

除了通过 Azure 订阅管理 Azure Cosmos DB 帐户以外,还可以使用连接字符串连接到 Azure Cosmos DB。As an alternative to managing Azure Cosmos DB accounts through an Azure subscription, you can also connect to Azure Cosmos DB by using a connection string. 为此,请执行以下步骤:To do this, follow these steps:

  1. 在资源树的左侧,展开“本地和附加”,右键单击“Azure Cosmos DB 帐户”,然后选择“连接到 Azure Cosmos DB”。 On the left side of the resource tree, expand Local and Attached, right-click Azure Cosmos DB Accounts, and select Connect to Azure Cosmos DB.

    通过连接字符串连接到 Azure Cosmos DB

  2. 选择“Azure Cosmos DB API”,输入“连接字符串”数据,然后选择“确定”以连接到 Azure Cosmos DB 帐户。 Select the Azure Cosmos DB API, enter your Connection String data, and then select OK to connect the Azure Cosmos DB account. 有关如何检索连接字符串的信息,请参阅获取连接字符串For information about how to retrieve the connection string, see Get the connection string.

    连接字符串

通过 URI 连接到 Azure Data Lake StoreConnect to Azure Data Lake Store by URI

若要访问不在订阅中的资源,需要请求某个有权访问该资源的人员提供资源 URI。If you want to access a resource that's not in your subscription, you'll need someone who can access that resource to give you the resource URI. 登录后,可以使用该 URI 连接到 Data Lake Store。After you sign in, you can connect to Data Lake Store by using the URI. 为此,请执行以下步骤:To do this, follow these steps:

  1. 打开存储资源管理器。Open Storage Explorer.

  2. 在左窗格中,展开“本地和附加” 。In the left pane, expand Local and Attached.

  3. 右键单击“Data Lake Store”。 Right-click Data Lake Store. 在快捷菜单中,选择“连接到 Data Lake Store”。 From the shortcut menu, select Connect to Data Lake Store.

    “连接到 Data Lake Store”上下文菜单

  4. 输入 URI。Enter the URI. 工具会转到刚刚输入的 URL 位置。The tool goes to the location of the URL that you just entered.

    “连接到 Data Lake Store”上下文对话框

    “连接到 Data Lake Store”操作结果

在存储资源管理器中生成 SASGenerate a SAS in Storage Explorer

帐户级 SASAccount level SAS

  1. 右键单击要共享的存储帐户,并选择“获取共享访问签名”。 Right-click the storage account you want share, and then select Get Shared Access Signature.

    “获取 SAS”上下文菜单选项

  2. 在“生成共享访问签名”对话框中,指定要授予该帐户的时间范围和权限,然后选择“创建”。 In the Generate Shared Access Signature dialog box, specify the time frame and permissions you want for the account, and then select Create.

    “获取 SAS”对话框

  3. 现在可将“连接字符串”或原始“查询字符串”复制到剪贴板。 You can now copy either the Connection string or the raw Query string to your clipboard.

服务级 SASService level SAS

如何在存储资源管理器中获取 Blob 容器的 SASHow to get a SAS for a blob container in Storage Explorer

搜索存储帐户Search for storage accounts

如果需要查找某个存储资源并且不知道它的所在位置,可以使用左窗格顶部的搜索框来搜索该资源。If you need to find a storage resource and don't know where it is, you can use the search box at the top of the left pane to search for the resource.

在搜索框中键入内容时,左窗格会显示与当前已输入搜索值匹配的所有资源。As you type in the search box, the left pane displays all resources that match the search value you've entered up to that point. 例如,以下屏幕截图显示了“终结点”的搜索结果: For example, a search for endpoints is shown in the following screenshot:

存储帐户搜索

Note

若要加快搜索速度,请使用“帐户管理”面板取消选择不包含所要搜索的项的订阅。To speed up your search, use the Account Management panel to deselect any subscriptions that don't contain the item you're searching for. 还可以右键单击某个节点,然后选择“从此处搜索”,从特定的节点开始搜索。 You can also right-click a node and select Search From Here to start searching from a specific node.

后续步骤Next steps