Home  >  Article  >  Database  >  xp_cmdshell开启与关闭

xp_cmdshell开启与关闭

WBOY
WBOYOriginal
2016-06-07 17:57:022132browse

xp_cmdshell开启与关闭

代码如下:
xp_cmdshell可以让系统管理员以操作系统命令行解释器的方式执行给定的命令字符串,并以文本行方式返回任何输出,是一个功能非常强大的扩展存贮过程。
一般情况下,xp_cmdshell对管理员来说也是不必要的,xp_cmdshell的消除不会对Server造成任何影响。

可以将xp_cmdshell消除:
Use Master
Exec sp_dropextendedproc N'xp_cmdshell'
Go

如果需要的话,可以把xp_cmdshell恢复回来:
Use Master
Exec sp_addextendedproc N'xp_cmdshell', N'xplog70.dll'
Go

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn