发表新主题 回复该帖子
主题:SQL2005启用xp_cmdshell
唧唧
帖子档案  楼主 SQL2005启用xp_cmdshell   Post by : 2009-03-05 16:49:02.0
  • 幼儿园
  • 幼儿园
  • UID:3
  • 主题:342
  • 帖子:781
  • 加为好友 加为好友    发送短信 发送短信

-- 允许配置高级选项
EXEC sp_configure 'show advanced options', 1
GO
-- 重新配置
RECONFIGURE
GO
-- 启用xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 1
GO
--重新配置
RECONFIGURE
GO

--执行想要的xp_cmdshell语句
Exec xp_cmdshell 'cmd'
GO

--用完后,要记得将xp_cmdshell禁用(出于安全考虑)
-- 允许配置高级选项
EXEC sp_configure 'show advanced options', 1
GO
-- 重新配置
RECONFIGURE
GO
-- 禁用xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 0
GO
--重新配置
RECONFIGURE
GO

签名
 ★★★★★★★★
 纵里寻她千百度,蓦然回首,那人却在,灯火阑珊处!
 MyBlog :http://blog.javawind.net
返回页面顶部  


CopyRight © 2008-2009 JavaWind.Net Studio All Rights Reserved
Powered By JWind.BBS Vesion 1.0.0 Beta1 Processed in 16 ms,0 (Queries)  Gzip enabled

WAP - 清除Cookies - 联系我们 - JavaWind.Net Studio - Archiver - TOP Valid XHTML 1.0 Transitional Valid CSS! 粤ICP备07511478号