sc config MSSQLSERVER start= auto
sc failure MSSQLSERVER reset= 1 actions= restart/1000 

sc config SQLSERVERAGENT start= auto
sc failure SQLSERVERAGENT reset= 1 actions= restart/1000 

net start MSSQLSERVER
net start SQLSERVERAGENT 

ping -n 5 127.0.0.1>nul 2>nul
"C:\MyDataMSSQL\Data\osql.exe" -U sa -P -Q"sp_attach_db 'wwsl' , 'C:\MyDataMSSQL\Data\wwsl_Data.MDF','C:\MyDataMSSQL\Data\wwsl_Log.LDF'"
pause

exit 