SQL Server 2005 关于xp_cmdshell

来源:互联网 发布:dnf老是网络中断2016 编辑:程序博客网 时间:2024/09/21 09:00
 

SQL Server 2005 中引入的 xp_cmdshell 选项是服务器配置选项,使系统管理员能够控制是否可以在系统上执行 xp_cmdshell 扩展存储过程。默认情况下,xp_cmdshell 选项在新安装的软件上处于禁用状态,但是可以通过使用外围应用配置器工具或运行 sp_configure 系统存储过程来启用它,如下面的代码示例所示:

  1. -- To allow advanced options to be changed.
  2. EXEC sp_configure 'show advanced options'1
  3. GO
  4. -- To update the currently configured value for advanced options.
  5. RECONFIGURE
  6. GO
  7. -- To enable the feature.
  8. EXEC sp_configure 'xp_cmdshell'1
  9. GO
  10. -- To update the currently configured value for this feature.
  11. RECONFIGURE
  12. GO
原创粉丝点击