SQL Server 2005的cmd_shell组件的开启方法
时间:2024-01-19 15:18:06
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
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
python3 字符串知识点学习笔记
详解Python中的Array模块
关于使用pyqt弹出消息提示框的问题
![](https://img.aspxhome.com/file/2023/3/110493_0s.png)
详解python中的数据类型和控制流
一文详解Go语言fmt标准库的常用占位符使用
代码讲解Python对Windows服务进行监控
go语言中的return语句
js constructor的实际作用分析
sqlserver 动态创建临时表的语句分享
Python使用sftp实现传文件夹和文件
![](https://img.aspxhome.com/file/2023/1/76881_0s.jpg)
thinkPHP中配置的读取与C方法详解
opencv python在视屏上截图功能的实现
![](https://img.aspxhome.com/file/2023/5/63575_0s.jpg)
使用php操作xml教程
![](https://img.aspxhome.com/file/2023/0/55570_0s.png)
开窗函数有浅入深详解(一)
![](https://img.aspxhome.com/file/2023/3/129303_0s.png)
跨浏览器让javascript文件携带图片数据
python+numpy实现的基本矩阵操作示例
python如何去除字符串中不想要的字符
Python 获取指定文件夹下的目录和文件的实现
Mysql如何对json数据进行查询及修改
![](https://img.aspxhome.com/file/2023/5/93905_0s.png)
在网页中显示可拖动月历
![](https://img.aspxhome.com/file/UploadPic/20072/20072311321977s.gif)