Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Extracting schema from a connection manager Expand / Collapse
Posted Friday, July 3, 2009 2:28 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, March 18, 2016 5:38 AM
Points: 969, Visits: 704
Hi all,

Some background:
I have an SSIS package that has been in a production environment for about a month, the essence of the package is that it reads in an extract from a 3rd party, checks for some invalid dates and checks each field to see if it would cause truncation when going into yet another 3rd party's database.

The issue:
This morning all the records failed due to an error where data could not be converted and were exported to a failure file.
The flat file connection manager input for this attribute was set as DT_STR 50 however the output in advanced editor shows the output column do be a DT_I4.

Question 1:
Would I be correct in saying that SSIS sampled the data originally whilst in development and chose DT_I4 as the output? It is possible that originally there was a 0 placeholder in the file as this attribute is a scrath attribute which is now being used for a date.

We had an issue here about a year ago where we found a legacy DTS package had sampled some data and just ignored subsequent data based on that!

Question 2:
There are 95 attributes in this flat file. is there a way that I can extract from SSIS what the schema for both the input and output columns are and run a comparison?
I don't relish the job of checking 190 attributes making sure that the data type and precision are correct. It would also help to make sure all the packages are more robust going forward.

Any help would be appreciated!


Hope this helps,

Post #746864
Posted Thursday, October 20, 2011 2:48 PM



Group: General Forum Members
Last Login: Friday, May 15, 2015 7:38 AM
Points: 440, Visits: 635
I wish I had a better answer for you, but the only way I have found to transfer the columns without recreating them is to hand-edit the .dtsx file using a text editor (something like Ultra Edit which is made for large complex text files) and transfering the column name and width information. However, editing the wrong lines can result in file corruption, causing the dtsx package not to load into BIDS, so make backups of the files you are editing before you start.

It is tedious, but for me not as tedious as recreating the 200 or so columns I have in the average space aligned text file using the Connenction Manager's GUI Advanced Colums editor. Once or twice a year I have to add or subtract a column and this saves me some time.
Post #1194033
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse