-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- Written by Kimberly L. Tripp - all rights reserved.
-- 
-- For more scripts and sample code, check out 
-- 	http://www.SQLSkills.com
--
-- Disclaimer - Thoroughly test this script, execute at your own risk.
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


stop the mssqlserver service
go to cmd prompt
start the server as a process NOT service
-- Default instance
cd \program files\microsoft sql server\mssql\binn

	sqlservr -m

-- Or Named Instances (make sure you go to the right instance dir)
cd \program files\microsoft sql server\mssql$instname\binn

	sqlservr -m -Sinstname	

starts sql server as a process... don't exit that window

Bring up Ent Manager and connect (remember server will look like it's stopped)

Restore Master from Device (remember the server will shutdown automatically)

Kill EM

Restart

Restore MSDB from a backup

NOTE: Pubs, Northwind and Model were also refreshed...might need to restore these databases as well.





