開始使用 Power BI 閘道Getting started with Power BI gateways

歡迎使用開始使用 Power BI 閘道指南。Welcome to the Getting started with Power BI gateways guide. 這個簡短逐步解說會帶領您了解閘道的作用、其運作方式,以及如何安裝、設定和執行專屬閘道。This short walk-through gets you acquainted with what a gateway does, how it works, and how to get your own gateway installed, configured, and running.

閘道可以是技術主體,並且,因為每個網路和企業都不同,所以閘道可能十分複雜。Gateways can be a technical subject, and since every network and enterprise is different, the complexity of gateways can be significant. 為了不要造成這種複雜性,請從基本概念開始。To keep that complexity at bay, let’s start with the basics.

Power BI 閘道運作方式How Power BI gateways work

閘道是一種軟體,可針對雲端服務中的後續使用 (例如 Power BI),方便存取私用內部部署網路上的資料。A gateway is software that facilitates access to data that resides on a private, on-premises network, for subsequent use in a cloud service like Power BI. 它就像接聽連線要求的閘道管理員,並且只有在使用者的要求符合特定準則時才會授與它們 (例如是否允許它們使用閘道)。It’s like a gatekeeper that listens for connection requests, and grants them only when a users’ requests meet certain criteria (such as whether they’re allowed to use the gateway). 這可讓組織將資料庫和倉儲保留在其內部部署網路上,但可安全地使用該資料的子集,以在 Power BI 中建立吸引人的報表和儀表板。This lets organizations leave databases and warehouses on their on-premises networks, yet securely use subsets of that data to create compelling reports and dashboards in Power BI.

閘道也會加密和壓縮所有通過它的資料來保護安全的存取權和資料,以及用來連接至資料來源的任何密碼。A gateway also secures access and data by encrypting and compressing all data that passes through it, as well as any passwords used to connect to data sources. 我相信這聽起來十分簡單明瞭,但需要考量許多詳細資料。All this sounds straightforward I’m sure, but there are many details to consider.

您有時只想要有專屬閘道;您可能有大型 Excel 活頁簿以及三個包含數年執行銷售和行銷資料的 SQL 資料庫,而且您想要建立 Power BI 儀表板來顯示每個角度的銷售。Sometimes you want a gateway just for you – maybe you have a big Excel workbook plus three SQL databases with years of running sales and marketing data, and you want to create a Power BI dashboard that shows those sales from every angle. 您是唯一會建立報表的人員、它是 Excel 活頁簿,而且只有您才能使用這些資料庫來建立 Power BI 報表。You’re the only person who creates reports, it’s your Excel workbook, and only you use those databases to create Power BI reports. 您只需要一個閘道供您個人使用,而不需要與其他人共用這些資料來源。You just need a gateway for your personal use, not to share those data sources with everyone else.

其他時候,您的組織可能會有不同廠商的各種資料庫 (包括 Analysis Services、SAP、Oracle、IBM 和其他各種資料來源),而您需要許多人可以存取它們以建立許多報表。Other times, you might be in an organization with all sorts of databases from different vendors, including Analysis Services, SAP, Oracle, IBM, and various other data sources, and you need lots of people to access them, so they can create multitudes of reports. 在此情況下,您需要可讓您設定所有這些來源之存取權的閘道,接著需要與組織中的許多人共用。In this case, you need a gateway that lets you configure access to all those sources, and then you need to share it with many people in your organization. 這完全是不同類型的閘道。That’s a different kind of gateway altogether.

幸好,Power BI 提供兩個閘道,並且針對所有這些案例進行調整。Fortunately, Power BI offers two gateways, fitting each of those scenarios well. Power BI 的這兩個閘道供應項目如下︰These two gateway offerings from Power BI are the following:

  • 內部部署資料閘道 (個人模式) - 可讓一位使用者連線至來源,但不能與其他人共用。On-premises data gateway (personal mode) – allows one user to connect to sources, and can’t be shared with others. 只能與 Power BI 搭配使用。Can only be used with Power BI.
  • 內部部署資料閘道:可讓多位使用者連線到多個內部部署資料來源,並且可供 Power BI、PowerApps、Flow 和 Azure Logic Apps 使用,這些都能透過單一閘道安裝來完成。On-premises data gateway – allows multiple users to connect to multiple on-premises data sources, and can be used by Power BI, PowerApps, Flow, and Azure Logic apps, all with a single gateway installation.

