• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    SQL Server 2005的cmd_shell组件的开启方法

    SQL Server中的cmd_shell组件功能强大,几乎可通过该组建实现Windows系统的所有功能,正因此,这个组件也是SQL Server的最大安全隐患。SQL Server 2000中这个组件是默认开启的,而SQL Server 2005中这个组件默认作为此服务器安全配置的一部分而被关闭。有时我们需要用到该组件,开启此组件的相关语句如下:

    复制代码 代码如下:

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


    为了保证数据库服务器的安全,建议在使用完毕后关闭该组件,关闭该组件的相关语句如下:

    复制代码 代码如下:

    --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', 0
    GO
    --To update the currently configured value for this feature.
    RECONFIGURE
    GO

    上一篇:Sql实现行列转换方便了我们存储数据和呈现数据
    下一篇:sql server 2005中使用with实现递归的方法
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯 版权所有

    《增值电信业务经营许可证》 苏ICP备15040257号-8

    SQL Server 2005的cmd_shell组件的开启方法 SQL,Server,2005,的,cmd,shell,