SSIS - OLE DB Command DT_NTEXT Output Type and XML input
Problem: I am working on an SSIS data flow as shown in the image below. Here are the details of the flow. Getting some records. Adding a dummy column which is a DT_NTEXT type This an OLE DB command which is executing a stored procedure. The output of the stored procedure is XML but is of type NVARCHAR(MAX). The output is populating the dummy field. Writing the XML from the dummy column to a table. When the package is executed, the destination DB only gets populated with a < instead of the full XML. If I change the dummy column to type WSTR, the XML is succesfully written to the table in full. I need to write the XML to an NVARCHAR(MAX) field, as the XML could be large and exceed the limits of the WSTR type. Does anyone have an idea what is going on and how I can write my XML to an NVARCHAR(MAX) field? Solution: After running many experiments and searching over the internet, it looks like this is an issue in SSIS, since OLE DB Command cannot be mapped to DT_NTEXT