Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 SSIS and Import/Export (2012)
 SQL Job Failed

Author  Topic 

peace
Constraint Violating Yak Guru

420 Posts

Posted - 2013-07-05 : 12:52:39
I did an SFTP to command the job via winSCP.

I manage to run execute it in SSIS.

When I try to schedule it in SQL Agent, I'm getting this error:

Code: 0xC002914C Source: Execute Process Task Execute Process Task Description: The process timed out. End Error DTExec: The package execution returned DTSER_FAILURE (1).

I did set password EncryptSensitiveWithPassword.

In the SQL agent job it manage to pump in the data to my local folder but will hit the error as above to SFTP over.

Execute in SSIS is successful.

How can I fix this?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-07-07 : 10:39:34
How are you storing the password for SFTP? Are you hardcoding it in package? If yes, it wont be able to read it unless you set correct password in sql server agent for package which you gave during development

The ideal way to do it is to create a variable to store it and create the script file for WinSCP dyamically using it
Then make it a configuration item and then set values correctly in config file, either XML or sql server table

see this illustration

http://visakhm.blogspot.in/2012/12/implementing-dynamic-secure-ftp-process.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

peace
Constraint Violating Yak Guru

420 Posts

Posted - 2013-07-07 : 10:49:58
I store the password in winSCP itself.
In SSIS package, I already set the arguments for SFTP.

It works fine. I only hit the error when I schedule it in SQL Agent.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-07-07 : 12:11:24
thats because of your packages protection level. The best method is what I suggested as I've shown in the link so that its independent of your packages protection level property. Did you try it at all?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -