首页数据库SQL Server 2005的cmd

SQL Server 2005的cmd

时间2024-02-29 00:51:04发布访客分类数据库浏览362
导读:收集整理的这篇文章主要介绍了SQL Server 2005的cmd_shell组件的开启方法,觉得挺不错的,现在分享给大家,也给大家做个参考。 SQL Server中的cmd_shell...
收集整理的这篇文章主要介绍了SQL Server 2005的cmd_shell组件的开启方法,觉得挺不错的,现在分享给大家,也给大家做个参考。

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

复制代码 代码如下:@H_512_7@
--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

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!


若转载请注明出处: SQL Server 2005的cmd
本文地址: https://pptw.com/jishu/632168.html
sql2005 数据库转为sql2000数据库的方法(数据导出导入) Sql实现行列转换方便了我们存储数据和呈现数据

游客 回复需填写必要信息