Showing posts with label component. Show all posts
Showing posts with label component. Show all posts

Tuesday, March 20, 2012

Could Script Task Component uses a Framework 1.1 assembly?

Could Script Task Component uses a Framework 1.1 assembly?

Yes, it can - we did some testing. But you have to copy it to SYSTEM\assembly and register it in GAC (gacutil.exe).

HTH

Could not set "Ignore Failure" for OLE DB Destiantion component

I am using Microsoft SQL Server Integration Services Designer
Version 9.00.1399.00.

My OLE DB Destiantion component is inserting data into a table. When there is duplicate it will failed. But I want ignore this since I know data is same. But even I set Ignore Failure from OLE DB Destioantion Editor. It will not work and every time you reopen editor, the buttom drop down box always showing as " Fail componet". When I try run it, it will always fail on the inserting duplicated rows.

Does anyone know how can I tell servies ignore this error.

Thanks!

About the table, did you set any unique (or clustered) index on it?

Philippe

|||

Hi Jun,

Setting Ignore Failure doesn't cover all bases. As Philippe alludes to, you cannot violate a Unique constraint.

Hope this helps,
Andy

|||

Yes. I do have unique constraint on that table. But what kind failure it will ignore?

By the way, I get this work around by add aggregate function before. Thanks for the help!

Jun Fan

Monday, March 19, 2012

Could not obtain a DataReader object from the specified data flow component.

I am getting the following exception when attempting to read from a DataReaderDestination:

System.Exception was unhandled
Message="Could not obtain a DataReader object from the specified data flow component."
Source="Microsoft.SqlServer.Dts.DtsClient"
StackTrace:
at Microsoft.SqlServer.Dts.DtsClient.DtsCommand.internalPrepare(Boolean fReaderRequired)
at Microsoft.SqlServer.Dts.DtsClient.DtsCommand.ExecuteReaderInThread()
at Microsoft.SqlServer.Dts.DtsClient.DtsCommand.ExecuteReader(CommandBehavior behavior)
at CA3DataImportTool.ViewSSISOutput.btnRun_Click(Object sender, EventArgs e) in C:\Documents and Settings\rhein\My Documents\Visual Studio 2005\Projects\CA3DataImportTool\CA3DataImportTool\ViewSSISOutput.cs:line 35
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at CA3DataImportTool.Program.Main() in C:\Documents and Settings\rhein\My Documents\Visual Studio 2005\Projects\CA3DataImportTool\CA3DataImportTool\Program.cs:line 18
at System.AppDomain.nExecuteAssembly(Assembly 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)
at System.Threading.ThreadHelper.ThreadStart()

If I use the example from SQL Server BOL (http://msdn2.microsoft.com/en-us/library/ms135917.aspx), and make a new package for the sample in the same project, the sample works. The only thing that I can see that is significantly different between my code and the sample is that my DataReaderDestination has a lot more data in it, but here's the relevant code:

string dtexecArgs;

string dataReaderName;

DtsConnection dtsConnection;

DtsCommand dtsCommand; //IDbCommand

IDataReader dtsDataReader;

DataTable dtsTable;

dtexecArgs = @."/FILE ""C:\Documents and Settings\rhein\My Documents\Visual Studio 2005\Projects\CA3DataImportTool\ML3000_IntegrationProject\Package.dtsx"" ";

dataReaderName = "DataReaderDest";

dtsConnection = new DtsConnection();

dtsConnection.ConnectionString = dtexecArgs;

dtsConnection.Open();

dtsCommand = new DtsCommand(dtsConnection);

dtsCommand.CommandText = dataReaderName;

dtsDataReader = dtsCommand.ExecuteReader(CommandBehavior.Default); // EXCEPTION HERE

Please help!

Richard Hein

I get this when I have the worng name, check the name of your data reader destination really is DataReaderDest.|||

Quadruple checked ... I tried changing the name, increasing the DtsCommand timeout to 30 seconds, and I added another Data Flow Task to the same package with a DataReaderDestination and it worked. Very strange ... I must be missing something!

|||I looked at the difference between the Data Flow Tasks, and after some tests, I found that Delay Validation = true causes this error. Changing it to false solved the problem.|||Ahh yes, that one is fun too. For completeness, the real error you get when you get the data reader name (CommandText) wrong is, "The specified data flow component was not found in the package."