I have a SSIS package I am trying to schedule. I create a new job under SQL Server Agent. On the Command line tab of the jobstep, I choose "Edit the command-line manually".
The changes are retained as I switch from tab to tab within the job step but whenever I exit and save the job, the changes are lost.
Any ideas what's going on?
I'm on SQL Server 2008.
This is a confirmed bug, but here's a workaround that my team uses:
1) Script the create job statement (without your edits)
2) Delete the job from SQL Agent
3) Perform your edits in the create script
4) Execute the create job
This will allow you to keep your manually modified command line options.
There is a bug with the Set Values properties in SQL Server Agent for SSIS packages. You need to save the job step while still on the tab I think(?). I'll see if I can remember and reproduce the steps, but you're not going crazy. ;)
You may need to click "OK" for the job step, and "OK" for the job before moving on to any other changes in the job.
try a copy save as on the package and save change the protection level to encrypt sensitive data with password
I had the same issue when trying to append /DumpOnError to the command line tab of the only step in a job. What I realized was that the change was really performed. And I found it out by generating the "create job" script. What was happening then? Well, it seems as if in the edit box of the command line tab you always got the "default" configuration, however the real one is. I checked it on three installations. 2008 standard, 2012 enterprise and 2017 enterprise.
Related
This sounds similar to SSIS package SQL job not using new environment variable configuration, but when I did a test on my dev SQL Server box, I didn't have to restart the SQL Server agent. And honestly, if that is what it takes to prevent someone from 'hurting' themselves with this product, then. . . that is absolutely unacceptable.
UPDATE: And now, to follow up on that comment about SSIS package SQL
job not using new environment variable configuration possibly
being a solution.
It is not. I restarted the agent. No dice. Job still runs
successfully. I restarted the SQL Server Agent and Service. Again, no
failure.
This also sounds peripherally related to SSIS 2012 SQL Agent Job
ConnectionString vs InitialCatalog, but I've been working with SSIS
since 2005 and have never seen a connection string configure from it's
individual components. We have ALWAYS put the connecting string in the
.config files and had success.
I've got a problem that I haven't been able to resolve. Appears to be a bug, honestly, but I don't want to be so presumptuous.
I'm running SQL Server 2012 SP3 on Windows Server 2012 R2 in my test environment.
On my dev box, I'm running VS2012 + SSDT-BI.
I built a solution with a single SSIS 2012 project.
I deployed the SSIS Project to my Test SQL Server box.
I configured a new Environment (let's call it Fred).
I add variables to the Fred environment.
Some of these variables are connection strings.
I go back to the SSIS Project in the SSISDB tree. Right-click and configure.
I set all of my project's connection manager's connection string properties (only) to configure from one of Fred's connection string variables.
Now I have everything, connection-wise at least, wired to configure from my Fred Environment.
I created a SQL Server Agent job (of type SSIS) to execute a package.
I check the box to say Configure from environment .\Fred
I complete job configuration.
I right-click the job and choose 'Start Job at Step. . .'
The job executes. Yay! Everything works. Packages all execute. (Everyone is doing the dance of joy!)
Now here comes the part I can't resolve.
As part of my system testing (I'm new and cautious to the 2012+ Project Deployment model) I change a connection string value stored in one of my Fred Environment variables. This connection string was one that my SSIS project's connection manager's connection string (I triple-checked this) was configured to use.
The connection string is now invalid/incomplete and, now if I was to execute the same SQL Agent Job, the expectation is that the executed Package should fail (validation), right?
Well guess what. The job succeeds. (Dance of joy stops.) The packages all execute successfully. I check my test database environment and rows have been added to a table in a DB whose connection string is completed wrong (in the Fred environment).
So, now I think hmm, well, maybe I missed something. I go back in and I delete the environment variable that contains the invalid/incomplete connection string.
I execute the job again. Job succeeds. Uh, What?
I launch my dev instance of SQL Server 2012 (RTM, not SP3, incidentally)
I deploy a test project with the same project connection manager/environment configuration mapping
I go through the same steps. . .
BUT now this time, the job fails as expected. Note: No SQL Server agent restart made/required.
I go back to my Test box
I right click the SQL Agent (SSIS) job
I go to Properties > Steps (page) > Edit (first step. There's only one), and now I'm seeing the warning:
The parameter "SomeOtherSSISProjectParameter" is configured to use an
environment variable, but no environment variable 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)
Uh, what!?
First off, the Environment check box in this job step is already checked.
Secondly, this parameter is not related or mapped to the the Fred enviro. variable that I changed and then removed.
Thirdly the Environment variable value is not null or empty. It's still there, un-touched from when I first added it to the environment.
(At this point, I'm thinking the SSISDB is corrupt.)
I click passed the warning. Now that I am here in the SSIS Package SQL Server Agent config page, as I try to click OK (without making any changes) I NOW get an expected error message related to the orphaned Environment config.
Property "ConnectionString" of connection manager
"MySSISProjConnManagerName" is configured to receive a value from an
environment variable named "MyFredEnviroVariableName" but there is not
environment variable named "MyFredEnviroVariableName" in environment
".\Fred". Select a different environment, or use a literal value for
the property.
(Microsoft.DataTransformationServices.DTSExecUI.Controls)
So the good news is that I can't click OK to save this corrupt job/step, but the bad news is that I CAN click cancel, and I can right click the job and choose 'Start Job at Step. . .' and have it complete successfully when it absolutely shouldn't.
Yes, I restarted the agent. Yes, I restarted to server.
I tested the scenario on my dev instance (RTM) of SQL Server 2012, and I can't reproduce it. Can anyone else? Better yet, is there a fix solution? SP4?
Any help with this would be MUCH appreciated. As far as I'm concerned this is a show-stopper for using the Project Deployment model with 2012.
I created an sql server agent job that consists of steps that are calls to ssis packages.
Let's say that the job is being executed and one of the steps (that is a ssis package) has a file system task/sql task etc that fails. Is there any way that can I retry/rerun this particular package step (file system task/sql task etc) and then go on with my execution of the rest of the job steps after I fix my error? I know that you can retry certain sql server agent jobs and steps but I can't find any way to retry this step and resume my execution in case something inside the package fails.
And I also want to know if there is any way to disable certain package steps from the sql server agent "level" - without having to open Data tools.
Thank you.
Go into the job properties, and into the step that contains the SSIS package. Go to the Advanced tab, and you can modify the number of Retry Attempts for that step.
You could always put some error handling into the package in question. If an exception occurs, it will be handled accordingly allowing the other packages to continue. I always handle exceptions within the packages and log exceptions to a table.
In relation to your other question:
"And I also want to know if there is any way to disable certain package steps from the sql server agent "level" - without having to open Data tools. "
You could always go down the PowerShell route, create a script that takes a parameter. The parameter specifying whether or not you want a specific package to run.
If you want to skip certain steps within the package then you would have to create some sort of precedent constraint that acts on a variable you have set.
I set up a job to run a SSIS package in the SSIS Catalog, but the SSIS package doesn't start. If I right-click the package and run it, it completes successfully.
When I look in the execution history of the package in the Catalog, there is no sign that it the package was even started by the job.
I created a test package to make sure it isn't the specific package failing, so the package I'm testing with has a SQL Task that does a 'SELECT 1'. Still fails.
The job just stays in the "Executing" state until I stop the job.
I am running SQL Server 2014 Standard Edition, and running the job with a sysadmin account.
Why is the SQL Agent Job not running my package?
Edit: I had a look through this article but it either doesn't apply or I gave it a shot and it didn't work either.
Edit 2: I found an error under the SQL Server Agent Job History: Unable to terminate process 1850 launched by step 1 of job 0x5DAD5416FA09C445B82ABDBB49F75E38 (reason: Access is denied)
Does that mean my service account doesn't have enough permissions on the local machine? However, I AM able to run the job with DTEXEC using the service account without issues...
I have also faced this scenario many times but when I checked running the package manually,its completing successfully because I was using for each loop container and sequence container as well.In both cases for each loop and sequence were completing without validating other ones.So I checked precedence constraint and change it,Now it working and all the component ran successfully. Sometimes we miss to choose appropriate precedence constraint, there are many option like on Success ,failure,completion and then for you can choose values from Constraint ,Expression,Expression AND Constraint and Expression OR Constraint. Initially i was using Expression OR Constraint for success and now changed it to Expression AND Constraint, its working fine for me. You also need to do this,it will definitely work please try and let me know.
When you look at the connections in the SSIS package, did you put in a user id and password? If so, did you add a package password? The reason I ask is that if you don't add a package password, it will strip out things it thinks should be secure (like passwords). You might want to try putting the connection password in a configuration file, and add that file to the job. Either that or password encrypt the SSIS package but you will have to take special care when you run the package for the first time (or when you create the job) because you will need to provide the password that you used to encrypt the package.
Reboot fixes this issue. Reason is because if you look at this message. Unable to terminate process 1850. That is a windows process. I would say reboot. If you really like to enquire before rebooting. You could use sysinternals process explorer. Download it and use that to find process id 1850 which may be hung process in windows.
Thanks
Ali
currently im using Sql server 2008 r2 (will soon be upgrading to 2014). I need some help in changing job step properties using script.
I have around 20 jobs with each job having 4 steps.
I'm trying to change the below highlighted option using sql server script. Because manually changing all these options is a difficult task.
Please help me in writing script to remove the output log path, uncheck append to log, check log to table and check append log to table options.
I got the script
EXEC msdb.dbo.sp_update_jobstep #job_id=N'5e998659-8539-45d2-bf4f-874375c0a111', #step_id=1 ,
#output_file_name=N'',
#flags=16
I am trying to edit or view the SQL Agent's job (I am the owner of this job) from SSMS 2005 and I can't find out how to do this. When I am double-clicking a job or entering job's properties I get empty "New Job" window.
Is there some way to correct this behavior?
You can genereate SQL Script for SQL Job and then edit it. right click the job and then
click generate SQL Script. Here you can also change the job properties with the sql sciript
I ran into this problem a while back. I'm not entirely sure what caused it, but the fix was installing sp2 of sql server onto my local machine (or whichever machine you're using ssms on). the only documentation i found at the time suggested that that was the only solution.
I suggest you create a new job explicitly, then try editing your new job the same way and see what happens.
In particular, it's possible that your old job really is empty.
not sure what your issue with SSMS is. Maybe you dont have permission?
Unless your sa you need to be a member of the SQLAgentOperatorRole in MSDB?
If you can still run queries then look at the sysjobs and sysjobsteps tables in the MSDB database, this has all the properties
You can use the sp_update_job to modify the job