手机
当前位置:查字典教程网 >编程开发 >mssql数据库 >SQL Server 2005的cmd_shell组件的开启方法
SQL Server 2005的cmd_shell组件的开启方法
摘要:SQLServer中的cmd_shell组件功能强大,几乎可通过该组建实现Windows系统的所有功能,正因此,这个组件也是SQLServe...

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 Server 2005的cmd_shell组件的开启方法】相关文章:

SQL Server 2005 模板参数使用说明

SQLServer2005及以上存储过程分页方法

SQL Server 2005删除日志文件的几种方法小结

SQL Server2005打开数据表中的XML内容时报错的解决办法

Sql Server 2005 默认端口修改方法

SQL Sever 2005 Express 安装失败解决办法

SQL Server 2008的新压缩特性

sqlserver2005使用row_number() over分页的实现方法

SQL Server2005下的安全操作技巧分享

SQL Server 2005支持的两条新语法

精品推荐
分类导航