1

I am using SQL Server Agent to run a few scripts regularly of type CmdExec with the following format: "Absolute path to RScript.exe" "Absolute path to script.R" > "Absolute path to log folder\logfilename.txt"

This line will work when used manually in the command prompt but won't create a log file when executed through SSMS. Anyone else have trouble dealing with SSMS or is there a problem with my line?

What also works (in the sense that a file is created) in SSMS is type nul > "Absolute path to log folder\logfilename.txt" so there is no problem with the file path or write permissions.

Thom A
  • 88,727
  • 11
  • 45
  • 75
Birk
  • 59
  • 5

1 Answers1

1

Not sure if this piping is possible for "normal" commands, but under Step Properties -> Advanced, you can choose to save output to file

siggemannen
  • 3,884
  • 2
  • 6
  • 24