command
Use this CHAR(8000) parameter to specify a system command.
redir_output
Use this optional CHAR(254) parameter to specify whether to display output in a command window. The default behavior
is to display output in a command window. If you specify 'no_output', output is not displayed in a command window.
xp_cmdshell executes a system command and then returns control to the calling environment. The value returned by xp_cmdshell
is the exit code from the executed shell process. The return value is 2 if an error occurs when the child process is started.
The second parameter affects only command line applications on Windows operating systems. For Unix, no command window appears,
regardless of the setting for the second parameter.
For Windows Mobile, any commands executed are visible in the database server message log, regardless of the setting for the
second parameter. The console shell \\windows\cmd.exe is needed to run the procedure.