SQL Server 2005的cmd_shell组件的开启方法

这篇文章介绍了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’,0
GO
–To update the currently configured value for this feature.
RECONFIGURE
GO

作者: dawei

【声明】:永州站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

为您推荐

联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息

返回顶部