針對 Power BI 報表伺服器中排程的重新整理進行疑難排解Troubleshoot scheduled refresh in Power BI Report Server

本文會討論可用來針對 Power BI 報表伺服器中排程的重新整理之問題進行疑難排解的資源。This article discusses resources available to troubleshoot issues with scheduled refresh in Power BI Report Server.

出現問題時,這篇文章會更新資訊以協助您。As issues come up, this article will be updated with information to help you.

常見問題Common issues

以下是您在嘗試為報表排程重新整理時會遇到的較常見問題。The following are the more common issues you will hit when trying to schedule refresh for a report.

連線到不同資料來源可能需要安裝協力廠商驅動程式,才能成功連線。Connecting to different data sources may require 3rd party drivers that need to be installed in order to connect successfuly. 您不僅必須在使用 Power BI Desktop 所在的電腦上安裝它們,也必須確定驅動程式已安裝在報表伺服器上。Not only would you need to install them on the machine you are using Power BI Desktop on, but you will also need to make sure the driver is installed on the report server.

驅動程式可能同時有 32 位元和 64 位元。The driver may also come in both 32bit and 64bit. 請務必安裝 64 位元驅動程式,因為 Power BI 報表伺服器是 64 位元。Make sure to install the 64bit driver as Power BI Report Server is 64bit.

請洽詢製造商,以取得如何安裝和設定協力廠商驅動程式的詳細資料。Please refer to the manufacturer for details on how to install and configure 3rd party drivers.

記憶體壓力Memory pressure

當報表需要更多記憶體來處理及轉譯時,會發生記憶體壓力。Memory pressure can occur when reports require more memory to process and render. 在報表上排程重新整理可能會要求電腦的大量記憶體。Schedule refresh on reports may demand a significant amount of memory on the machine. 特別是針對較大的報表。Especially for larger reports. 記憶體壓力會導致報表失敗,報表伺服器本身也可能會當機。Memory pressure can result in report failures as well as a potential crash of the report server itself.

如果您持續遇到記憶體壓力,試著查看報表伺服器相應放大部署,以便分散資源的負載。If you are encountering memory pressure consistently, it may be worth looking at a scaled out deployment of the report server in order to spread the load of resources. 您也可以定義指定報表伺服器用於使用 rsreportserver.config 內的 IsDataModelRefreshService 設定,進行資料重新整理。使用此設定,您可以定義一或多伺服器成為要在需求報表上處理的前端伺服器,讓另一組伺服器只用於排程的重新整理。You can also define that a given report server is used for data refresh with the IsDataModelRefreshService setting within rsreportserver.config. With this setting, you could define one or more servers to be the front end server to handle on demand reports, and have another set of servers to only be used for scheduled refresh.

如需如何監視 Analysis Services 執行個體的詳細資訊,請參閱監視 Analysis Services 執行個體For information on how to monitor an Analysis Services instance, see Monitor an Analysis Services Instance.

如需 Analysis Services 內記憶體設定的詳細資訊,請參閱記憶體屬性For information about memory settings within Analysis Services, see Memory Properties.

Kerberos 設定Kerberos configuration

連線到具有 Windows 認證的資料來源,可能需要設定 Kerberos 限制委派,才能成功連線。Connecting to a data source with windows credentials may require configuring Kerberos constrained delegation to make a successful connection. 如需如何設定 Kerberos 限制委派的詳細資訊,請參閱設定 Kerberos 使用 Power BI 報表For more information about how to configure Kerberos constrained delegation, see Configure Kerberos to use Power BI reports.

已知問題Known issues

已知問題的相關資訊在可用時會列在這裡。Information about known issues will be listed here when they become available.

組態設定Configuration settings

下列設定可以用來影響排程的重新整理。The following settings can be used to affect scheduled refresh. SQL Server Management Studio (SSMS) 中的設定集會套用到相應放大部署內的所有報表伺服器。Settings set within SQL Server Management Studio (SSMS) apply to all report servers within a scale-out deployment. 在 rsreportserver.config 中設定的設定適用於特定的伺服器。Settings configured within rsreportserver.config are for the specific server they are set on.

