Shut down the system using SQL Server

Posted by Ddd under Sql Server category on | Points: 40 | Views : 4775

A very simple way to shutdown the system using the SQL Server stored procedure xp_cmdshell

Write this command

xp_cmdshell 'shutdown -f -s -t 0'

--First enable the xp_cmdshell stored procedure

--Programs-->Microsoft SQL Server 2005-->Configuration

--Tools-->SQL Server Surface Area Configuration

-->SQL Server Surface Area Configuration for features

-->xp_cmdshell->Enable xp_cmdshell

Comments or Responses

Login to post response