I have a script task (VB 2008) inside an SSIS dtsx package that I’m trying to use to get the name of the dtsx file.
For example, the filename for the SSIS package is Package1.dtsx. I want to return Package1.dtsx to the script. I saw the system variable for PackageName, but that’s could be different than the filename.
Any ideas? I’ve searched for a little bit and everything points to using something like:
WScript.ScriptName
But that just gives me an error:
Name 'WScript' is not declared.
I’m assuming what I want to do is possible, but maybe it’s not.
Thanks.
Packages don’t have to be stored in .dtsx files; they can be stored in an Integration Services instance, in SQL Server itself, or even created on-the-fly programatically. (See the documentation for the Application.LoadFromDtsServer and Application.LoadFromSqlServer methods.)
You could create a user variable and have whoever executes your package set that variable to the package file name. Apart from that, though, System::PackageName is the closest you’ll get.