SQL Server 2000删除危险扩展的方法


问:怎样才能删除SQL Server 2000所有的危险扩展?

答:首先,你需要使用系统帐户登陆查询分析器,然后运行下面的脚本:

use master 
exec sp_dropextendedproc 'xp_cmdshell' 
exec sp_dropextendedproc 'xp_dirtree'
exec sp_dropextendedproc 'xp_enumgroups'
exec sp_dropextendedproc 'xp_fixeddrives'
exec sp_dropextendedproc 'xp_loginconfig'
exec sp_dropextendedproc 'xp_enumerrorlogs'
exec sp_dropextendedproc 'xp_getfiledetails'
exec sp_dropextendedproc 'Sp_OACreate' 
exec sp_dropextendedproc 'Sp_OADestroy' 
exec sp_dropextendedproc 'Sp_OAGetErrorInfo' 
exec sp_dropextendedproc 'Sp_OAGetProperty' 
exec sp_dropextendedproc 'Sp_OAMethod' 
exec sp_dropextendedproc 'Sp_OASetProperty' 
exec sp_dropextendedproc 'Sp_OAStop' 
exec sp_dropextendedproc 'Xp_regaddmultistring' 
exec sp_dropextendedproc 'Xp_regdeletekey' 
exec sp_dropextendedproc 'Xp_regdeletevalue' 
exec sp_dropextendedproc 'Xp_regenumvalues' 
exec sp_dropextendedproc 'Xp_regread' 
exec sp_dropextendedproc 'Xp_regremovemultistring' 
exec sp_dropextendedproc 'Xp_regwrite' 
drop procedure sp_makewebtask
go

假如你需要恢复,可以使用下面的脚本:

use master 
exec sp_addextendedproc xp_cmdshell,'xp_cmdshell.dll' 
exec sp_addextendedproc xp_dirtree,'xpstar.dll' 
exec sp_addextendedproc xp_enumgroups,'xplog70.dll' 
exec sp_addextendedproc xp_fixeddrives,'xpstar.dll' 
exec sp_addextendedproc xp_loginconfig,'xplog70.dll' 
exec sp_addextendedproc xp_enumerrorlogs,'xpstar.dll' 
exec sp_addextendedproc xp_getfiledetails,'xpstar.dll' 
exec sp_addextendedproc sp_OACreate,'odsole70.dll' 
exec sp_addextendedproc sp_OADestroy,'odsole70.dll' 
exec sp_addextendedproc sp_OAGetErrorInfo,'odsole70.dll' 
exec sp_addextendedproc sp_OAGetProperty,'odsole70.dll' 
exec sp_addextendedproc sp_OAMethod,'odsole70.dll' 
exec sp_addextendedproc sp_OASetProperty,'odsole70.dll' 
exec sp_addextendedproc sp_OAStop,'odsole70.dll' 
exec sp_addextendedproc xp_regaddmultistring,'xpstar.dll' 
exec sp_addextendedproc xp_regdeletekey,'xpstar.dll' 
exec sp_addextendedproc xp_regdeletevalue,'xpstar.dll' 
exec sp_addextendedproc xp_regenumvalues,'xpstar.dll' 
exec sp_addextendedproc xp_regread,'xpstar.dll' 
exec sp_addextendedproc xp_regremovemultistring,'xpstar.dll' 
exec sp_addextendedproc xp_regwrite,'xpstar.dll' 
go
本文作者:



相关阅读:
Ubuntu常用命令:关机、重启、注销
手动优化Win7 Windows7系统服务清理方案
border:none;与border:0;的区别
php 获取select下拉列表框的值
php基础知识:控制结构
利用c#制作简单的留言板(3)
一个非常简单的将半角转换为中文的函数
DB2 实用程序介绍之数据移动实用程序
css3.0新属性效果在ie下的解决方案
空手建立Access数据库
打造计数器DIY三步曲(上)
限制文本输入框只能输入0-9数字
PHP与UML类图: PHP and UML Class Diagrams
JavaScript初学困境
快速导航

Copyright © 2016 phpStudy | 皖ICP备18014864号-4