小编Vin*_*ini的帖子

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

当我尝试使用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

sql-server

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

sql-server ×1