兩個閘道都執行類似的功能,可方便存取私用內部部署網路上的資料;因此,資料可以用於 Power BI 這類雲端服務中。Both gateways perform a similar function – they facilitate access to data residing on a private on-premises network, so that data can be used in cloud-based services like Power BI. 個人閘道可供一個人使用,而且只能由 Power BI 使用,而內部部署資料閘道可供許多使用者和許多服務使用。The personal gateway can be used by one person and only by Power BI, the on-premises data gateway can be used by many users, and many services.

有三個部分 (階段) 可讓閘道運作︰There are three parts, or stages, to putting a gateway to work:

  • 安裝閘道Install the gateway
  • 將使用者新增至閘道 (讓它們使用閘道)Add users to the gateway (let them use the gateway)
  • 連接至資料來源Connect to data sources

此外,使用閘道可讓您執行其他重要事項︰In addition, using a gateway lets you do something else that can be important:

  • 重新整理內部部署資料,以使用全新資料來更新 Power BI 報表Refresh on-premises data, so Power BI reports can be updated with fresh data

重新整理資料表示 Power BI 儀表板和報表看起來就像全新的,並反映最新資料。Refreshing data means your Power BI dashboards and reports look fresh, and reflect the latest data. 因此,有人檢視您使用內部部署資料所建立的報表時,該報表會顯示最新資訊,即使您不久前才剛建立報表也是一樣。So when someone views a report you created with on-premises data, that report can use show the latest information, even if you created the report a while ago.

第一個部分是安裝閘道,這十分簡單。The first part, installing a gateway, is easy. 允許使用者存取閘道也十分簡單:您只要在 Power BI 的對話方塊中新增他們即可,他們已經準備就緒。Allowing users to access the gateway is easy too – you just add them in a dialog within Power BI and they’re good. 連接至資料來源可能十分複雜,因為有這麼多的資料來源,而且每個都有它自己的連線需求和細微差別。Connecting to data sources can get complex, because there are so many data sources and each has its own connection requirements and nuances. 而且,我們會處理另一個指南中的重新整理,將本文著重在閘道。And we’ll handle refresh in another guide, to keep things in this article focused on the gateway.

因此,讓我們先執行簡單的事項,並逐步解說如何安裝閘道。So let’s take the easy thing first, and walk through installing a gateway.

安裝閘道Install the gateway

若要安裝閘道,請開啟 Power BI 服務 (您可以在瀏覽器中使用此連結啟動 Power BI 服務,並登入),然後使用 Power BI 帳戶登入。To install a gateway, open the Power BI service (you can use this link to launch the Power BI service in your browser, and log on) and log in with your Power BI account. 在 Power BI 服務中,選取右上角的下載圖示 (如下圖所示),然後選取 [資料閘道]。In the Power BI service, select the download icon in the upper right corner, as shown in the following image, and select Data Gateway.

這會將您帶往下載頁面,您可以在其中按一下 [下載閘道] 按鈕來起始下載。That takes you to a download page, where you click the Download gateway button to initiate the download.

這個畫面提供閘道用途的超濃縮說明。This screen gives you the ultra-condensed explanation of what a gateway does. 它也提供幾個重要警告;閘道在安裝之後,會在執行安裝的電腦上實際執行。It also provides a couple important warnings – when you install a gateway, it actually runs on the computer on which you perform the installation. 如果關閉該電腦,也會一併關閉閘道 (因此它未執行時將不會運作)。And if that computer is turned off, so is the gateway (so it won’t work when it’s not running). 此外,在使用無線網路的電腦上安裝並不是最佳方式,因此您應該使用連接至有線網路的電腦。Also, installing on a computer using a wireless network is not best, so you should use a computer connected to a wired network.

當您準備好時,請選取 [下一步] 繼續進行安裝。When you’re ready, select Next to continue with the setup.

以下是您決定要安裝之閘道的位置:內部部署閘道或個人閘道。Here’s where you decide which gateway you’ll install – on-premises gateway, or a personal gateway. 在本指南中,我們將安裝內部部署資料閘道In this guide, we’ll install the On-premises data gateway.

