開始使用儲存體總管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.

Microsoft 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 Storage Explorer

連接到儲存體帳戶或服務Connect to a storage account or service

儲存體總管提供數種方式來連線至儲存體帳戶。Storage Explorer provides several ways to connect to storage accounts. 例如,您可以:For example, you can:

  • 連線至與您的 Azure 訂用帳戶相關聯的儲存體帳戶。Connect to storage accounts associated with your Azure subscriptions.
  • 連線至從其他 Azure 訂用帳戶共用的儲存體帳戶和服務。Connect to storage accounts and services that are shared from other Azure subscriptions.
  • 使用 Azure 儲存體模擬器連線到本機儲存體並加以管理。Connect to and manage local storage by using the Azure Storage Emulator.

此外,您可以使用全球和國家 Azure 中的儲存體帳戶:In addition, you can work with storage accounts in global and national Azure:

連線到 Azure 訂用帳戶Connect to an Azure subscription

注意

如果您沒有 Azure 帳戶,可以申請免費試用,或是啟用自己的 Visual Studio 訂閱者權益If you don't have an Azure account, you can sign up for a free trial or activate your Visual Studio subscriber benefits.

  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 into a national cloud or an Azure Stack, click on the Azure environment dropdown to select which Azure cloud you want to use. 選擇您的環境後,按一下 [登入...] 按鈕。Once you have chosen your environment, click the Sign in... button. 如果您要登入 Azure Stack,請參閱將儲存體總管連線到 Azure Stack 訂用帳戶以取得詳細資訊。If you are signing in to Azure Stack, see Connect Storage Explorer to an Azure Stack subscription for more information.

    登入選項

  4. 使用 Azure 帳戶成功登入後,左窗格中會新增該帳戶以及與該帳戶相關聯的 Azure 訂用帳戶。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 訂用帳戶,然後選取 [套用] (選取 [所有訂用帳戶:] 切換方塊,可選取全部或不選取任何列出的 Azure 訂用帳戶)。Select the Azure subscriptions that you want to work with, and then select Apply (Selecting All subscriptions: toggles selecting all or none of the listed Azure subscriptions).

    選取 Azure 訂用帳戶

    左窗格會顯示與所選 Azure 訂用帳戶相關聯的儲存體帳戶。The left pane displays the storage accounts associated with the selected Azure subscriptions.

    已選取的 Azure 訂用帳戶

使用本機開發儲存體Work with local development storage

透過儲存體總管,您可以使用模擬器來處理本機儲存體。With Storage Explorer, you can work with local storage by using an emulator. 此方法可讓您模擬使用 Azure 儲存體,而不需在 Azure 上部署儲存體帳戶。This approach lets you simulate working with Azure Storage without necessarily having a storage account deployed on Azure.

從 1.1.0 版開始,儲存體總管支援所有平台上使用本機儲存體模擬器。Starting with version 1.1.0, Storage Explorer supports using a local storage emulator on all platforms. 儲存體總管連線至接聽預設本機儲存體端點的任何模擬服務。Storage Explorer can connect to any emulated service listening to its default local storage endpoints.

Azure 儲存體模擬器目前只能在 Windows 上執行。The Azure storage emulator currently runs only on Windows. 針對考慮適用於 Linux 之儲存體模擬器的使用者,有一個選擇是社群維護的開放原始碼儲存體模擬器 AzuriteFor those considering a storage emulator for Linux, one option is the community maintained, open source storage emulator Azurite.

注意

