Articles → SQL SERVER → Rebuild System Databases In Sql Server 2008

Rebuild System Databases In Sql Server 2008






Software Requirement





Prerequisite Knowledge




  1. What are system databases?
  2. What is the purpose of the system databases?

What Does Rebuild Do?





Scenarios Of Rebuilding Database





Steps


  1. Open command prompt
  2. Go to the following path
  3. C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2
  4. If you are using SQL Server instance then go to the following path
  5. C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap
  6. Execute following query
  7. setup.exe  /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=sqlexpress2k8r2  /SQLSYSADMINACCOUNTS= my_domain\admin_user_name /SAPWD=login_password


  1. /QUIET means that setup is run without any user interface
  2. /ACTION=REBUILDDATABASE means system databases are recreated
  3. /INSTANCENAME=sqlexpress2k8r2 – This is the instance name of database
  4. SQLSYSADMINACCOUNTS=my_domain\admin_user_name - Here my_domain is the domain name and admin_user_name is the user name having admin rights in the system
  5. /SAPWD=login_password - This is the login password of user having admin rights (or the admin who executes this command)

Log In Summary.Txt File






  Final result:                  Passed
  Exit code (Decimal):      0
  Exit message:               Passed
  Start time:                    2012-06-29 17:20:19
  End time:                      2012-06-29 17:23:37
  Requested action:          RebuildDatabase



Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, July 3, 2012

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250