solving sql server problems for millions of dbas and developers since 2006



SQL Server DBA Tips SQL Server Developer Tips SQL Server Business Intelligence Tips SQL Server Career Tips SQL Server Whitepapers SQL Server Tools SQL Server Webcasts SQL Server Questions and Answers SQL Server Questions and Answers













Executing batch file from SSIS

Asked 2/1/2012 2:54:15 AM by Beeram

Hi

I have a SSIS package which sftp the files . I have a script task which executes the batch file . The batch file reads the commands in a txt file and transfer the files to ftp server. The problem is, When executed using BIDS the files are transferred and eevrything works fine. But when I schedule the package using SQL agent, the files are not getting transferred. Also the job does not fail.

I am confused if the issue is somehow related with setting up a proxy account for executing the batch file. Can you please provide your valuable suggestions.



Answered 2/1/2012 3:09:44 AM by Beeram (-1) vote answer is useful vote answer is NOT useful

sorry for the typo...it is Execute process task which executes the batch file


Answered 2/1/2012 10:13:03 AM by Greg Robidoux (1) vote answer is useful vote answer is NOT useful

Is there any info in the SQL Agent job history for that job or does it just say that it is successful?

Check that your SQL Agent account or proxy account that you are using has access for both FTP and copying the files.

Are you using a Windows account for SQL Agent?  Can you login to the server where these are running with the Windows account and see if you can run the package?


Answered 2/2/2012 3:55:08 AM by Beeram (0) vote answer is useful vote answer is NOT useful

Hi Greg,

Thanks for the reply. Job history just shows that job ran successfully. I would like to elaborate more on the problem. I have got SSH client installed in the server and I generated the SSH User keys with my windows login which is then uploaded to SSH server. Now when I run the package (I am the owner of the package) using BIDS , the files are transferred. But when I schedule it to run with "sa " as the owner and running the package under default SQL Agent service account, the files are not getting transferred. I tried running the package with my windows login as well but to no avail. I truly appreciate your help on this.

 

Thanks in advance

Beeram



Post an Answer

Keep it clean and stay on the subject or we may delete your comment.
Your email address is not published. Required fields are marked with an asterisk (*)

*Name   *Email   Notify for updates
Comments
*Enter Code refresh code


 
Sponsor Information
"SQL diagnostic manager delivers response in minutes, not hours!"

SQL Monitor – For database professionals who need results on Day One. Try it online.

Need SQL Server help and not sure where to turn? Reach out to expert consultants for a Health Check.

Get SQL Server Tips Straight from Kevin Kline.

Solving SQL Server problems for millions of DBAs and Devs since 2006. Join now.

Learn SQL Server 2012, Performance Tuning, Development, Administration, Replication and more - free webcasts


Copyright (c) 2006-2012 Edgewood Solutions, LLC All rights reserved
privacy | disclaimer | copyright | advertise | about
authors | contribute | feedback | giveaways | user groups
Some names and products listed are the registered trademarks of their respective owners.


Edgewood Solutions LLC | MSSharePointTips.com | MSSQLTips.com