After SQL Server R2 is installed, you find that the server collation is incorrect and you do not want to reinstall SQL Server.
Assume that the server collation for the current default instance is: Chinese_prc_ci_as, to be modified to SQL_Latin1_General_CP1_CI_AS
Steps:
In cmd mode
1. Enter the directory where the SQL Server installation files are located (the directory where the Setup.exe files are located)
2. Run the command: Net stop MSSQLSERVER
3, Setup/quiet/action=rebuilddatabase/instancename=mssqlserver/sqlsysadminaccounts=administrator/sapwd=xxxxxx/ Sqlcollation=sql_latin1_general_cp1_ci_as
(Sapwd is the password for SA or the login password for Windows Server)
The command format is: Setup/quiet/action=rebuilddatabase/instancename=instancename
/sqlsysadminaccounts=accounts/[sapwd= StrongPassword]
/SQLCOLLATION=COLLATIONNAME
)
4, Net start mssqlserver
Note: The modification may result in the loss of user-defined database such as reportserver/reportservertempdb, the loss of login, etc., of course, you can keep the login script, re-create login, additional database remediation, please carefully modify.
Modify SQL Server R2 Server collation