Thursday, August 14, 2008

SSIS - System Null Reference Exception

If you facing the error message in SSIS like below:

Error: System.NullReferenceException:
Object reference not set to an instance of an object. at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper90 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer90[] buffers, IntPtr ppBufferWirePacket)

Possibilities are:-
- You might be using "Select * " statement in Data Flow Source, and the source has added new columns.
- There's an empty row data exists in Data Flow Source result.

Solutions:-
- Open the SSIS package, refresh your Data Flow Source Query. Check the added field in the external/output column. If the new column is required, you can create the field in the destination database, and map it with the new created source column.
- To avoid this type of error message in daily scheduling, try to use "Select specific fields" rather than using "select * statement". Which might be dangerous and will cause the package failure.
- Try to split empty rows with using the conditional split provided in SSIS.

1 comment:

Sofia Dominguez said...

Thanks! That was very helpful!!