Articles → SQL SERVER → Rebuild System Databases In Sql Server 2008
Rebuild System Databases In Sql Server 2008
Software Requirement
Prerequisite Knowledge
- What are system databases?
- What is the purpose of the system databases?
What Does Rebuild Do?
Scenarios Of Rebuilding Database
Steps
- Open command prompt
- Go to the following path
C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2
- If you are using SQL Server instance then go to the following path
C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap
- Execute following query
setup.exe /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=sqlexpress2k8r2 /SQLSYSADMINACCOUNTS= my_domain\admin_user_name /SAPWD=login_password
- /QUIET means that setup is run without any user interface
- /ACTION=REBUILDDATABASE means system databases are recreated
- /INSTANCENAME=sqlexpress2k8r2 – This is the instance name of database
- 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
- /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