Monday, March 19, 2012

Maximum size of the SSIS String Variable?

In SSIS, what is the maximum size of the String variable (one that you would define in the Variables dialog box)?

I think its 4000 but I could be mistaken.

|||

4000 is the limit on expressions. I'm not sure what the limit is on strings.

|||

jwelch wrote:

4000 is the limit on expressions. I'm not sure what the limit is on strings.

This is all true. Technically, I'm not sure there's a limit on the string variables. Though you can't really use that variable anywhere without the 4000 character expression limit applying. (Most of the time the variable is used in an expression SOMEWHERE...)

|||

I don't believe there is a limit on the string variable size. As mentioned, there is a 4000 character limit in the expression editor, and I believe the limit for NVARCHAR fields for the SQL Native Client provider is also 4000 (above that it has to be NTEXT).

|||

I'm using the String variable to store the text of an XML File that I then reference in the XML Source component, so the 4000 character limit isn't a concern for me.

I'm wondering, though, when the size of the String variable becomes a problem -- will it handle the text 100K file? I suppose I should just do a quick test and see what happens.

|||

Post back and let us know.

|||

I just loaded a 600,000+ character file into an SSIS String variable without any problems, so I'm assuming that there isn't a built-in maximum size -- although, as the other posters mentioned, there are limitations on size of a String variable you can use in expressions, etc.

This should be very useful for my purposes -- now I'm able able to store my medium-sized XML files as SSIS Strings (for use in the XML Source component) without much worry.

|||

Can you let us know how you loaded this many characters into the SSIS string variable?

No comments:

Post a Comment