Domanda

I want to add a parameter to a step that runs an operating system (CmdExec) in SQL Server Agent. I have searched everywhere and asked my coworkers and none of them had tried it before. I have attached a picture of the screen. I was thinking that I might be able to add the parameter (file path) after the .exe statement, but wasn't sure.

I thought the following might work:

Executable Path              Parameter Path
C:\MyProgram\MyApp.exe       E:\AppInfo\Client\Config.txt

This is on a production server and I didn't want to break anything if this isn't correct.

Thanks!

Picture of Job Step

È stato utile?

Soluzione

Yes You can use parameters, so your command would be:

C:\MyProgram\MyApp.exe E:\AppInfo\Client\Config.txt

If there is a space in the name don't forget to use quotes as specified in tip in screenshot:

"C:\My Program\MyApp.exe" "E:\App Info\Client\Config.txt"

Since You want to try it on production server, consider testing your configuration and software on test environment first. If You doubt that this will work, You can set job to execute only this single step to make sure it will work as expected.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top