I put together a pretty simple script. It adds a row number column to a flat file. Very simple, very straight forward.
This ran fine in SSDT, however it bombed in SQL agent because IS was not installed. I installed IS and now the script fails due to 'Object reference not set to an instance of an object'. If I uninstall IS, this works again.
This is all SQL Server 2012. Any ideas?
[Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute] public class ScriptMain : UserComponent { private int m_rownumber; public override void PreExecute() { base.PreExecute(); m_rownumber = 0; } public override void PostExecute() { base.PostExecute(); } public override void Input0_ProcessInputRow(Input0Buffer Row) { m_rownumber++; Row.rownumber = m_rownumber; } }
This ran fine in SSDT, however it bombed in SQL agent because IS was not installed. I installed IS and now the script fails due to 'Object reference not set to an instance of an object'. If I uninstall IS, this works again.
This is all SQL Server 2012. Any ideas?