您现在访问的是微软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 支持存储资源管理器:The following versions of Windows support Storage Explorer:

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

对于所有版本的 Windows,存储资源管理器需要 .NET Framework 4.6.2 或更高版本。For all versions of Windows, Storage Explorer requires .NET Framework 4.6.2 or later.

下载并安装Download and install

若要下载并安装存储资源管理器,请参阅Azure 存储资源管理器To download and install Storage Explorer, see Azure 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. 有关存储资源管理器要求的特定权限的详细信息,请参阅Azure 存储资源管理器故障排除指南For more information about the specific permissions Storage Explorer requires, see the Azure Storage Explorer troubleshooting guide.

  1. 在存储资源管理器中,选择 "查看 > 帐户管理",或选择 "管理帐户" 按钮。In Storage Explorer, select View > Account Management or select the Manage Accounts button.

    管理帐户

  2. 帐户管理现在显示你已登录到的所有 Azure 帐户。ACCOUNT MANAGEMENT now displays all the Azure accounts you've signed in to. 若要连接到另一个帐户,请选择“添加帐户”。To connect to another account, select Add an account.

  3. 在 "连接到 Azure 存储" 中,从azure 环境中选择一个 azure 云,以便登录到全国云或 Azure Stack。In Connect to Azure Storage, select an Azure cloud from Azure environment to sign in to a national cloud or an Azure Stack. 选择环境后,选择 "下一步"。After you choose your environment, select Next.

    用于登录的选项

    存储资源管理器将打开一个用于登录的页面。Storage Explorer opens a page for you to sign in. 有关详细信息,请参阅将存储资源管理器连接到 Azure Stack 订阅或存储帐户For more information, see Connect storage explorer to an Azure Stack subscription or storage account.

  4. 使用 Azure 帐户成功登录后,将在 "帐户管理" 下显示与该帐户关联的帐户和 Azure 订阅。After you successfully sign in with an Azure account, the account and the Azure subscriptions associated with that account appear under ACCOUNT MANAGEMENT. 选择 "所有订阅" 可在所有列出的 Azure 订阅之间切换所选内容。Select All subscriptions to toggle your selection between all or none of the listed Azure subscriptions. 选择要使用的 Azure 订阅,并选择“应用”。Select the Azure subscriptions that you want to work with, and then select Apply.

    选择 Azure 订阅

    资源管理器显示与所选 Azure 订阅关联的存储帐户。EXPLORER displays the storage accounts associated with the selected Azure subscriptions.

    选择的 Azure 订阅

附加特定的资源Attach a specific resource

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

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

  1. 选择 "连接" 符号,打开 "连接到 Azure 存储"。Select the Connect symbol to open Connect to Azure Storage.

    “连接到 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. 登录后,返回以连接到 Azure 存储After you sign in, return to Connect to Azure Storage.

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

  4. 选择 "Azure 帐户" 和 "租户"。Select an Azure account and tenant. 这些值必须具有对要附加到的存储资源的访问权限。These values must have access to the Storage resource you want to attach to. 选择“下一步”。Select Next.

  5. 选择要附加的资源类型。Choose the resource type you want to attach. 输入连接所需的信息。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 to make sure all the information is correct. 如果正确,请选择“连接”。If it is, select Connect. 否则,选择 "上一步" 返回到前一页,修复所有不正确的信息。Otherwise, select Back to return to the previous pages to fix any incorrect information.

成功添加连接后,资源树将转到表示连接的节点。After the connection is successfully added, the resource tree goes to the node that represents the connection. 资源显示在 "本地 & " 下,附加 > 存储帐户 > (附加容器) > Blob 容器The resource appears under Local & Attached > Storage Accounts > (Attached Containers) > Blob Containers. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后无法访问你的数据,请参阅Azure 存储资源管理器故障排除指南If Storage Explorer couldn't add your connection, or if you can't access your data after successfully adding the connection, see the Azure Storage Explorer troubleshooting guide.

