開始使用儲存體總管Get started with Storage Explorer

04/22/2019

參與者

本文內容

概觀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 訂用帳戶或在國家 Azure 雲端下的儲存體資源。Attach to external storage: Manage storage resources that belong to another Azure subscription or that are under national Azure clouds by using the storage account's name, key, and endpoints.

使用 SAS 連結服務：使用 SAS，管理屬於另一個 Azure 訂用帳戶的特定儲存體服務 (Blob 容器、佇列或資料表)。Attach a service by using an SAS: Manage a specific storage service (blob container, queue, or table) that belongs to another Azure subscription by using an SAS.

左窗格現在會顯示您已登入的所有 Azure 帳戶。The left pane now displays all the Azure accounts you've signed in to.若要連線到另一個帳戶，請選取 [新增帳戶]To connect to another account, select Add an account

如果您要登入國家雲端或 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.

使用 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).

使用本機開發儲存體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 之儲存體模擬器的使用者，有一個選擇是社群維護的開放原始碼儲存體模擬器 Azurite。For 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.

設定您選擇用來接聽未使用連接埠的模擬器。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

啟動模擬器。Start the emulator.

重要

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

為您先前設定的服務輸入連接埠號碼 (如果您不想要使用該服務，將保留為空白)。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.

您可以使用此節點來建立及使用本機 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:

附加至外部儲存體帳戶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.

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

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

為了說明此案例，我們假設 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:

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

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

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

在 [產生共用存取簽章] 對話方塊中，指定您要用於此帳戶的時間範圍和權限，然後按一下 [建立] 按鈕。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.

選取 [查詢字串] 文字方塊旁的 [複製]，將它複製到剪貼簿，然後按一下 [關閉]。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

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

選取 [ 連接]。Select Connect.

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

使用共用存取簽章 (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:

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

選取 [ 連接]。Select Connect.

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

使用連接字串連線到 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.

如果您想要取得資源的存取權，而這些資源不存在於您的訂用帳戶中，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.

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

搜尋儲存體帳戶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.