zoukankan      html  css  js  c++  java
  • SQL Server blocked access to procedure '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. 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.

    ---------------------------------------------------------------------------------------------------------------------

    【解决办法】:
      1、通过SQL语句开启。[推荐此方法,因为在任何版本的SQL SERVER中都可以使用。]
      通过查询分析器,选择Master数据库,然后执行以下SQL内容:

    sp_configure 'show advanced options',1
    reconfigure
    go
    sp_configure 'xp_cmdshell',1
    reconfigure
    go

      执行结果:

      配置选项 'show advanced options' 已从 0 更改为 1。请运行 RECONFIGURE 语句进行安装。
      配置选项 'xp_cmdshell' 已从 0 更改为 1。请运行 RECONFIGURE 语句进行安装。

      如需关闭只需将“sp_configure 'xp_cmdshell',1”改为“sp_configure 'xp_cmdshell',0”即可。

     

      2、通过"SQL SERVER外围应用配置器"开启。[如果记代码困难,那就用此方法吧。]

      找到开始 --> SQL安装目录 --> 配置 SQL server managerment 外围应用配置器。如图:

    SQL <wbr>Server <wbr>blocked <wbr>access <wbr>to <wbr>procedure <wbr>'sys.xp_cmdshell'

      打开后。找到并点击“功能的外围应用配置器”。

    SQL <wbr>Server <wbr>blocked <wbr>access <wbr>to <wbr>procedure <wbr>'sys.xp_cmdshell'

      再打开的窗口中点击最下面的 xp_cmdshell然后点击右边的启用即可。

    SQL <wbr>Server <wbr>blocked <wbr>access <wbr>to <wbr>procedure <wbr>'sys.xp_cmdshell'

     

      打开后,找到“xp_cmdshell”点击启用。



  • 相关阅读:
    molloc堆区的动态内存分配
    异常控制流(csapp)
    优化程序性能(CSAPP)
    链接及链接器
    C# 继承 多态
    virtual和abstract
    封装
    SQL数据库语句优化方法
    select 查询所有和查询所有非空
    联合查询的用法
  • 原文地址:https://www.cnblogs.com/liuzhuqing/p/7480117.html
Copyright © 2011-2022 走看看