儲存體服務和功能的支援可能會隨著您所選擇的模擬器而有很大的不同。Support for storage services and features may vary widely depending on your choice of emulator. 請確定您的模擬器支援您想要使用的服務和功能。Make sure your emulator supports the services and features you intend to work with.

  1. 設定您選擇用來接聽未使用連接埠的模擬器。Configure the services of your emulator of choice to listen to an unused port.

    模擬的服務Emulated Service 預設端點Default Endpoint
    BlobBlobs http://127.0.0.1:10000
    佇列Queues http://127.0.0.1:10001
    資料表Tables http://127.0.0.1:10002
  2. 啟動模擬器。Start the emulator.

    重要

    儲存體總管不會自動啟動您的模擬器。Storage Explorer does not automatically start your emulator. 您必須自行加以啟動。You must start it yourself.

  3. 在 [儲存體總管] 中,按一下 [新增帳戶] 按鈕。In Storage Explorer, click the Add Account button. 選取 [附加到本機模擬器],然後按 [下一步]。Select Attach to a local emulator and click Next.

  4. 為您先前設定的服務輸入連接埠號碼 (如果您不想要使用該服務,將保留為空白)。Enter the port numbers for the services you configured above (leave blank if you don't intend to use that service). 按 [下一步],然後按一下 [連線] 以建立連線。Click Next then Connect to create the connection.

  5. 展開 [本機與已連結的資源] > [儲存體帳戶] > 節點,然後展開與您的模擬器連線相對應的節點下方的服務節點。Expand the Local & Attached > Storage Accounts > nodes, then expand the service nodes underneath the node corresponding to your emulator connection.

    您可以使用此節點來建立及使用本機 Blob、佇列和資料表。You can use this node to create and work with local blobs, queues, and tables. 若要了解如何使用每個儲存體帳戶類型,請參閱下列指南:To learn how to work with each storage account type, refer to the following guides:

附加或卸離外部儲存體帳戶Attach or detach an external storage account

使用儲存體總管,您可以連結至外部儲存體帳戶,因此可以輕鬆地共用儲存體帳戶。With Storage Explorer, you can attach to external storage accounts so that storage accounts can be easily shared. 本節說明如何附加至 (及卸離) 外部儲存體帳戶。This section explains how to attach to (and detach from) external storage accounts.

取得儲存體帳戶認證Get the storage account credentials

若要共用外部儲存體帳戶,該帳戶的擁有者必須先取得帳戶的認證 (帳戶名稱和金鑰),然後與想要連結至所述帳戶的人員分享該資訊。To share an external storage account, the owner of that account must first get the credentials (account name and key) for the account and then share that information with the person who wants to attach to said account. 執行下列步驟,即可透過 Azure 入口網站取得儲存體帳戶認證:You can obtain the storage account credentials via the Azure portal by doing the following steps:

  1. 登入 Azure 入口網站Sign in to the Azure portal.

  2. 選取 [瀏覽] 。Select Browse.

  3. 選取 [儲存體帳戶] 。Select Storage Accounts.

  4. 在 [儲存體帳戶] 清單中,選取所需的儲存體帳戶。In the list of Storage Accounts, select the desired storage account.

  5. 在 [設定] 底下,選取 [存取金鑰]。Under Settings, select Access keys.

    存取金鑰選項

  6. 複製 [儲存體帳戶名稱] 和 [金鑰1]。Copy the Storage account name and key1.

    存取金鑰

附加至外部儲存體帳戶Attach to an external storage account

若要附加到某个外部存储帐户,需要该帐户的名称和密钥。To attach to an external storage account, you need the account's name and key. 「取得儲存體帳戶認證」一節說明如何從 Azure 入口網站取得這些值。The "Get the storage account credentials" section explains how to obtain these values from the Azure portal. 不過,在入口網站中,帳戶金鑰稱為 [金鑰1]。However, in the portal, the account key is called key1. 因此,當儲存體總管要求帳戶金鑰時,您可輸入 [金鑰 1] 值。So, when Storage Explorer asks for an account key, you enter the key1 value.

  1. 在儲存體總管中,開啟 [連線對話方塊]。In Storage Explorer, open the Connect Dialog.

    連接至 Azure 儲存體選項

  2. 在 [連線對話方塊] 中,選擇 [使用儲存體帳戶名稱和金鑰]In the Connect Dialog, choose Use a storage account name and key

    使用名稱和金鑰選項進行新增

  3. 在 [帳戶名稱] 文字方塊中貼上您的帳戶名稱,以及在 [帳戶金鑰] 文字方塊中貼上您的帳戶金鑰 (來自 Azure 入口網站的 [金鑰1] 值),然後選取 [下一步]。Paste your account name in the Account name text box, and paste your account key (the key1 value from the Azure portal) into the Account key text box, and then select Next.

    名稱和金鑰頁面

    注意

    若要使用來自國家雲端的名稱和金鑰,請使用 [儲存體端點網域:] 下拉式清單來選取適當的端點網域:To use a name and key from a national cloud, use the Storage endpoints domain: dropdown to select the appropriate endpoints domain:

  4. 在 [連線摘要] 對話方塊中,確認資訊。In the Connection Summary dialog box, verify the information. 如果您想要變更任何項目,請選取 [上一頁] ,並重新輸入所需的設定。If you want to change anything, select Back and reenter the desired settings.

  5. 選取 [ 連接]。Select Connect.

  6. 成功連結儲存體帳戶之後,顯示的儲存體帳戶會在其名稱後面附加 (外部)After the storage account has successfully been attached, the storage account is displayed with (External) appended to its name.

    連接至外部儲存體帳戶的結果

從外部儲存體帳戶卸離Detach from an external storage account

  1. 以滑鼠右鍵按一下您要卸離的外部儲存體帳戶,然後選取 [卸離]。Right-click the external storage account that you want to detach, and then select Detach.

    “从存储分离”选项

  2. 在確認訊息中,選取 [是] 以確認從外部儲存體帳戶卸離。In the confirmation message, select Yes to confirm the detachment from the external storage account.

使用共用存取簽章 (SAS) 連結儲存體帳戶Attach a storage account by using a Shared Access Signature (SAS)

共用存取簽章 (或 SAS) 可讓 Azure 訂用帳戶的系統管理員授與儲存體帳戶的暫時存取權,而不需提供 Azure 訂用帳戶認證。A Shared Access Signature, or SAS, lets the admin of an Azure subscription grant temporary access to a storage account without having to provide Azure subscription credentials.

為了說明此案例,我們假設 UserA 是 Azure 訂用帳戶的系統管理員,而且 UserA 想要允許 UserB 在有限的時間內使用特定權限存取儲存體帳戶:To illustrate this scenario, let's say that UserA is an admin of an Azure subscription, and UserA wants to allow UserB to access a storage account for a limited time with certain permissions:

  1. UserA 可在特定期間內使用所需的權限產生 SAS 連接字串。UserA generates a SAS connection string for a specific time period and with the desired permissions.

  2. UserA 可與想要存取儲存體帳戶的人員 (在本例中為 UserB) 共用 SAS。UserA shares the SAS with the person (UserB, in this example) who wants access to the storage account.

  3. UserB 可透過儲存體總管,使用所提供的 SAS 來連結至屬於 UserA 的帳戶。UserB uses Storage Explorer to attach to the account that belongs to UserA by using the supplied SAS.

針對您要共用的帳戶產生 SAS 查詢字串Generate a SAS query string for the account you want to share

  1. 在儲存體總管中,以滑鼠右鍵按一下您要共用的儲存體帳戶,然後選取 [取得共用存取簽章]。In Storage Explorer, 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 that you want for the account, and then click the Create button.

    取得 SAS 對話方塊

  3. 選取 [查詢字串] 文字方塊旁的 [複製],將它複製到剪貼簿,然後按一下 [關閉]。Next to the Query String text box, select Copy to copy it to your clipboard, and then click Close.

使用 SAS 連接字串連結儲存體帳戶Attach to a storage account by using a SAS Connection String

  1. 在儲存體總管中,開啟 [連線對話方塊]。In Storage Explorer, open the Connect Dialog.

    連接至 Azure 儲存體選項

  2. 在 [連線對話方塊] 對話方塊中,選擇 [使用連接字串或共用存取簽章 URI],然後按 [下一步]。In the Connect Dialog dialog, choose Use a connection string or shared access signature URI and then click Next.

    連線至 Azure 儲存體對話方塊

  3. 選擇 [使用連接字串] 並且在 [連接字串:] 欄位中貼上您的連接字串。Choose Use a connection string and paste your connection string into the Connection string: field. 按 [下一步] 按鈕。Click the Next button.

    連線至 Azure 儲存體對話方塊

  4. 在 [連線摘要] 對話方塊中,確認資訊。In the Connection Summary dialog box, verify the information. 若要進行變更,請選取 [上一頁],然後輸入您想要的設定。To make changes, select Back, and then enter the settings you want.

  5. 選取 [ 連接]。Select Connect.

  6. 成功連結儲存體帳戶之後,顯示的儲存體帳戶會在其名稱後面附加 (SAS)After the storage account has successfully been attached, the storage account is displayed with (SAS) appended to its name.

    使用 SAS 連結至帳戶的結果

使用共用存取簽章 (SAS) 連結服務Attach a service by using a Shared Access Signature (SAS)

「使用 SAS 連結儲存體帳戶」一節說明 Azure 訂用帳戶系統管理員如何藉由產生及共用儲存體帳戶的 SAS,來授與儲存體帳戶的暫存存取權。The "Attach a storage account by using a SAS" section explains how an Azure subscription admin can grant temporary access to a storage account by generating and sharing a SAS for the storage account. 同樣地,可以針對儲存體帳戶內的特定服務 (Blob 容器、佇列、資料表或檔案共用) 產生 SAS。Similarly, a SAS can be generated for a specific service (blob container, queue, table, or file share) within a storage account.

針對您要共用的服務產生 SASGenerate an SAS for the service that you want to share

在此情況下,服務可以是 Blob 容器、佇列、資料表或檔案共用。In this context, a service can be a blob container, queue, table, or file share. 若要產生所列服務的 SAS,請參閱︰To generate the SAS for a listed service, see:

使用 SAS URI 連結至共用帳戶服務Attach to the shared account service by using a SAS URI

  1. 在儲存體總管中,開啟 [連線對話方塊]。In Storage Explorer, open the Connect Dialog.

    連接至 Azure 儲存體選項

  2. 在 [連線對話方塊] 對話方塊中,選擇 [使用連接字串或共用存取簽章 URI],然後按 [下一步]。In the Connect Dialog dialog box, choose Use a connection string or shared access signature URI and then click Next.

    連線至 Azure 儲存體對話方塊

  3. 選擇 [使用 SAS URI] 並且在 [URI:] 欄位中貼上您的 URI。Choose Use a SAS URI and paste your URI into the URI: field. 按 [下一步] 按鈕。Click the Next button.

    連線至 Azure 儲存體對話方塊

  4. 在 [連線摘要] 對話方塊中,確認資訊。In the Connection Summary dialog box, verify the information. 若要進行變更,請選取 [上一頁],然後輸入您想要的設定。To make changes, select Back, and then enter the settings you want.

  5. 選取 [ 連接]。Select Connect.

  6. 成功連結服務之後,此服務會顯示在 [(SAS 連結的服務)] 節點之下。After the service is successfully attached, the service is displayed under the (SAS-Attached Services) node.

    使用 SAS 連結至共用服務的結果

使用連接字串連線到 Azure Cosmos DB 帳戶Connect to an Azure Cosmos DB account by using a connection string

除了透過 Azure 訂用帳戶管理 Azure Cosmos DB 帳戶,另一種連線到 Azure Cosmos DB 的方法是使用連接字串。Besides manage Azure Cosmos DB accounts through Azure subscription, an alternative way of connecting to an Azure Cosmos DB is to use a connection string. 使用下列步驟來使用連接字串進行連線。Use the following steps to connect using a connection string.

  1. 在左邊的樹狀目錄中尋找 [Local and Attached] (本機與已連結),以滑鼠右鍵按一下 [Azure Cosmos DB 帳戶],選擇 [連線到 Azure Cosmos DB...]Find Local and Attached in the left tree, right-click Azure Cosmos DB Accounts, choose Connect to Azure Cosmos DB...

    透過連接字串連線到 Azure Cosmos DB

  2. 選擇 Azure Cosmos DB API,貼上您的 [連接字串],然後按一下 [確定] 以連接 Azure Cosmos DB 帳戶。Choose Azure Cosmos DB API, paste your Connection String, and then click OK to connect Azure Cosmos DB account. 如需擷取連接字串的資訊,請參閱取得連接字串For information on retrieving the connection string, see Get the connection string.

    connection-string

以 URI 連線至 Azure Data Lake StoreConnect to Azure Data Lake Store by URI

如果您想要取得資源的存取權,而這些資源不存在於您的訂用帳戶中,If you want to get access to the resources, which do not exist in your subscription. 但他人授權給您取得資源的 URI。But others grant you to get the Uri for the resources. 在此情況下,您可以在登入後使用 URI 連線至 Data Lake Store。In this case, you can connect to Data Lake Store using the Uri after you have signed in. 請參閱下列步驟。Refer to following steps.

  1. 開啟儲存體總管。Open Storage Explorer.

  2. 在左窗格中,展開 [本機與已連結的資源]。In the left pane, expand Local and Attached.

  3. 以滑鼠右鍵按一下 Data Lake Store,然後從內容功能表中選取 [連線至 Data Lake Store...]。Right-click Data Lake Store, and - from the context menu - select Connect to Data Lake Store....

    連線至 Data Lake Store 內容功能表

  4. 輸入 URI,工具即會瀏覽至您剛才輸入的 URL 位置。Enter the Uri, then the tool navigates to the location of the URL you just entered.

    連線至 Data Lake Store 內容對話方塊

    連線至 Data Lake Store 結果

搜尋儲存體帳戶Search for storage accounts

如果您需要尋找儲存體資源,但不知道其所在位置,您可以使用左窗格頂端的搜尋方塊來搜尋此資源。If you need to find a storage resource and do not 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:

儲存體帳戶搜尋

注意

使用 [帳戶管理面板] 來取消選取任何不包含您要搜尋之項目的訂用帳戶,以改善搜尋的執行時間。Use the Account Management Panel to deselect any subscriptions that do not contain the item you are searching for to improve the execution time of your search. 您也可以在節點上按一下滑鼠右鍵,並選擇 [從這裡搜尋] 以從特定節點開始搜尋。You can also right-click on a node and choose Search From Here to start searching from a specific node.

後續步驟Next steps