Microsoft KB Archive/266224

= BUG: Only One Double-Quoted String Allowed in xp_cmdshell String =

Article ID: 266224

Article Last Modified on 10/17/2003

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition
 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q266224



BUG #: 58037 (SQLBUG_70)

BUG #: 217533 (SHILOH>



SYMPTOMS
Commands that are run by xp_cmdshell, which contain two or more parameters delimited by sets of double-quotes, do not run correctly. When you run the following command from the Query Analyzer: EXEC master..xp_cmdshell '&quot;C:\whats this\prgm.exe&quot; -i &quot;c:\test dir\SQL.txt&quot;' the following error message occurs:

'C:\whats' is not recognized as an internal or external command.



WORKAROUND
Create a batch file to run the operations and then run that batch file by using xp_cmdshell.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Additional query words: xp_cmdshell and spaces in directory names, double quoted string

Keywords: kbbug kbpending KB266224

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.