You can’t use varchar(max) with xp_cmdshell. Try a finite number (0 to 8000). varchar(max) is having capacity of 2GB & works as TEXT data type in background.
Home » CodeProject » Procedure xp_cmdshell expects parameter ‘command_string’ of type ‘varchar’.
Wow, fantastic blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your site is excellent, as well as the content!