|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, January 02, 2013 3:13 PM
Points: 11,
Visits: 42
|
|
I have a job that has 4 steps. The first step runs the SSIS pkg. The second step calls a program after completing step one. I use the Operating System (CmdExec) in the step to call the program and run as a SQL Server Agent Service Account. Then the path to the .exe is in the command section. c:\MyProgramFile\MyProgram.exe with the process exit code as 0. I am not sure the program is running when it is called because the job immediately goes to the next step which is another program which does not appear to run either (the second program is set up the same way in its step). The job's next step is an SSIS pkg which runs fine.
My question. How do I make sure step 2 runs before the job goes to step 3? And how do I make sure it is running at all. The history log says it completed but I do not see the document should create.
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Monday, May 06, 2013 1:09 PM
Points: 15,439,
Visits: 9,569
|
|
Can you set up a Hello World app and run that as a test? Something simple that just writes a line to a text file or something like that? Then run that in the step to see what's going on a bit more indirectly.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, January 02, 2013 3:13 PM
Points: 11,
Visits: 42
|
|
| It runs using PowerShell but when I try to use the PowerShell that is in Sql Server Agent, it does not run. does anyone know what scipt I should use in PowerShell to run this .exe program? This is what I have: C:\myfile\myprogram.exe
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 5:46 AM
Points: 6,693,
Visits: 11,705
|
|
The PowerShell step type runs commands in a mini-shell called sqlps.exe which is not the same as what you get when you open a PowerShell prompt using powershell.exe so results may vary.
You said your program runs at a PowerShell prompt (powershell.exe). Have you tried running it at a standard CmdShell prompt (cmd.exe)?
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|