管理您的 SAP HANA 資料來源Manage your SAP HANA data source

安裝內部部署資料閘道之後,您必須新增可搭配閘道使用的資料來源。Once you have installed the on-premises data gateway, you will need to add data sources that can be used with the gateway. 本文將探討如何使用閘道和資料來源。This article will look at how to work with gateways and data sources. 您可以針對已排程的重新整理或 DirectQuery,使用 SAP HANA 資料來源。You can use the SAP HANA data source either for scheduled refresh or for DirectQuery.

下載並安裝閘道Download and install the gateway

您可以從 Power BI 服務下載閘道。You can download the gateway from the Power BI service. 選取 [下載] > [資料閘道],或移至 gateway download page (閘道下載頁面)Select Downloads > Data Gateway, or by going to the gateway download page.

加入閘道Add a gateway

若要新增閘道,請直接將閘道下載並安裝到您環境中的伺服器上。To add a Gateway, simply download and install the gateway on a server in your environment. 安裝閘道之後,它會顯示在 [管理閘道] 底下的閘道清單中。After you have installed the gateway, it will show in the lists of gateways under Manage gateways.


您必須是至少一個閘道的管理員,才會顯示 [管理閘道]。Manage gateways will not show up until you are the admin of at least one gateway. 當以管理員身分加入閘道時,或者當您安裝並設定閘道時,就會發生這種情況。This can happen either by being added as an admin or you installing and configuring a gateway.

移除閘道器Remove a gateway

移除閘道器的同時也會刪除該閘道器下的所有資料來源。Removing a gateway will also delete any data sources under that gateway. 這也會中斷依賴這些資料來源的任何儀表板和報表。This will also break any dashboards and reports that rely on those data sources.

  1. 選取右上角的齒輪圖示 > [管理閘道] 。Select the gear icon in the upper-right corner > Manage gateways.
  2. [閘道] > [移除]Gateway > Remove

加入資料來源Add a data source

您可以選取閘道並按一下 [加入資料來源],或移至 [閘道] > [加入資料來源] ,以加入資料來源。You can add a data source by either selecting a gateway and click Add data source, or go to Gateway > Add data source.

您可以接著從清單中選取 [資料來源類型] 。You can then select the Data Source Type from the list.

您接著需要填入資料來源的資訊,包括 伺服器使用者名稱密碼You will then want to fill in the information for the data source which includes the Server, Username and Password.


資料來源的所有查詢都會使用這些認證來執行。All queries to the data source will run using these credentials. 如需詳細資訊,請參閱主要內部部署資料閘道文章,以深入了解認證的儲存方式。For more information, see the main on-premises data gateway article to learn more about how credentials are stored.

您可以在填入所有內容之後,按一下 [加入] 。You can click Add after you have everything filled in. 您現在可以使用此資料來源,針對內部部署的 SAP HANA 伺服器,用於已排程的重新整理或 DirectQuery。You can now use this data source for scheduled refresh, or DirectQuery, against a SAP HANA server that is on-premises. 如果成功,您會看到 [連接成功] 。You will see Connection Successful if it succeeded.

進階設定Advanced settings

您可以設定資料來源的隱私權等級,You can configure the privacy level for your data source. 如此可控制如何混搭資料。This controls how data can be mashed up. 這只能用於已排程的重新整理。This is only used for scheduled refresh. 不適用於 DirectQuery。It does not apply to DirectQuery. 深入了解Learn more

移除資料來源Remove a data source

移除資料來源的同時也會中斷依賴指定資料來源的所有儀表板或報表。Removing a data source will break any dashboards or reports that rely on the given data source.

若要移除資料來源,請前往 [資料來源] > [移除]。To remove a Data Source, go to the Data Source > Remove.

管理管理員Manage administrators

在閘道的 [管理員] 索引標籤上,您可以新增並移除可管理閘道的使用者 (或安全性群組)。On the Administrators tab for the gateway, you can add and remove users (or security groups) that can administer the gateway.

管理使用者Manage users

您可以在 [使用者] 索引標籤上,針對資料來源加入並移除可以使用這個資料來源的使用者或安全性群組。On the Users tab, for the data source, you can add, and remove, users, or security groups, that can use this data source.


使用者清單僅控制獲准發行報表的人員。The users list only controls who are allowed to publish reports. 報表擁有者可以建立儀表板或內容套件,並與其他使用者共用。The report owners can create dashboards, or content packs, and share those with other users.

使用資料來源Using the data source

建立資料來源之後,您將可使用其中一個 DirectQuery 連接或透過已排程的重新整理,以取得資料來源。After you have created the data source, it will be available to use with either DirectQuery connections, or through scheduled refresh.


伺服器和資料庫名稱必須符合內部部署資料閘道內的 Power BI Desktop 和資料來源!Server and database name have to match between Power BI Desktop and the data source within the on-premises data gateway!

您的資料集和閘道內的資料來源是根據您的伺服器名稱和資料庫名稱以建立連結。The link between your dataset and the data source within the gateway is based on your server name and database name. 這些項目必須相符。These have to match. 例如,若您的伺服器名稱是 IP 位址,在 Power BI Desktop 內,您將必須使用該 IP 位址以取得閘道設定內的資料來源。For example, if you supply an IP Address for the server name, within Power BI Desktop, you will need to use the IP Address for the data source within the gateway configuration. 若您使用 SERVER\INSTANCE,在 Power BI Desktop 中,您將必須使用相同的伺服器名稱以取得閘道內設定的資料來源。If you use SERVER\INSTANCE, in Power BI Desktop, you will need to use the same within the data source configured for the gateway.

這適用於 DirectQuery 和已排程的重新整理。This is the case for both DirectQuery and scheduled refresh.

使用 DirectQuery 連接來使用資料來源Using the data source with DirectQuery connections

您必須確定伺服器和資料庫名稱與 Power BI Desktop 及閘道已設定的資料來源相符。You will need to make sure the server and database name matches between Power BI Desktop and the configured data source for the gateway. 您也必須確定資料來源的 使用者 索引標籤已列出您的使用者,以便發行 DirectQuery 資料集。You will also need to make sure your user is listed in the Users tab of the data source in order to publish DirectQuery datasets. 當您第一次匯入資料時,Power BI Desktop 內會出現 DirectQuery 的選取項目。The selection for DirectQuery occurs within Power BI Desktop when you first import data. 深入了解Learn more

發行之後,您的報表會從 Power BI Desktop 或取得資料開始工作。After you publish, either from Power BI Desktop or Get Data, your reports should start working. 建立閘道內的資料來源之後,可能需要幾分鐘的時間才能使用連線。It may take several minutes, after creating the data source within the gateway, for the connection to be usable.

使用已排程的重新整理使用資料來源Using the data source with scheduled refresh

若閘道內設定資料來源的 [使用者] 索引標籤中列出您的使用者,而伺服器和資料庫名稱也相符,您就可以將閘道作為進行已排程重新整理的一個選項。If you are listed in the Users tab of the data source configured within the gateway, and the server and database name match, you will see the gateway as an option to use with scheduled refresh.

後續步驟Next steps

內部部署資料閘道On-premises data gateway
內部部署資料閘道 - 深入資訊On-premises data gateway - in-depth
為內部部署資料閘道進行疑難排解Troubleshooting the on-premises data gateway
有其他問題嗎?More questions? 試試 Power BI 社群Try the Power BI Community