使用 Power BI 連接到 SQL SentryConnect to SQL Sentry with Power BI

使用 Power BI 可輕鬆分析由 SQL Sentry 所收集的效能資料。Analyzing your performance data collected by SQL Sentry is easy with Power BI. Power BI 會擷取您的資料,然後根據該資料建置預設的儀表板和相關報表。Power BI retrieves your data, then builds a default dashboard and related reports based on that data.

連接到 Power BI 的 SQL Sentry 內容套件Connect to the SQL Sentry content pack for Power BI.

注意

存取您用來連接到 http://cloud.sqlsentry.com 的 SQL Sentry 帳戶,並且需要您將監視之資料庫的識別碼,才能連接。Access to a SQL Sentry account you use for connecting to http://cloud.sqlsentry.com and a Database ID you will monitor is required to connect. 找到資料庫識別碼位置的說明如下。Instructions for where to find the Database ID are below.

如何連接How to connect

  1. 選取左側瀏覽窗格底部的 [取得資料] 。Select Get Data at the bottom of the left navigation pane.

  2. 在 [服務] 方塊中,選取 [取得] 。In the Services box, select Get.

  3. 選取 [SQL Sentry] > [取得]Select SQL Sentry > Get.

  4. 提供您要在 Power BI 中監視之資料庫的 資料庫識別碼Provide the Database ID of the database you’d like to monitor in Power BI. 如需更多資訊,請參閱下文的尋找這個See more details on finding this below.

  5. 針對 [驗證方法],選取 [oAuth2] > [登入]For Authentication Method, select oAuth2 > Sign In.

    出現提示時,請輸入 cloud.sqlsentry.com 認證並遵循 SQL Sentry 驗證程序。When prompted, enter your cloud.sqlsentry.com credentials and follow the SQL Sentry authentication process.

    第一次連接時,Power BI 會提示您允許唯讀存取您的帳戶。The first time you connect, Power BI prompts you to allow read-only access to your account. 選取 [同意] 開始匯入程序。Select Grant to begin the import process. 匯入程序可能需要幾分鐘的時間,視您帳戶的資料量而定。The import process can take a few minutes depending on the volume of data in your account.

  6. Power BI 匯入資料之後,您會在左側瀏覽窗格中看到新的儀表板、報表和資料集。After Power BI imports the data you will see a new dashboard, report, and dataset in the left navigation pane. 新的項目會以黃色星號 * 標示:New items are marked with a yellow asterisk *:

  7. 選取 SQL Sentry 儀表板。Select the SQL Sentry dashboard.

    這是 Power BI 建立的預設儀表板,可顯示您的資料。This is the default dashboard that Power BI creates to display your data. 您可以修改此儀表板,以您想要的任何方式來顯示資料。You can modify this dashboard to display your data in any way you want.

接下來呢?What now?

包含的內容What's included

Power BI 中的 SQL Sentry 提供下列資料:The following data is available from SQL Sentry in Power BI :

資料表名稱Table name 描述Description
連接Connection 此資料表提供有關 SQL Sentry 定義的連接資訊。This table provides information about your SQL Sentry defined connections.
日期Date
此資料表包含自今天起回溯至最早的日期所收集和保存的效能資料。This table contains dates from today back to the earliest date from which performance data was collected and retained.
停機時間Downtime
此資料表包含在您環境中受到監視之每部伺服器的停機時間和執行時間相關資訊。This table contains information related to your downtime and uptime for each server that is monitored in your environment.
記憶體使用量Memory Usage
此資料表包含您每部伺服器中有多少可用記憶體的相關資料。This table contains data about how much memory is available or free in each of your servers.
伺服器Server
此資料表包含您環境中每部伺服器的記錄。This table contains records for each server in your environment.
伺服器健全狀況Server Health
此資料表包含您環境中自訂條件所產生之所有事件的資料,包括嚴重性和計數。This table contains data for all the events generated by custom conditions in your environment, including severity and count.

尋找參數Finding Parameters

在新的網頁瀏覽器視窗中登入 https://cloud.sqlsentry.com,即可找到資料庫識別碼The Database ID can be found by logging into https://cloud.sqlsentry.com in a new web browser window. 資料庫識別碼 會列在主要概觀頁面上:The Database ID is listed on the main overview page:

![](media/service-connect-to-sql-sentry/database2.png)

[資料庫詳細資料] 畫面上也會顯示 資料庫識別碼The Database ID is also shown on the Database Details screen:

![](media/service-connect-to-sql-sentry/database.png)

疑難排解Troubleshooting

如果您某些應用程式的資料未出現在 Power BI,請檢查以確認您使用正確的資料庫識別碼,且具有檢視資料的權限。If data from some of your apps is not showing up in Power BI, check to make sure that you are using the correct Database ID and that you have the authority to view the data.

如果您並非要同步到 https://cloud.sqlsentry.com 之 SQL Sentry 資料庫的擁有者,請連絡系統管理員以確定您有權限檢視所收集的資料。If you are not the owner if the SQL Sentry database that is being synchronized to https://cloud.sqlsentry.com, please contact your administrator to make sure you have rights to view the collected data.

後續步驟Next steps

開始使用 Power BIGet started with Power BI

取得 Power BI 的資料Get Data for Power BI