Home Forums SQL Server 2005 T-SQL (SS2K5) xp_cmdshell - Procedure expects parameter 'command_string' of type 'varchar' RE: xp_cmdshell - Procedure expects parameter 'command_string' of type 'varchar'

  • You can't use varchar(max) with xp_cmdshell. Found that out the hard way. Try a finite number (I usually just go with either 1000 or 8000).

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon