SSIS package doesn't pick up values from Config file

  • Hi,

    I want my SSIS package to pick up the file path at run-time.

    I created Config file:

    ----------------------------------

    ..Can't insert XML. Keeps removing it..

    Anyway the logic is:

    Configuration ConfiguredType="Property" Path="\Package.Connections[CCAPHN].Properties[ConnectionString]" ValueType="String"

    ConfiguredValue>C:\Groundhog\InputFiles\TCCC.C069.BIOS.CCAPHN.DAT /ConfiguredValue

    /Configuration

    /DTSConfiguration

    -----------------------------------

    I run DTEXEC command:

    dtexec /f LoadBROADfiles.dtsx /conf "C:\SSIS\SSIS_projects\Groundhog\Groundhog.config"

    but get an error:

    Cannot open the datafile "W:\APPSv00\cmd\ghConv\InputFiles\TCCC.C069.BIOS.CCAPHN.DAT".

    It's supposed to pick the file path from Config - C:\Groundhog\InputFiles\TCCC.C069.BIOS.CCAPHN.DAT

    Looks like Config values are not being picked up.

    How do I troubleshoot it?

    What's the best way to test if SSIS package uses Config values?

    Robert

  • Robert,

    I'm not too sure what it is that you are looking to do, but if you want to just find out if the package is actually connecting to the configuration file you could do this:

    1. Declare a package level variable

    2. Add a script object to your Flow

    3. Make the variable updateable and readable

    4. Code the below into the script

    Dim strPackage As New Package

    Dts.Variables("MyPackageVar").Value = "Package CreatorName: " & strPackage.CreatorName

    MsgBox(Dts.Variables("MyPackageVar").Value)

    Dts.Variables("MyPackageVar").Value = "Package CreationDate: " & strPackage.CreationDate

    MsgBox(Dts.Variables("MyPackageVar").Value)

    This will at least tell you if you are seeing the package configuration.

    I hope this helps,

    Brian K. McDonald

  • I couldn't get that to work either. I changed the package configuration to be stored in an environment variable (Indirect XML configuration file). Place the full path to the configuration file in the variable before executing the SSIS.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply