我已经为bash编写了一个脚本,并在Windows 10上安装了bash,所以当尝试在命令提示符中运行该脚本时,请编写以下语法:
bash -c "/home/behzad/SIP-CMD-BYE_OLT-CMD-ACT.sh 09400098129 1234 8 2
1 1 99 3 2001"一切都很好!现在,我想在Server中运行该脚本,为此目的,在Server中编写这个T:
EXEC master..xp_CMDShell 'bash -c "/home/behzad/SIP-CMD-BYE_OLT-CMD-ACT.sh 09400098129 1234 8 2 1 1 99 3 2001"'但是Server只显示字符结果W和bash脚本不起作用。我怎样才能解决这个问题?谢谢大家。
发布于 2019-04-22 09:37:02
试试这个:
-- 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
GOhttps://stackoverflow.com/questions/52454275
复制相似问题