• slimchance99 - Tuesday, February 6, 2018 7:06 AM

    Phil Parkin - Monday, February 5, 2018 2:43 PM

    slimchance99 - Monday, February 5, 2018 2:08 PM

    I have a package where network file paths are set up as package parameters, and these parameters are referenced in package variables that concatenate with file names read from file enumeration loops. Something like @[$Package::parWorkingFIlePath] + @[User::usrXMLFileNamePath]

    Everything works fine in VS. My deployment plan was to use environment variables to read in the testing/production file paths from environment variables to the parameters on the server. On the server all of the variables that reference the package parameters populated from the environment variables fail validation, with a message that the 'expression cannot be parsed'.

    I saw a mention somewhere that environment variables cannot be referenced by package variables. Is this the case? If so what would be the best method to pass the folder paths to the package variables?

    Thanks

    Environment variables pass values to parameters, which are then read-only throughout package execution.
    Package variables can reference the values of parameters (as passed in from an environment variable), no problem.
    Does that help at all?

    That is my understanding, and that is how the packages are built. but for some reason all of my package variables that reference the parameters show validation errors on the server (no problem in VS)

    thanks

    SSDT does not use SSISDB environment variables, if you are referring to 'Debug' mode.
    Did you double check that 
    a) The correct environment has been mapped to the correct project (using 'Configure'), and
    b) That the variable mappings have been made correctly (also using 'Configure'), and
    c) That the SQL Agent job running the package is configured to select the correct environment (on the 'Configuration' tab, while in 'Edit Step').

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.