使用连接字符串Use a connection string

  1. 选择 "连接" 符号,打开 "连接到 Azure 存储"。Select the Connect symbol to open Connect to Azure Storage.

    “连接到 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 to make sure all the information is correct. 如果正确,请选择“连接”。If it is, select Connect. 否则,选择 "上一步" 返回到前一页,修复所有不正确的信息。Otherwise, select Back to return to the previous pages to fix any incorrect information.

成功添加连接后,资源树将转到表示连接的节点。After the connection is successfully added, the resource tree goes to the node that represents the connection. 资源显示在 "本地 & 附加 > 存储帐户" 下。The resource appears under Local & Attached > Storage Accounts. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后无法访问你的数据,请参阅Azure 存储资源管理器故障排除指南If Storage Explorer couldn't add your connection, or if you can't access your data after successfully adding the connection, see the Azure Storage Explorer troubleshooting guide.

使用共享访问签名 URIUse a shared access signature URI

  1. 选择 "连接" 符号,打开 "连接到 Azure 存储"。Select the Connect symbol to open Connect to Azure Storage.

    “连接到 Azure 存储”选项

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

  3. 为连接选择一个显示名称,然后输入共享访问签名 URI。Choose a display name for your connection and enter your shared access signature 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 to make sure all the information is correct. 如果正确,请选择“连接”。If it is, select Connect. 否则,选择 "上一步" 返回到前一页,修复所有不正确的信息。Otherwise, select Back to return to the previous pages to fix any incorrect information.

成功添加连接后,资源树将转到表示连接的节点。After the connection is successfully added, the resource tree goes to the node that represents the connection. 资源会显示在 "本地 & " 下,附加 > 存储帐户" > (附加容器) > 已附加容器类型的" 服务 "节点The resource appears under Local & Attached > Storage Accounts > (Attached Containers) > the service node for the type of container you attached. 如果存储资源管理器无法添加你的连接,请参阅Azure 存储资源管理器故障排除指南If Storage Explorer couldn't add your connection, see the Azure Storage Explorer troubleshooting guide. 如果你在成功添加连接后无法访问你的数据,请参阅故障排除指南。See the troubleshooting guide if you can't access your data after successfully adding the connection.

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

  1. 选择 "连接" 符号,打开 "连接到 Azure 存储"。Select the Connect symbol to open Connect to Azure Storage.

    “连接到 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 to make sure all the information is correct. 如果正确,请选择“连接”。If it is, select Connect. 否则,选择 "上一步" 返回到前一页,修复所有不正确的信息。Otherwise, select Back to return to the previous pages to fix any incorrect information.

成功添加连接后,资源树将转到表示连接的节点。After the connection is successfully added, the resource tree goes to the node that represents the connection. 资源显示在 "本地 & 附加 > 存储帐户" 下。The resource appears under Local & Attached > Storage Accounts. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后无法访问你的数据,请参阅Azure 存储资源管理器故障排除指南If Storage Explorer couldn't add your connection, or if you can't access your data after successfully adding the connection, see the Azure Storage Explorer 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 to access your emulator. 在 "本地 & " 下 > 存储帐户"下查找模拟器默认端口Look for Emulator - Default Ports under Local & Attached > Storage Accounts.

若要为连接使用不同的名称,或者仿真器不是在默认端口上运行,请执行以下步骤: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. 输入命令 AzureStorageEmulator.exe status 显示每种服务类型的端口。Enter the command AzureStorageEmulator.exe status to display the ports for each service type.

    重要

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

  2. 选择 "连接" 符号,打开 "连接到 Azure 存储"。Select the Connect symbol to open Connect to Azure Storage.

    “连接到 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. 附加到本地模拟器会为大多数模拟器推荐默认端口值。Attach to a Local Emulator suggests the default port values for most emulators. 文件端口为空白,因为这两个官方仿真器当前均不支持文件服务。Files port is 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 to use. 然后,选择“下一步”。Then, select Next.

  5. 查看连接摘要,确保所有信息均正确。Review the Connection Summary and make sure all the information is correct. 如果正确,请选择“连接”。If it is, select Connect. 否则,选择 "上一步" 返回到前一页,修复所有不正确的信息。Otherwise, select Back to return to the previous pages to fix any incorrect information.

成功添加连接后,资源树将转到表示连接的节点。After the connection is successfully added, the resource tree goes to the node that represents the connection. 节点应出现在 "本地 & " 下,附加 > 存储帐户The node should appear under Local & Attached > Storage Accounts. 如果存储资源管理器无法添加你的连接,或者在成功添加连接后无法访问你的数据,请参阅Azure 存储资源管理器故障排除指南If Storage Explorer couldn't add your connection, or if you can't access your data after successfully adding the connection, see the Azure Storage Explorer troubleshooting guide.

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

可以使用连接字符串连接到 Azure Cosmos DB,而不是通过 Azure 订阅管理 Azure Cosmos DB 帐户。Instead of managing Azure Cosmos DB accounts through an Azure subscription, you can connect to Azure Cosmos DB by using a connection string. 若要连接,请执行以下步骤:To connect, follow these steps:

  1. 在 "资源管理器" 下,展开 "本地 & 附加",右键单击Cosmos DB 帐户",然后选择"连接到 Azure Cosmos DB"。Under EXPLORER, expand Local & Attached, right-click 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. 有关如何检索连接字符串的信息,请参阅管理 Azure Cosmos 帐户For information about how to retrieve the connection string, see Manage an Azure Cosmos account.

    连接字符串

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

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

  1. 资源管理器下,展开 "本地 & 附加"。Under EXPLORER, expand Local & Attached.

  2. 右键单击Data Lake Storage Gen1,然后选择 "连接到 Data Lake Storage Gen1"。Right-click Data Lake Storage Gen1, and select Connect to Data Lake Storage Gen1.

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

  3. 输入 URI,然后选择 "确定"Enter the URI, and then select OK. Data Lake Store 显示在 " Data Lake Storage下。Your Data Lake Store appears under Data Lake Storage.

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

此示例使用 Data Lake Storage Gen1。This example uses Data Lake Storage Gen1. Azure Data Lake Storage Gen2 现已可用。Azure Data Lake Storage Gen2 is now available. 有关详细信息,请参阅什么是 Azure Data Lake Storage Gen1For more information, see What is Azure Data Lake Storage Gen1.

在存储资源管理器中生成共享访问签名Generate a shared access signature in Storage Explorer

帐户级别共享访问签名Account level shared access signature

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

    "获取共享访问签名" 上下文菜单选项

  2. 在 "共享访问签名" 中,为帐户指定所需的时间范围和权限,然后选择 "创建"。In Shared Access Signature, specify the time frame and permissions you want for the account, and then select Create.

    获取共享访问签名

  3. 连接字符串或原始查询字符串复制到剪贴板。Copy either the Connection string or the raw Query string to your clipboard.

服务级别共享访问签名Service level shared access signature

你可以在服务级别获取共享访问签名。You can get a shared access signature at the service level. 有关详细信息,请参阅获取 blob 容器的 SASFor more information, see Get the SAS for a blob container.

搜索存储帐户Search for storage accounts

若要查找存储资源,可以在 "资源管理器" 窗格中进行搜索。To find a storage resource, you can search in the EXPLORER pane.

当您在 "搜索" 框中输入文本时,存储资源管理器将显示与您在该点之前输入的搜索值匹配的所有资源。As you enter text in the search box, Storage Explorer displays all resources that match the search value you've entered up to that point. 此示例演示如何搜索终结点This example shows a search for endpoints:

存储帐户搜索

备注

若要加快搜索速度,请使用帐户管理取消选择不包含所要搜索的项的订阅。To speed up your search, use Account Management 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