无法在SQL Server Express中运行cmdshell @command

时间:2017-09-05 00:25:10

标签: sql-server-express sqlcommand

我无法在SQL Server Express中运行cmdshell @command命令。它与SQL Server版本有关吗?我是否应该像SQL Server标准版一样运行此命令?

2 个答案:

答案 0 :(得分:1)

启用它,如in the Microsoft article所述:

-- To allow advanced options to be changed.  
EXEC sp_configure 'show advanced options', 1;  
GO  
-- To update the currently configured value for advanced options.  
RECONFIGURE;  
GO  
-- To enable the feature.  
EXEC sp_configure 'xp_cmdshell', 1;  
GO  
-- To update the currently configured value for this feature.  
RECONFIGURE;  
GO  

答案 1 :(得分:0)

这是一个现在修复的许可问题!谢谢大家的帮助!