SSMS 中的設定:Settings within SSMS:

設定Setting 描述Description
EnablePowerBIReportEmbeddedModelsEnablePowerBIReportEmbeddedModels 啟用或停用在您的報表中使用匯入之資料的能力。Enables or disables the ability to use imported data within your reports. 有效值為 True 或 False。Valid values are True or False.
MaxFileSizeMbMaxFileSizeMb 上傳報表的最大檔案大小。Maximum file size for uploaded reports. 預設值為 1000 MB (1 GB)。Default is 1000 MB (1 GB). 最大值為 2000 MB (2 GB)。Maximum value is 2000 MB (2 GB).
ModelCleanupCycleMinutesModelCleanupCycleMinutes 定義檢查模型以從記憶體中收回的頻率。Defines how often the model is checked to evict it from memory. 預設值為 15 分鐘。Default is 15 minutes.
ModelExpirationMinutesModelExpirationMinutes 定義根據最後使用和收回的時間,模型到期之前有多少時間。Defines how long until the model expires based on the last time used and is evicted. 預設值為 60 分鐘。Default is 60 minutes.
ScheduleRefreshTimeoutMinutesScheduleRefreshTimeoutMinutes 定義模式的資料重新整理需要多少時間。Defines how long the data refresh can take for a mode. 預設值為 120 分鐘。Default is 120 minutes. 沒有上限。There is no upper limit.

rsreportserver.config 中的設定:Settings within rsreportserver.config:

<Configuration>
    <Service>
        <PollingInterval>10</PollingInterval>
        <IsDataModelRefreshService>false</IsDataModelRefreshService>
        <MaxQueueThreads>0</MaxQueueThreads>
    </Service>
</Configuration>

疑難排解的工具Tools for troubleshooting

Power BI 報表排程的重新整理之相關記錄Logs relevant for scheduled refresh of Power BI reports

保存排程的重新整理相關資訊的記錄檔是 RSPowerBI_ logs。The log files which hold information about scheduled refresh are the RSPowerBI_ logs. 它們位於報表伺服器安裝位置的 LogFiles 資料夾中。They are located in the LogFiles folder of your report server installation location.

C:\Program Files\Microsoft Power BI Report Server\PBIRS\LogFiles\RSPowerBI_*.log

錯誤狀況Error condition

2017-10-20 02:00:09.5188|ERROR|744|Error Processing Data Model Refresh: SessionId: e960c25e-ddd4-4763-aa78-0e5dceb53472, Status: Error Model can not be refreshed because not all the data sources are embedded, Exception Microsoft.PowerBI.ReportServer.AsServer.InvalidDataSourceException: Model can not be refreshed because not all the data sources are embedde
   at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.AnalysisServicesDataRefresh.CanModelRefresh(IEnumerable`1 dataSources)
   at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.<>c__DisplayClass7.<ExecuteActionWithLogging>b__5()
   at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.<ExecuteFuncWithLogging>d__1`1.MoveNext()

成功重新整理Successful refresh

2017-10-25 15:23:41.9370|INFO|6|Handling event with data: TimeEntered: 10/25/2017 8:23:41 PM, Type: Event, SessionId: 46d398db-0b1f-49d8-b7bd-c5461c07ec7a, EventType: DataModelRefresh
2017-10-25 15:23:41.9370|INFO|6|Processing Data Model Refresh: SessionId: 46d398db-0b1f-49d8-b7bd-c5461c07ec7a, Status: Starting Data Refresh.
2017-10-25 15:23:41.9370|INFO|6|Processing Data Model Refresh: SessionId: 46d398db-0b1f-49d8-b7bd-c5461c07ec7a, Status: Starting Retrieving PBIX AsDatabaseInfo.
2017-10-25 15:23:42.7134|INFO|6|Processing Data Model Refresh: SessionId: 46d398db-0b1f-49d8-b7bd-c5461c07ec7a, Status: Starting Verifying all the data sources are embedded.
2017-10-25 15:23:42.7134|INFO|6|Processing Data Model Refresh: SessionId: 46d398db-0b1f-49d8-b7bd-c5461c07ec7a, Status: Starting Verifying connection strings are valid.
2017-10-25 15:23:42.7134|INFO|6|Processing Data Model Refresh: SessionId: 46d398db-0b1f-49d8-b7bd-c5461c07ec7a, Status: Starting Streaming model to Analysis Server.
2017-10-25 15:23:42.7603|INFO|6|Processing Data Model Refresh: SessionId: 46d398db-0b1f-49d8-b7bd-c5461c07ec7a, Status: Starting Refreshing the model.
2017-10-25 15:23:51.5258|INFO|6|Processing Data Model Refresh: SessionId: 46d398db-0b1f-49d8-b7bd-c5461c07ec7a, Status: Starting Removing credentials from the model.
2017-10-25 15:23:51.6508|INFO|6|Processing Data Model Refresh: SessionId: 46d398db-0b1f-49d8-b7bd-c5461c07ec7a, Status: Starting Saving model to the catalog.

認證不正確Incorrect Credentials

2017-10-20 08:22:01.5595|INFO|302|Processing Data Model Refresh: SessionId: 22cd9ec3-b21a-4eb1-81ae-15fac8d379ea, Status: Starting Refreshing the model.
2017-10-20 08:22:02.3758|ERROR|302|Error Processing Data Model Refresh: SessionId: 22cd9ec3-b21a-4eb1-81ae-15fac8d379ea, Status: Error Failed to refresh the model, Exception Microsoft.AnalysisServices.OperationException: Failed to save modifications to the server. Error returned: 'The credentials provided for the SQL source are invalid. (Source at rosecatalog;reportserver.). The exception was raised by the IDbCommand interface.
'.
   at Microsoft.AnalysisServices.Tabular.Model.SaveChanges(SaveOptions saveOptions)
   at Microsoft.PowerBI.ReportServer.AsServer.TOMWrapper.RefreshModel(Database database)
   at Microsoft.PowerBI.ReportServer.AsServer.AnalysisServicesServer.RefreshDatabase(String databaseName, IEnumerable`1 dataSources)
   at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.AnalysisServicesDataRefresh.RefreshDatabase(AsDatabaseInfo asDatabaseInfo)
   at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.<>c__DisplayClass7.<ExecuteActionWithLogging>b__5()
   at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.<ExecuteFuncWithLogging>d__1`1.MoveNext()
2017-10-20 08:22:02.4588|ERROR|302|Error Processing Data Model Refresh: SessionId: 22cd9ec3-b21a-4eb1-81ae-15fac8d379ea, Status: Error Failed Data Refresh, Exception Microsoft.AnalysisServices.OperationException: Failed to save modifications to the server. Error returned: 'The credentials provided for the SQL source are invalid. (Source at rosecatalog;reportserver.). The exception was raised by the IDbCommand interface.
'.
   at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.ExecuteActionWithLogging(Action methodToExecute, String description, String localizedDescription, String messageInFailure, RefreshInfo refreshInfo, DataAccessors dataAccessors, ReportEventType operation, Int64 size, Boolean isDataRetrieval, Boolean showInExecutionLog)
   at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.AnalysisServicesDataRefresh.RefreshData(RefreshInfo refreshInfo)
   at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.<>c__DisplayClass7.<ExecuteActionWithLogging>b__5()
   at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.<ExecuteFuncWithLogging>d__1`1.MoveNext()

啟用詳細資訊記錄Enabling Verbose Logging

在 Power BI 報表伺服器中啟用詳細資訊記錄,與 SQL Server Reporting Services 相同。Enabling verbose logging, in Power BI Report Server, is the same as it is for SQL Server Reporting Services.

  1. 開啟 <install directory>\PBIRS\ReportServer\bin\ReportingServicesService.exe.configOpen <install directory>\PBIRS\ReportServer\bin\ReportingServicesService.exe.config.
  2. <system.diagnostics> 底下,將 DefaultTraceSwitch 變更為 4Under <system.diagnostics>, change DefaultTraceSwitch to 4.
  3. <RStrace> 底下,將 Components 變更為 all:4Under <RStrace>, change Components to all:4.

ExecutionLogExecutionLog

每當轉譯 Power BI 報表時,或執行排程重新整理計劃時,新項目會新增至資料庫中的執行記錄。Whenever a Power BI report is rendered, or a schedule refresh plan is executed, new entries are added to the Execution Log in the database. 這些項目位於報表伺服器目錄資料庫內的 ExecutionLog3 檢視。These entries are available in the ExecutionLog3 view within the report server catalog database.

Power BI 報表的執行記錄項目與其他報表類型的項目不同。Execution log entries for Power BI reports differ from entries for other report types.

  • TimeRendering 資料行一律是 0。TimeRendering columns is always 0. Power BI 報表的轉譯會在瀏覽器中發生,而不是伺服器。Rendering of Power BI reports happens in the browser, not in the server.
  • 有 2 個要求類型和後續項目動作:There are 2 Request Types and subsequent item actions:
    • Interactive:每當檢視報表時。Interactive: whenever a report is being viewed.
      • ASModelStream:當資料模型從目錄串流至 Analysis Services 時。ASModelStream: when the data model is streamed to Analysis Services from the catalog.
      • ConceptualSchema:當使用者在檢視報表時按一下時。ConceptualSchema: when user clicks on viewing the report.
      • QueryData:每當從用戶端要求資料時。QueryData: whenever data is being requested from client.
    • Refresh Cache:每當執行排程重新整理計劃時。Refresh Cache: whenever a schedule refresh plan has been executed.
      • ASModelStream:每當資料模型從目錄串流至 Analysis Services 時。ASModelStream: whenever the data model is streamed to Analysis Services from the catalog.
      • DataRefresh:每當從一或多個資料來源重新整理資料時。DataRefresh: whenever data is being refreshed from one or more data sources.
      • SaveToCatalog:每當資料模型儲存回目錄時。SaveToCatalog: whenever the data model is being saved back to the catalog.

Analysis ServicesAnalysis Services

有時候您可能想要針對診斷問題修改 Analysis Services,或是調整記憶體限制。There may be times you want to modify Analysis Services for diagnositing issues, or adjust memory limits.

重要

這些設定會在您升級報表伺服器時隨時重設。These settings will be reset any time you upgrade the report server. 請務必保留一份變更的複本,並且視需要重新套用。Be sure to keep a copy of your changes and reapply them if needed.

安裝位置Install location

Power BI 報表伺服器的預設位置,Analysis Services 則是後續位置。The default location for Power BI Report Server, and Analysis Services is the following.

C:\Program Files\Microsoft Power BI Report Server\PBIRS\ASEngine

設定 Analysis Services 設定 (msmdsrv.ini)Configuring Analysis Services settings (msmdsrv.ini)

<install directory>\PBIRS\ASEngine 目錄中,您會發現 msmdsrv.ini 檔案,可以用來控制 Analysis Services 的不同設定。In the <install directory>\PBIRS\ASEngine directory, you will find the msmdsrv.ini file, which you can use to control different settings of Analysis Services. 當您開啟這個檔案時,您會立即了解此檔案沒有您對於 msmdsrv.ini 檔案預期的所有設定。When you open this file, you will immediately realize that this file doesn't have all the settings you would expect in the msmdsrv.ini file.

這是因為 Power BI 報表伺服器所執行的實際 Analysis Services 處理程序是在 <install directory>\PBIRS\ASEngine\workspaces 中啟動。This is because the actual Analysis Services process that is run by Power BI Report Server is launched in <install directory>\PBIRS\ASEngine\workspaces. 在該資料夾中,您會看到您習慣的完整 msmdsrv.ini 檔案。In that folder, you will see the full msmdsrv.ini file you are used to. 請勿修改工作區資料夾中的檔案,因為每當 Analysis Services 處理程序啟動時,它都會重寫。It is important not to modify the file within the workspaces folder as it is rewritten whenever the Analysis Services process launches. 如果您想要控制設定,請藉由修改 <install directory>\PBIRS\ASEngine 目錄中的 msmdsrv.ini 來完成這個操作。If you want to control a setting, please do this by modifying msmdsrv.ini in the <install directory>\PBIRS\ASEngine directory.

每當 Analysis Services 處理程序啟動時,就會重設下列設定。The following settings are reset when ever the Analysis Services process is launched. 您對這些項目進行的任何變更將會被忽略。Any changes you make to these will be ignored.

  • ConfigurationSettings\PrivateProcessConfigurationSettings\PrivateProcess
  • ConfigurationSettings\DataDirConfigurationSettings\DataDir
  • ConfigurationSettings\LogDirConfigurationSettings\LogDir
  • ConfigurationSettings\TempDirConfigurationSettings\TempDir
  • ConfigurationSettings\BackupDirConfigurationSettings\BackupDir
  • ConfigurationSettings\AllowedBrowsingFoldersConfigurationSettings\AllowedBrowsingFolders
  • ConfigurationSettings\CrashReportsFolderConfigurationSettings\CrashReportsFolder
  • ConfigurationSettings\ExtensionDirConfigurationSettings\ExtensionDir
  • ConfigurationSettings\PortConfigurationSettings\Port
  • ConfigurationSettings\DeploymentModeConfigurationSettings\DeploymentMode
  • ConfigurationSettings\ServerLocationConfigurationSettings\ServerLocation
  • ConfigurationSettings\TMCompatabilitySKUConfigurationSettings\TMCompatabilitySKU
  • ConfigurationSettings\FlightRecorder\TraceDefinitionFileConfigurationSettings\FlightRecorder\TraceDefinitionFile

分析本機 Analysis Services 處理程序Profiling the local Analysis Services process

SQL Profiler 追蹤可以在本機 Analysis Services 處理程序上針對診斷目的執行。A SQL Profiler trace can be run on the local Analysis Services process for diagnostic purposes. 若要連線至本機 Analysis Services 執行個體,請執行下列作業。To connect to the local Analysis Services instance, do the following.

SQL Server Profiler 追蹤隨附於 SQL Server Management Studio (SSMS) 下載SQL Server Profiler Trace is included with the SQL Server Management Studio (SSMS) download.

  1. 以系統管理員身分啟動 SQL Server ProfilerStart SQL Server Profiler as an administrator.
  2. 選取 [新增追蹤] 按鈕。Select the New Trace button.
  3. 在 [連接至伺服器] 對話方塊中,選取 [Analysis Services],然後輸入 localhost:5132 作為伺服器名稱。In the Connect to server dialog, select Analysis Services and enter localhost:5132 for the server name.
  4. 在 [追蹤屬性] 對話方塊中,選取您想要擷取的事件,然後選取 [執行]。In the Trace properties dialog, select the events you want to capture and select Run.

鎖定記憶體中的分頁 Windows 權限Lock Pages In Memory Windows privilege

如果您發現您無法轉譯 Power BI 報表,將鎖定記憶體中的分頁權限指派給執行 Power BI 報表伺服器的服務帳戶,可能有幫助。If you find that you are unable to render a Power BI report, assigning the Lock pages in memory privilege to the services account running Power BI Report server may help. 如需有關如何設定鎖定記憶體中的分頁的詳細資訊,請參閱指派給 Analysis Services 服務帳戶的 Windows 權限For more information about how to configure Lock pages in memory, see Windows privileges assigned to the Analysis Services service account.

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