在此決策點,您需要注意幾件事︰There are a few things to note at this decision point:

  • 兩個閘道都需要 64 位元 Windows 作業系統。Both gateways require 64-bit Windows operating systems.
  • 閘道不能安裝在網域控制站上。Gateways can’t be installed on a domain controller.
  • 同一部電腦最多可安裝兩個內部部署資料閘道,每個閘道各執行一種模式 (個人和標準)。You can install up to two on-premises data gateways on the same computer, one running in each mode (personal and standard).
  • 同一部電腦不可有一個以上的閘道執行相同的模式。You cannot have more than one gateway running in the same mode on the same computer.
  • 不同電腦上可安裝多個內部部署資料閘道,並可從相同的 Power BI 閘道管理介面一併管理 (個人模式除外,請參閱下列的項目符號)。You can install multiple on-premises data gateways on different computers, and manage them all from the same Power BI gateway management interface (excluding personal, see the following bullet point).
  • 每個 Power BI 使用者只能執行一個個人模式閘道。You can only have one personal mode gateway running for each Power BI user. 如果為相同的使用者安裝另一個個人模式閘道 (即使在不同的電腦上),最新的安裝都會取代先前的既有安裝。If you install another personal mode gateway for the same user, even on a different computer, the most recent installation replaces the existing previous installation.

選取 [下一步] 時,即開始安裝閘道。When we select Next, the gateway installation begins. 您需要指定安裝它的位置,而且通常最好是預設位置。You need to specify where it will be installed, and the default location is usually best.

安裝程序十分快速,並且會提供狀態列。The installation process goes quickly, and you’re provided with a status bar.

幾乎完成之後,您需要識別要與閘道搭配使用的帳戶。Once you’re almost complete, you need to identify the account to use with the gateway. 這應該是您用來登入 Power BI 的帳戶 (使用者名稱和密碼)、閘道會與您的 Power BI 帳戶建立關聯,而且您可以從 Power BI 服務設定閘道。This should be the account (the username and password) you use to log on to Power BI; the gateway is associated with your Power BI account, and you configure gateways from within the Power BI service.

您將會登入,如下圖所示。You’ll be signed in, as shown in the following image.

登入之後,您必須建立修復金鑰Once you’re signed in, you need to create a Recovery key. 我們將在另一篇文章中更深入討論這些作業,但現在,請注意您在復原或移動閘道時會需要它。We’ll discuss those more in depth in another article, but for now, know that you’ll need it to recover or move your gateway.

一切順利時,您會看到告訴您閘道已備妥的視窗。When all goes well, you’ll see a window that tells you that your gateway is ready.

現在即可安裝內部部署閘道。That’s it for the installation of an on-premises gateway. 就如承諾一樣,它是相當簡單的程序。As promised, it was a pretty easy process. 接著,下個步驟是「新增使用者」或「新增資料來源」:您可以先執行任一項,並在初始設定之後新增任一項。The next step, then, is to either add users or add data sources – you can do either first, and add either after your initial configuration.

下節描述如何將使用者新增至閘道,在那之後,我們將討論接下來如何將資料來源新增至閘道。The next section describes adding users to the gateway, and after that, we’ll discuss where to go next to add data sources to the gateway.

將使用者新增至閘道Add users to a gateway

既然我們已安裝閘道,我們將會從「Power BI 服務」管理閘道。Now that we have a gateway installed, we manage the gateway from the Power BI service. 若要到達閘道的管理畫面,請在 Power BI 服務中選取右上角的齒輪圖示,然後選取 [管理閘道]。To get to the management screen for gateways, in the Power BI service select the Gear icon in the upper-right corner, then select Manage gateways.

即會出現 Power BI 服務畫布內的頁面,您可以在其中管理閘道。A page inside the Power BI service canvas appears, where you can manage your gateways. [閘道設定] 頁面看起來如下。The Gateway Settings page looks like the following.

如果您點選或按一下 [系統管理員],則會看到下列系統管理員的管理頁面。If you tap or click on Administrators, you see the following administrators’ management page. 請注意,這就是哪些使用者可以「管理」閘道,以及使用不同的頁面在每個個別資料來源中新增 (或移除) 閘道的使用者,我們會在接下來的幾個段落中進行檢閱。Note that this is just which users can administer the gateway, and that users of the gateway are added (or removed) from each individual data source, using a different page – which we review in the next few paragraphs.

