您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

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

概述Overview

Microsoft Azure 存储资源管理器是一款独立应用,可用于在 Windows、macOS 和 Linux 上轻松处理 Azure 存储数据。Microsoft Azure Storage Explorer is a standalone app that makes it easy to work with Azure Storage data on Windows, macOS, and Linux. 在本文中,你将了解连接和管理 Azure 存储帐户的几种方法。In this article, you'll learn several ways of connecting to and managing your Azure storage accounts.

Microsoft Azure 存储资源管理器

先决条件Prerequisites

以下 Windows 版本支持存储资源管理器: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 later 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

备注

若要在登录后完全访问资源,存储资源管理器需要管理(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 订阅或不在列出的任何 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.

    重要

    存储资源管理器不会自动启动模拟器。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 StoreRight-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:

存储帐户搜索

备注

若要加快搜索速度,请使用 "帐户管理" 面板取消选择不包含所要搜索的项的订阅。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