使用SQL Server 2005在存储过程内执行bat文件

Vin*_*ini 4 sql-server

当我尝试使用xp_CMDShell执行bat文件时,我收到一条消息为未识别的命令.

以下是我执行的命令:

EXEC master..xp_CMDShell 'C:\Documents and Settings\adcxqcv\Desktop\PQA\sample.bat' 
Run Code Online (Sandbox Code Playgroud)

我收到如下消息:

'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.
NULL
Run Code Online (Sandbox Code Playgroud)

有什么建议.让我知道如何在存储过程中执行bat文件.我是SQl Server的新手.

谢谢,Vinu

Tar*_*req 5

把路径放在""里面

EXEC master..xp_CMDShell '"C:\Documents and Settings\adcxqcv\Desktop\PQA\sample.bat"' 
Run Code Online (Sandbox Code Playgroud)