启用“xp_cmdshell"SQL Server [英] Enable 'xp_cmdshell' SQL Server

查看:28
本文介绍了启用“xp_cmdshell"SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要执行EXEC master..xp_cmdshell @bcpquery

但我收到以下错误:

SQL Server 阻止了对组件xp_cmdshell"的过程sys.xp_cmdshell"的访问,因为该组件作为该服务器安全配置的一部分被关闭.系统管理员可以使用 sp_configure 启用xp_cmdshell".有关启用xp_cmdshell"的详细信息,请参阅 SQL Server 联机丛书中的表面区域配置".

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.

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

Is there any way to activate this, or execute something before enabling the feature?

如何解决?

推荐答案

您需要启用它.查看 xp_cmdshell MSDN 文档 的权限"部分:

You need to enable it. Check out the Permission section of the 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

这篇关于启用“xp_cmdshell"SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