共用方式為


設定 Integration Services (SSIS) 服務

Integration Services 服務會仰賴組態檔進行設定。根據預設,此組態檔名稱為 MsDtsSrvr.ini.xml,而且檔案位於 %ProgramFiles%\Microsoft SQL Server\100\DTS\Binn 資料夾中。

一般來說,您不必為這個組態檔做任何變更,也不必變更此檔案的預設位置。但是,如果您的封裝儲存在 Database Engine 的具名執行個體或遠端執行個體中,或是儲存在多個 Database Engine 執行個體中,您就必須修改此組態檔。此外,如果您將此組態檔移到預設位置以外的位置,您將必須修改指定此檔案位置的登錄機碼。

SSIS 服務組態檔包含的內容

當您安裝 Integration Services 時,安裝程序會針對 Integration Services 服務建立及安裝組態檔。此組態檔包含下列設定:

  • 在服務停止時傳送停止指令給封裝。

  • 要在 SQL Server Management Studio 的 [物件總管] 中顯示的 Integration Services 根資料夾為 [MSDB] 和 [檔案系統] 資料夾。

  • 檔案系統中,由 Integration Services 服務所管理的封裝位於 %ProgramFiles%\Microsoft SQL Server\100\DTS\Packages 中。

此組態檔也會指定哪一個 msdb 資料庫包含 Integration Services 服務將會管理的封裝。根據預設,Integration Services 服務設定為可管理 Database Engine 執行個體之 msdb 資料庫中的封裝,該執行個體與 Integration Services 同時安裝。如果 Database Engine 執行個體並未同時安裝,Integration Services 服務會設定為可管理本機預設 Database Engine 執行個體之 msdb 資料庫中的封裝。

預設組態檔範例

下列範例會顯示可指定以下設定的預設組態檔:

  • 當 Integration Services 服務停止時,封裝會停止執行。

  • Integration Services 中封裝儲存體的根資料夾為 MSDB 和檔案系統。

  • 此服務會管理儲存於本機預設 SQL Server 執行個體之 msdb 資料庫內的封裝。

  • 此服務會管理儲存於檔案系統 [封裝] 資料夾內的封裝。

預設組態檔的範例

<?xml version="1.0" encoding="utf-8"?>
<DtsServiceConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <StopExecutingPackagesOnShutdown>true</StopExecutingPackagesOnShutdown>
  <TopLevelFolders>
    <Folder xsi:type="SqlServerFolder">
      <Name>MSDB</Name>
      <ServerName>.</ServerName>
    </Folder>
    <Folder xsi:type="FileSystemFolder">
      <Name>File System</Name>
      <StorePath>..\Packages</StorePath>
    </Folder>
  </TopLevelFolders>  
</DtsServiceConfiguration>

修改 SSIS 服務組態檔的內容

您可以修改組態檔,允許封裝在服務停止時繼續執行、在 [物件總管] 中顯示其他根資料夾,或在檔案系統中指定要由 Integration Services 服務管理的不同資料夾或其他資料夾。例如,您可以建立屬於 SqlServerFolder 類型的其他根資料夾來管理其他 Database Engine 執行個體之 msdb 資料庫中的封裝。

[!附註]

某些字元在資料夾名稱中是無效的。資料夾名稱的有效字元是由 .NET Framework 類別 System.IO.Path[GetInvalidFilenameChars] 欄位所決定。[GetInvalidFilenameChars] 欄位提供平台特定字元陣列,其無法在傳遞給 Path 類別成員的路徑字串引數中指定。有效的字元集可能會因檔案系統而不同。無效的字元通常包括引號 (")、小於 (<) 字元和縱線 (|) 字元。

但是,若要管理儲存在 Database Engine 具名執行個體或遠端執行個體中的封裝,您就必須修改組態檔。如果您未更新組態檔,就無法使用 SQL Server Management Studio 中的 [物件總管] 來檢視儲存在具名執行個體或遠端執行個體之 msdb 資料庫中的封裝。如果您嘗試使用 [物件總管] 來檢視這些封裝,您會收到下列錯誤訊息:

Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

The SQL Server specified in Integration Services service configuration is not present or is not available. This might occur when there is no default instance of SQL Server on the computer. For more information, see the topic "Configuring the Integration Services Service" in SQL Server 2008 Books Online.

Login Timeout Expired

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2008, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.

Named Pipes Provider: Could not open a connection to SQL Server [2]. (MsDtsSvr).

若要為 Integration Services 服務修改此組態檔,您可使用文字編輯器。

[!附註]

如果您已在 64 位元電腦上安裝 64 位元版本和 32 位元版本的 SQL Server,而您想要連接到 64 位元版本,則需要修改位於 Program Files (x86)\Microsoft SQL Server\100\DTS\Binn 資料夾中的 MsDtsSrvr.ini.xml 檔。

重要事項重要事項

在您修改服務組態檔後,必須重新啟動服務,才能使用更新的服務組態。

修改過的組態檔範例

下列範例會顯示 Integration Services 的已修改組態檔。此檔案適用於 SQL Server 的具名執行個體,該執行個體稱為 InstanceName 且位在名為 ServerName 的伺服器上。

SQL Server 具名執行個體之已修改組態檔的範例

<?xml version="1.0" encoding="utf-8"?>
<DtsServiceConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <StopExecutingPackagesOnShutdown>true</StopExecutingPackagesOnShutdown>
  <TopLevelFolders>
    <Folder xsi:type="SqlServerFolder">
      <Name>MSDB</Name>
      <ServerName>ServerName\InstanceName</ServerName>
    </Folder>
    <Folder xsi:type="FileSystemFolder">
      <Name>File System</Name>
      <StorePath>..\Packages</StorePath>
    </Folder>
  </TopLevelFolders>  
</DtsServiceConfiguration>

修改 SSIS 服務組態檔的位置

登錄機碼 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\SSIS\ServiceConfigFile 會指定 Integration Services 服務所使用之組態檔的位置及名稱。此登錄機碼的預設值為 C:\Program Files\Microsoft SQL Server\100\DTS\Binn\ MsDtsSrvr.ini.xml。您可以更新此登錄機碼的值,以便針對組態檔使用不同的名稱和位置。

警告注意事項注意

不正確編輯登錄會造成嚴重問題,可能導致您需要重新安裝作業系統。Microsoft 無法保證可以解決因為登錄編輯不正確所產生的問題。在編輯登錄之前,請先備份重要資料。如需有關如何備份、還原及編輯登錄的詳細資訊,請參閱 Microsoft 知識庫文件<Microsoft Windows 登錄說明>。

當 Integration Services 服務啟動時,它會載入組態檔。登錄項目的任何變更都必須重新啟動服務。

Integration Services 圖示 (小) 掌握 Integration Services 的最新狀態

若要取得 Microsoft 的最新下載、文章、範例、影片,以及社群的精選解決方案,請瀏覽 MSDN 上的 Integration Services 頁面:


若要得到這些更新的自動通知,請訂閱該頁面上所提供的 RSS 摘要。

請參閱

概念