加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

SQLSERVER2005:"sys.xp_cmdshell"过程无法调用的解决

发布时间:2020-12-12 15:43:27 所属栏目:MsSql教程 来源:网络整理
导读:在SQL SERVER 2005 调用“sys.xp_cmdshell”过程对过期备份文件进行删除出现如下出错提示: ----------------------------- SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as
在SQL SERVER 2005 调用“sys.xp_cmdshell”过程对过期备份文件进行删除出现如下出错提示: ----------------------------- 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. ----------------------------- SQL server 2005的默认安全策略关闭了用户对“sys.xp_cmdshell”的访问权限,用如下语句开启: ----------------------------- sp_configure 'show advanced options',1 GO RECONFIGURE GO sp_configure 'xp_cmdshell',1 GO RECONFIGURE GO ------------------------------ 另外,当你准备在SQL SERVER 2005中调用操作系统内置的smtp组件发送邮件时,可能也会收到如下错误提示: -------------------------------- “SQL Server 阻止了对组件 'Ole Automation Procedures' 的 过程'sys.sp_OACreate' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭” -------------------------------- 同样道理,用如下语句开启Ole Automation Procedures的访问权限: -------------------------------- sp_configure 'show advanced options',1 GO RECONFIGURE GO sp_configure 'Ole Automation Procedures' GO RECONFIGURE GO

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读