通过Sql存储过程执行命令提示符操作

有些系统需要先启动权限,执行以下命令:

 

sp_configure 'show advanced options',1

reconfigure

go

sp_configure 'xp_cmdshell',1

reconfigure

go

 

执行存储过程的语句:

exec xp_cmdshell 'shutdown -a'

 

posted @ 2009-04-03 14:45  潇客的技术博客  阅读(1256)  评论(0编辑  收藏  举报