I'm using MS SQL server 2014 web edition.
I created a maintenance plan, and I used a T-SQL statement task to execute xp_cmdshell to execute a batch file.
T-SQL statement:
exec master.dbo.xp_cmdshell 'Path\XX.bat'
When doing so, I get success. But the batch file isn't working. (it should compress the .bak files using winrar). The batch file works fine when executed manually. The login I'm using is "sa" has sysadmin role, and the owner of the master database.
I checked if I can reach the path and turns out I can cause I can see the files in there, using this:
EXEC master.dbo.xp_cmdshell 'dir X\XXX'