[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2808
  • Last Modified:

How to run .Exe file from SSIS package with scheduled job?

I am running .Net Application exe file from SSIS package (Script task). It will create .dat file in the configuration file folder. It doesn't have any parameters. In the script task I gave the below script.      
Public Sub Main()
        Dim i As Integer
        i = Shell("cmd /C" & "\\Servername\ETLConfig\client\client.exe", AppWinStyle.Hide, True)
           Dts.TaskResult = Dts.Results.Success
End Sub
It is running fine if i ran manually. But if i schedule this package then it is not running even with admin user also. It is not giving any error it ran 1 sec then it completed with success status. Please clarify me.
0
PKTG
Asked:
PKTG
  • 3
  • 2
  • 2
2 Solutions
 
Anthony PerkinsCommented:
Does the account for the SQL Server Agent service have all the necessary permissions or is it just the Local System Account.
0
 
PKTGAuthor Commented:
SQL Server Agent and SQL Server Services has same Domain account and it has all necessary permissions. But i can't undersatnd why i can't run the package as a job. Please advise me. Thanks in advance
0
 
Anthony PerkinsCommented:
If the SQL Server Agent service startup account has the necessary permissions then I am afraid I have no idea.
0
Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
nmcdermaidCommented:
Is there any reason you are running it as a script task? why not just run it as an execute process task? Is this a console app or a winforms app?
0
 
PKTGAuthor Commented:
winforms App
0
 
nmcdermaidCommented:
I still don't know why you are using a script task instead of an execute process task.
Anyway, you need to log into the server as the SQL Server Agent account and run the App directly and see what happens. I agree with acperkins that it is a user security issue.
Its usually not a good idea to run a winforms app in a job, as a winforms app can get 'stuck' if a dialog box pops up.
A console app does not have this issue.
0
 
Anthony PerkinsCommented:
>>Its usually not a good idea to run a winforms app in a job<<
Good point and I believe you are on the right track.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now