none
Environment Error in Agent Job GUI RRS feed

  • Question

  • Hi,

    for a couple of days we get the following error on editing an Agent Job Step via GUI.

    "

    The parameter "ServerPath_Import_Merlin_SampleStreetECS" is configured to use an environment variable, but no environment has been selected.  Check the "Environment" checkbox and specify the environment to use, or specify a literal value for the parameter. (Microsoft.DatatransformationServices.DTSExecUI.Controls)

    ------------------------------
    Program Location:

       at Microsoft.DataTransformationServices.DTSExecUI.Controls.ParameterViewCtrl.BuildCommandLine()
       at Microsoft.DataTransformationServices.DTSExecUI.Controls.BaseControl.get_CommandLine()
       at Microsoft.SqlServer.Management.SqlManagerUI.DTSJobSubSystemDefinition.GetCommandLineInteral(Boolean bIncludePasswords)
       at Microsoft.SqlServer.Management.SqlManagerUI.DTSJobSubSystemDefinition.Microsoft.SqlServer.Management.SqlManagerUI.IJobStepPropertiesControl.Save(JobStepData data, Boolean isSwitching)
       at Microsoft.SqlServer.Management.SqlManagerUI.JobStepProperties.OnGatherUiInformation(RunType runType)
       at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.OnGatherUiInformation(RunType runType)

    "

    We are using SQL Server 2012.

    The Environment is set and we checked the reference Ids in SSISDB an try to recreate the Environments and AgentJobs but the error still present. The Jobs can be executed and working fine, we only can't edit them by GUI.

    Two things we've done before we recognize the issue.

    1. We try to create Environment and AgentJobs by PowerShell Script, but we only created new ones and doesn't edit the existing Agent Jobs or Environments. We also lock if anything has changed, but everything looks fine. And the Jobs running succesfully and getting the correct Environment Parameters.

    2. We install latest SQL Server Updates

    - Update for Windows Server 2012 R2 (KB3100956, KB3112148, KB3101183, KB3099834, KB3100919, KB3112336)

    - Security Update for Windows Server 2012 R2 (KB3108347, KB3109094, KB3108381, KB3109103)

    Does anyone have a similar issue or know how to fix this? I've searched the web but have no idea what is the reason for this error.

    Thanks!

    Tuesday, February 2, 2016 2:52 PM

Answers

  • Hi,

    we have found our Problem. One of our Environments (we are not using at the moment) missing one Parameter. That's resulted in the Error message in Agent Job configuration. After we correct the other Environment. All Jobs can be edited without problems.

    Best regards

    Sebastian

    Thursday, February 4, 2016 8:11 AM

All replies

  • Greetings,

    The error itself tells me you're using SSIS on Project-deployment with a variable specified to be configured by the environment.

    In the SQL_Agent, on the job-step go towards the 'configuration' tab.
    on this tab select "environment" and ensure the parameters are mapped to values of the environment.

    for a guide on this please review the post made by SqlChick named:
    http://www.sqlchick.com/entries/2015/1/4/parameterizing-connections-and-values-at-runtime-using-ssis-environment-variables

    Sebastian

    • Proposed as answer by elango.mg Monday, April 2, 2018 4:27 PM
    Tuesday, February 2, 2016 2:59 PM
  • Hi Sebastian,

    thanks for your quick Response.

    Yes, we are using Project-deployment. The Environment is set. It all works for over a month and we have no Problems to map the Packages variables to the Environment. But since last Friday something went wrong and i have no idea where to look.

    Greetings

    Sebastian

    Tuesday, February 2, 2016 3:18 PM
  • Hi,

    we have found our Problem. One of our Environments (we are not using at the moment) missing one Parameter. That's resulted in the Error message in Agent Job configuration. After we correct the other Environment. All Jobs can be edited without problems.

    Best regards

    Sebastian

    Thursday, February 4, 2016 8:11 AM
  • Hi, 

    I am having the exact same problem. The environment has the variable created and the value assigned. I have configured the project to reference the environment. The Agent job was created using a script and is referring to the environment, but still I get the message "The parameter ... is configured to use an environment variable, but no environment has been selected.  Check the "Environment" checkbox and specify the environment to use, or specify a literal value for the parameter. (Microsoft.DatatransformationServices.DTSExecUI.Controls)"

    I have tried recreating the environment and the agent job, but I cant seem to find any way of editing the steps through the GUI since this message shows up all the time. 

    Using SQL Server 2014 (

    Microsoft SQL Server 2014 - 12.0.2000.8 (X64) 
    Feb 20 2014 20:04:26 
    Copyright (c) Microsoft Corporation
    Developer Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: )

    What shall I do next?


    • Edited by Fosselius Wednesday, February 10, 2016 12:26 PM Added SQL Server info
    Wednesday, February 10, 2016 12:25 PM
  • Hi,

    did you have multiple Environments? in our case they where out of Synchronisation (one of our Environments missing one Parameter).

    Can you Execute the Jobs, created by Script?

    Is it possible to create new Agent Jobs without this error message (maybe referring to another SSIS Project)?

    In SSISDB the Environments having IDs the Agentjob reference to.

    @command =N'/ISSERVER "\"\SSISDB\SSIS Packages\SSIS Project\SSIS Package.dtsx\"" /SERVER "\"ssis-server\"" /ENVREFERENCE 40 /Par "\"$ServerOption::LOGGING_LEVEL(Int16)\"";1 /Par "\"$ServerOption::SYNCHRONIZED(Boolean)\"";True /CALLERINFO SQLAGENT /REPORTING E',

    The ID in Command Parameter /ENVREFERENCE must exist in SSISDB.internal.Environments.

    Greetings

    Sebastian

    Thursday, February 11, 2016 2:53 PM
  • Try right clicking on the project in Integration Services Catalogs - and choose "validate" .  We have found that the error is misleading - and one of our variables was spelled incorrectly.

    So the error in the Job GUI, when opening the job/step, said that we needed to choose an environment (we already had that configured).  But validating the SSISDB project in SSMS gave us the more accurate error.

    • Proposed as answer by Carrie O'Gara Wednesday, December 28, 2016 5:06 PM
    Wednesday, December 28, 2016 4:56 PM