• 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”点击启用。



  • 相关阅读:
    暑假集训每日一题0716(BFS)
    HDOJ1754(I Hate It)
    POJ2777(Count Color)
    暑假集训每日一题0717(DFS)
    SPOJ7259(Light Switching)
    cocos2dx CCTextureCache
    写给自己——EntryName命名规则
    观XX项目感1
    观XX项目感2 之 软件工程的图纸(再看UML类图)
    游戏编程 && cocos2d 学习
  • 原文地址:https://www.cnblogs.com/liuzhuqing/p/7480117.html
Copyright © 2020-2023  润新知