Webastor - Programming Tips and Tricks

Programming language => Sql => Topic started by: Ali on December 15, 2015, 01:04:31 AM

Title: How to rebuild the system databases?
Post by: Ali on December 15, 2015, 01:04:31 AM
Hello, I'd like to submit a quirky question to you, how to rebuild the system databases? Thank you very much for kindly giving me your help as soon as possible, thank you in advance.
Title: Re: Rebuild the system databases?
Post by: Cooper on February 19, 2018, 08:23:00 PM
To rebuild system databases for an instance of SQL Server:
Insert the SQL Server 2012 installation media into the disk drive, or, from a command prompt, change directories to the location of the setup.exe file on the local server. The default location on the server is C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Release.

From a command prompt window, enter the following command. Square brackets are used to indicate optional parameters. Do not enter the brackets. When using the Windows Vista operating system with User Account Control (UAC) enabled, running Setup requires elevated privileges. The command prompt must be run as Administrator.

Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=InstanceName /SQLSYSADMINACCOUNTS=accounts [ /SAPWD= StrongPassword ] [ /SQLCOLLATION=CollationName]