There is no appropriate variable in the current evironment to map to the parameter "ParamName"

Peter Bishop 161 Reputation points
2022-11-30T12:16:12.31+00:00

When I run a package from the SSIS catalogue, it works fine. However, when I run a parent package from the same deployed project which calls this package I get the error:

There is no appropriate variable in the current evironment to map to the parameter "ParamName"

(Note that the misspelling of "environment" is actually how it's reported in the [SSISDB].[internal].[operation_messages] table)

Does anyone know what might be causing this issue?

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,517 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael Taylor 51,071 Reputation points
    2022-11-30T15:12:35.593+00:00

    Going to go out on a limb and guess this is a custom message perhaps?? It sounds like it is coming from the parent package and that the parent package isn't able to run the child package because it is missing a ParamName. This error could be coming from a custom task/component though. I would start by opening the package in a text editor and searching for evironment and ParamName. If it is in a script task it should find it. If it doesn't then it could be a custom task/component.

    A quick google shows that the (correctly spelled) error can occur in SSIS so it is possible either somebody replicated that code, the official SSIS code has a misspelling or a malicious component is installed. You can read more about the (official) error here which should help resolve the actual error.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Yitzhak Khabinsky 25,731 Reputation points
    2022-11-30T15:18:01.81+00:00

    Hi @Peter Bishop ,

    It seems that you are using SSIS Execute Package Task.
    Go to the Execute Package Task Editor and check Parameters bindings.
    It allows to bind parent package variables to the child package parameters.

    It would be helpful if you will add a screenshot of the Execute Package Task Editor, Parameters bindings window to the question.

    My guess is that the child package parameter "ParamName" has no parent package variable assigned to it.

    0 comments No comments

  2. Peter Bishop 161 Reputation points
    2022-11-30T16:00:35.483+00:00

    Hi @Michael Taylor .

    Good thinking on checking the code for something custom within the package. It didn't solve the problem but it's certainly something I'll add to my bug checking list.

    There are no custom tasks or components, although as @Yitzhak Khabinsky surmised, it is using the "Execute Package Task". However there are no parameters being mapped in there as the problematic package has no required parameters. This is the same code as we're running in 2016 PROD without any issue (the issue is on our 2019 DEV environment).

    I had seen the post by MsSQLGirl but as it was 10 years old, I didn't think it would still be relevant. As it turns out, however, I was wrong as implementing that change fixed the problem. I want to try redeploying the entire project again as well - since that's more supportable - but currently there are some items checked out in TFS that I'm waiting on others to check in. I'll feedback whether that also fixed the problem when I know more.

    @Yitzhak Khabinsky - I would have added some screenshots if I'd thought it would help but having checked all of that configuration - and as it's not a complex package - I didn't feel it would add anything.

    Thanks both.