Background recently we opened a few English version of the database server on the Azure portal, because the default is to install the corresponding database, so there is an instance collation problem, need to adjust the entire instance to chinese_prc_ci_as, to avoid the subsequent occurrence of characters garbled and so on. Before just know can adjust, not actual operation, this time to record the actual operation steps, for our follow-up inspection. Environment conditions Microsoft SQL Server (sp3-cu8) (KB4013104)-11.0.6594.0 (X64)Mar 10:52:31Copyright (c) Microsoft CorporationWeb Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600:) (Hypervisor)The procedure is followed by default after installation, as in production environment note to back up all databases (including MASTER\MSDB, etc.) in advance to view the database installation file placement Directory
Locate the command prompt and note that you use Super user execution, such as, right-click at the command prompt, select Superuser
In Superuser mode, enter the naming interface and enter the following name: Key commands are as follows (sensitive information has been replaced with XXXX, oneSqlsysadminAccount number, one is sa password):
1 c:\sqlserver_11.0_full>setup/quiet/action=rebuilddatabase/instancename=mssqlserver/ Sqlsysadminaccounts=xxxx/sapwd=xxxx/sqlcollation=chinese_prc_ci_as
After the adjustment is complete, re-enter the SSMs query, has been adjusted to chinese_prc_ci_as;
If you want to find the adjustment of the log, can be viewed in the following directory; Summary 1. If the production environment please be careful to back up all the databases including (MASTER\MSDB), but also pay attention to the user name and job and other issues; 2. Command prompt note the use of Super User mode;
Resourceshttps://docs.microsoft.com/en-us/sql/relational-databases/databases/rebuild-system-databases
How to modify the collation of a DB instance after the SQL SERVER database installation is complete