删除扩展存储过过程xp_cmdshell的语句:
exec sp_dropextendedproc 'xp_cmdshell'

恢复cmdshell的SQL语句
EXEC sp_addextendedproc xp_cmdshell ,@dllname ='xplog70.dll'

在sqlserver的query analyer中运行以下命令就可以去掉sa的xp-cmdshell权限:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[xp_cmdshell]') and OBJECTPROPERTY(id, N'IsExtendedProc') = 1) exec sp_dropextendedproc N'[dbo].[xp_cmdshell]' GO

一般SQL2000是通过下面语句恢复: EXEC sp_addextendedproc xp_cmdshell ,@dllname ='xplog70.dll'
而SQL97是通过下面语句恢复 EXEC sp_addextendedproc xp_cmdshell ,@dllname ='xpsql70.dll'

sp_addextendedproc'xp_cmdshell','xpsql70.dll' (sql 7.0) sp_addextendedproc'xp_cmdshell','xplog70.dll' (sql 2000)

Tags: , ,
服务器设置 | 评论(0) | 引用(0) | 阅读(5103)
 
发表评论
   
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]