Max length of System::PackageName variable
We have made a solution with SSIS that also logs the name of the package for debugging purposes. In this scenario we make use the System::PackageName variable to retrieve the name of the package during runtime. However, me and my collegues are not quite sure what the size of the logcolumn in the database should be, in order to store the value of System::PackageName. Does anyone know what the maximum length (and datatype) of System::PackageName is? I know it's a 'string', but I need a bit more specific information in order to write it into a database.M. Streutker, Info Support | Blog
November 17th, 2010 6:20am

Strangely enough PackageName can be longer than the maximum OS filename (255). If you think you will have extremely long package names go with varchar(8000) otherwise varchar(255) should suffice, as packagename defaults to the dtsx filename.My Blog "Karl Beran's BI Mumble"
Free Windows Admin Tool Kit Click here and download it now
November 17th, 2010 6:34am

Data type of System::PackageName is String and String doesnt have Maximum length ( i think it can go as much memory you have on system) So its all upto you to decide the maximum length anyway the default log table created by SSIS have nvarchar(1024) as column datatype to hold PackageName. Hth!! Rahul Kumar, MCTS, India, http://sqlserversolutions.blogspot.com/
November 17th, 2010 6:35am

Thank you both for your input. So, correct me if I'm wrong, the PackageName variable contains the value of the Name property of the package, which is the physical name of the package by default. The physical name of the package is restricted by the maximum OS filename, which is 255 characters. So, if we make sure (by not altering it afterwards) that the Name property of the package contains the physical name of the package (minus extension), we should be able to manage the logging with 255 characters... right?M. Streutker, Info Support | Blog
Free Windows Admin Tool Kit Click here and download it now
November 17th, 2010 6:50am

Thank you both for your input. So, correct me if I'm wrong, the PackageName variable contains the value of the Name property of the package, which is the physical name of the package by default. The physical name of the package is restricted by the maximum OS filename, which is 255 characters. So, if we make sure (by not altering it afterwards) that the Name property of the package contains the physical name of the package (minus extension), we should be able to manage the logging with 255 characters... right? M. Streutker, Info Support | Blog Basically, yes. Note however that PackageName variable is only the same as the filename by default. There is no constraint that says that must be the case - and you can change the name of the package independently of the filename. http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
November 17th, 2010 6:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics