2013-09-22 87 views
1

我正在嘗試使用VS 2010上的SQL Server 2012上的SSIS ezAPI庫。我一直在尋找非常有用的博客和 Bill研究員和ezAPI附帶的示例。我的最終目標是自動生成簡單的驗證平坦填充輸入到ADO.net目標, 通過VS 2010應用程序自動映射。ssis 2012任務ezapi

我遇到的問題是,在所有示例中,ezAPI和@billinkc都出現我無法解決的任務錯誤。錯誤日誌,我 已經貼在下面來自使用賬單複製分貝例如

billfellows.blogspot.co.uk/2012/03/replicate-tables-with-ssis-ezapi.html

Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException was unhandled 
HelpLink=#-1073614806 
Message=Cannot create a task from XML for task "", type ", {E3CFBEA8-1F48-40D8-91E1- 2DEDC1EDDD56}" due to error 0x80070057 "The parameter is incorrect.". 

    Source={8975114C-7D4E-4B27-8FB9-1B7EC264B4A7} 
    ErrorCode=-1073659898 
    StackTrace: 
    at Microsoft.SqlServer.Dts.Runtime.Executables.Add(String moniker) 
    at Microsoft.SqlServer.SSIS.EzAPI.EzExecutable.CreateExecutable() 
    at Microsoft.SqlServer.SSIS.EzAPI.EzExecutable..ctor(EzContainer parent) 
    at Microsoft.SqlServer.SSIS.EzAPI.EzSrcPackage`2..ctor() 
    at Microsoft.SqlServer.SSIS.EzAPI.EzSrcDestPackage`4..ctor() 
    at EzAPIRecipies.ReplicateOMatic..ctor(String sourceServer, String sourceDatabase, String table, String destinationServer, String destinationDatabase) in c:\users\administrator\documents\visual studio 2010\Projects\testauto6\testauto6\replicate1.cs:line 28 
    at EzAPIRecipies.Driver.ReplicateTables() in c:\users\administrator\documents\visual studio 2010\Projects\testauto6\testauto6\Program.cs:line 41 
    at EzAPIRecipies.Driver.Main(String[] args) in c:\users\administrator\documents\visual studio 2010\Projects\testauto6\testauto6\Program.cs:line 23 
    at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) 
    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) 
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() 
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state) 
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) 
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 
    at System.Threading.ThreadHelper.ThreadStart() 

的InnerException信息:System.Runtime.InteropServices.COMException HELPLINK =# - 1073614806 消息=不能創建從XML任務 「任務」,輸入」 {} E3CFBEA8-1F48-40D8-91E1-2DEDC1EDDD56 「由於錯誤0x80070057」參數不正確。「

Source={8975114C-7D4E-4B27-8FB9-1B7EC264B4A7} 
    ErrorCode=-1073659898 
    StackTrace: 
     at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSExecutables100.Add(String bstrMoniker) 
     at Microsoft.SqlServer.Dts.Runtime.Executables.Add(String moniker) 
     InnerException: 

我suspision是,因爲我得到每當我試圖創建一個使用的紙幣或ezAPI實例數據流這個錯誤有一些問題,我特別打造connfiguration。

當我在我的.net項目中引用ezAPI.dll時,我引用了managedDTS和DTSruntimewrapper(從內存中的dll,因爲此刻我離開服務器)。我必須確保 我使用.net 4.o框架(不是客戶端)。

所以我的問題是:是否有一個特定的順序/方法/過程我需要使用配置能夠使用上面的配置?我已經成功創建了容器和可變參數成功運行的簡單包 。問題似乎與數據流和任務有關。

任何指導都很適合。我應該回到SQL 2008 R2而不是2012年,例如...

非常感謝。 Richard

+0

您是否檢查過使用SQL Server版本下載的ezAPI.dll的發行說明?並非所有版本的ezAPI都是穩定的。如果您使用的是SQL Server 2008 R2,根據以下鏈接,最後一個穩定的變更集爲65381:http://blogs.msdn.com/b/paulrizza/archive/2013/06/02/entry-2-ssis-intro -to-ezapi.aspx –

+0

非常感謝弗蘭克,我有一種感覺,我已經得到了2010年12月12日的構建,這可能與2012 SQl服務器不兼容。我有點慢,但最新的ezAPI條目說2012年,但沒有下載。你知道有沒有可用的。我試圖從代碼構建dll,但卻弄亂了獲取正確的GAC庫。你是否在2012年使用過ezAPI,如果是的話,該怎麼做?理查德 –

+0

比爾非常感謝你可以通過這個任何光。你的博客無價。理查德 –

回答

2

好吧,所以弗蘭克是在這個問題上,我使用的ezAPI版本與SQL Server 2012不兼容,所以錯誤是這個兼容性問題的一個有用的跡象。

所以你需要從零開始建立一個2012年。

要在2012年建立一個兼容的版本,你必須遵循以下步驟:

1/CodePlex從庫 代碼下載導航到(http://sqlsrvintegrationsrv.codeplex.com/releases/view/82369) 點擊更改組86517鏈接(http://sqlsrvintegrationsrv.codeplex.com/SourceControl/changeset/view/86517) 然後下載代碼和c#項目文件

2 /構建項目。您可能會發現圖書館的問題,Bill回答了一個有用的問題(VSTAScriptingLib for SQL Server 2012) 這現在可以工作,並且我成功地創建並運行了數據流任務。

謝謝你讓我走上正軌。

很高興。 Richard