資料來源在安裝並驗證 (成功連接) 之後,就會顯示在這個 [管理閘道] 畫面左側的相關聯閘道下方,如下圖所示。Once you install and validate (successfully connect to) a data source, it shows up under its associated gateway in the left side of this Manage gateways screen, as shown in the following image. 請注意,在右窗格中,您可以切換兩個區段︰[資料來源設定] 和 [使用者]。Notice that in the right pane, there are two sections you can toggle between: Data Source Settings and Users. 緊接著的畫面是 [資料來源設定] 區段。The screen directly following is the Data Source Settings section.

選取 [使用者] 時,請在文字方塊中輸入組織中您要授與所選取資料來源存取權的使用者。When you select Users, you get a text box into which you can type users from your organization who you want to grant access to the selected data source. 在下列畫面中,您可以看到我已新增 Maggie 和 Adam。In the following screen, you can see that I’ve added Maggie and Adam.

當您開始在文字方塊中輸入電子郵件地址時,Power BI 會顯示一份電子郵件符合所輸入內容的使用者清單,讓您可以按一下名稱,並將其新增至清單。When you begin typing an email address into the text box, Power BI shows a list of users whose email matches what you’re typing, enabling you to click the name and add them to the list.

您也可以新增電子郵件群組 (別名),以允許多組人員和個人存取。You can also add email groups (aliases) to allow groups of people access, as well as individuals.

選取 [新增] 之後,新增的成員就會顯示在方塊中,如果想要的話,還可以新增更多成員。Once you select Add, the added members show up in the box, and you can add more if you want. 移除使用者也一樣簡單。Removing users is just as easy. 只需要核取其名稱旁邊的核取方塊,然後選取該方塊下方的 [移除] 按鈕。Simply check the checkbox next to their name, and then select the Remove button below the box.

就是這麼簡單。And that’s all there is to it. 請記住,您必須將使用者新增至您要授與存取權的每個資料來源。Remember that you need to add users to each data source to which you want to grant access. 每個資料來源都有不同的使用者清單,而且您必須分別將使用者新增至每個資料來源。Each data source has a separate list of users, and you must add users to each data source separately.

新增資料來源Adding data sources

當然,為了將閘道設為有用,您會想要新增資料來源。Of course, to make your gateway useful you’ll want to add data sources. 這是造成一些 Power BI 閘道複雜性的位置:有許多不同的資料來源可用,而且每個都有專屬需求 (通常它會擁有必要驅動程式)。This is where some of the complexity of Power BI gateways is introduced – there are many different data sources available, and each has its own requirements (and often, its own required driver).

但閱讀另一篇文章之前,請先查看如何新增資料來源。But before we send you off to another article, here’s a look at how you go about adding a data source. 位於 [Power BI 服務] 的 [管理閘道] 頁面時,請選取您想要新增資料來源的閘道,然後選取頁面左上角的 [新增資料來源],就在閘道清單上方。While you’re in the Manage gateways page of the Power BI service, select the gateway to which you want to add a data source, and select Add Data Source in the upper-left corner of the page, just above the list of your gateways.

當您這樣做時,[資料來源設定] 面板就會顯示在右窗格中,如下圖所示。When you do, the Data Source Settings panel appears in the right pane, as shown in the following image. 您可以在這裡命名資料來源 (輸入於 [資料來源名稱] 文字方塊中),然後從 [資料來源類型] 下拉式清單中選取其類型。There, you can name your data source (entered in the Data Source Name text box), and select its type from the Data Source Type drop-down list.

好了,您現在已安裝閘道,而且您已經準備好新增資料來源。Okay, you now have a gateway installed, and you’re ready to add data sources. 太棒了!Great! 如需資料來源的資訊、使用閘道的更多詳細資料,以及其他有用資訊,請參閱下節中的資源。See the resources in the following section for information about data sources, more details about using gateways, and other useful information.

後續步驟Next steps

使用內部部署資料閘道Using the on-premises data gateway
內部部署資料閘道 - 深入資訊On-premises data gateway in-depth
在內部部署資料閘道 (個人模式) 為內部部署資料閘道進行疑難排解On-premises data gateway (personal mode) Troubleshooting the on-premises data gateway

有其他問題嗎?More questions? 試試 Power BI 社群Try the Power BI Community