sqlserver2005开启xp_cmdShell

EXEC sp_configure 'show advanced options', 1; RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1; RECONFIGURE;


exec master..xp_cmdshell 'bcp "SELECT * FROM emergency.dbo.log" queryout c:\bb.xls -c -S"wzp" -U"sa"  -P"sa" '

posted @ 2009-10-19 10:05  南守拥  阅读(228)  评论(0编辑  收藏  举报