gpt4 book ai didi

sql-server-2008 - 启用 'xp_cmdshell' SQL Server

转载 作者:行者123 更新时间:2023-12-03 04:16:34 25 4
gpt4 key购买 nike

我想执行EXEC master..xp_cmdshell @bcpquery

但我收到以下错误:

SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', see "Surface Area Configuration" in SQL Server Books Online.

有什么方法可以激活此功能,或者在启用该功能之前执行某些操作吗?

如何解决?

最佳答案

您需要启用它。查看 xp_cmdshell MSDN docs 的权限部分:

http://msdn.microsoft.com/en-us/library/ms190693.aspx :

-- 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

关于sql-server-2008 - 启用 'xp_cmdshell' SQL Server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5131491/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com