12

I have SQL Server 2017 installed on my computer. This is what SELECT @@VERSION returns:

Microsoft SQL Server 2017 (RTM-GDR) (KB4293803) - 14.0.2002.14 (X64) Jul 21 2018 07:47:45 Copyright (C) 2017 Microsoft Corporation Enterprise Edition (64-bit) on Windows 10 Enterprise 10.0 (Build 17134: )`

It was working fine until yesterday. Suddenly SQL SERVER Service did not run. When I wanted to run the service manually it showed 3417 error. When I checked event log I saw this error:

Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 200, state 7, severity 25. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.`

After some googling I found out I can run it with /T902 switch and try to fix the problem. But no solution worked for me. So I installed another instance of the same SQL SERVER 2017 and restored databases. Now the new installed instance has the same problem.

What could be the problem?

UPDATE Here is the full error log of SQL Server.

2018-09-17 13:06:47.29 spid6s Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.

2018-09-17 13:06:47.29 spid6s Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.

2018-09-17 13:06:47.29 spid6s Configuration option 'Agent XPs' changed from 1 to 1. Run the RECONFIGURE statement to install.

2018-09-17 13:06:47.29 spid6s Configuration option 'Agent XPs' changed from 1 to 1. Run the RECONFIGURE statement to install.

2018-09-17 13:06:47.29 spid6s Creating SSIS folders...

2018-09-17 13:06:47.30 spid6s Dropping procedure [dbo].[sp_syscollector_get_instmdw]

2018-09-17 13:06:47.30 spid6s Creating procedure [dbo].[sp_syscollector_get_instmdw]...

2018-09-17 13:06:47.30 spid6s Dropping procedure [dbo].[sp_syscollector_upload_instmdw]

2018-09-17 13:06:47.30 spid6s Creating procedure [dbo].[sp_syscollector_upload_instmdw]...

2018-09-17 13:06:47.30 spid6s Uploading data collector package from disk: c:\Program Files\Microsoft SQL Server\MSSQL14.SQL2017\MSSQL\Install\SqlTraceCollect.dtsx

2018-09-17 13:06:47.30 spid6s Uploading data collector package from disk: c:\Program Files\Microsoft SQL Server\MSSQL14.SQL2017\MSSQL\Install\SqlTraceCollect.dtsx

2018-09-17 13:06:47.30 spid6s Error: 2775, Severity: 17, State: 12.

2018-09-17 13:06:47.30 spid6s The code page 65001 is not supported by the server.

2018-09-17 13:06:47.30 spid6s Error: 912, Severity: 21, State: 2.

2018-09-17 13:06:47.30 spid6s Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 200, state 7, severity 25. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.

2018-09-17 13:06:47.30 spid6s Error: 3417, Severity: 21, State: 3.

2018-09-17 13:06:47.30 spid6s Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.

2018-09-17 13:06:47.30 spid6s SQL Server shutdown has been initiated

2018-09-17 13:06:47.30 spid6s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

UPDATE This line has something to tell. The code page 65001 is not supported by the server. My recently windows updated to Version 1803 (OS Build 17134.285). After this update some applications texts has changed to unknown characters. Can this be the cause of the problem?

Registry image for code page

14

I would start by saying that you are running SQL Server 2017 on Windows 10 (client OS) which is not supported see Hardware and Software requirements for SQL Server 2017. You are wasting the capability of enterprise edition and lot of money by running it on client OS.

Plus I believe such issues are mostly bugs so I would suggest you to apply latest SQL Server 2017 CU 10. Let me know if that fixes you issue. If you want to try out workaround for this issues please refer to This Blog.

As confirmed by OP the issues did not solved even after applying SQL Server 2017 CU10.

EDIT: The problem starts with below statement

2018-09-17 13:06:47.30 spid6s The code page 65001 is not supported by the server.

The code page 65001 means UTF 8 encoding which is not supported by SQL Server and this I believe is causing the issue. This is definitely a BUG I am perplexed why this is still not fixed in CU10. The upgrade process is trying to bulk load data having UTF 8 encoding and since SQL Server does not supports it, it is failing.

You have windows 10 go to control pane, now select region and language applet, it might be just region for you on Windows 10. Go to administrative tab and in the lower part of tab you have to click on change system Locale and then go ahead and activate/select the Beta: UTF8 Support and start the windows machine. Below is what options look from my windows 7 machine. The option might be almost same for Windows 10.

enter image description here

As conformed by OP the whole issues started after applying certain OS patch. The issue was resolved after unchecking the "Beta:UTF8 support". The issue seems to be 2 things.

  1. OP already has Beta:UTF8 Support checked and was running fine until he applied OS patch which changed "something".

  2. The issue resolved after unchecking Beta:UTF8 Support from control panel with OS patch already there.

The SQL Server was running fine with Beta:UTF8 Support but when OS patch was applied "something" broke in such a way that SQL Server master database was not able to come online which message that code page 65001 is not supported. Disabling Beta:UTF8 from control panel resolved the issue. Although I believe this is more of a workaround and MS need to come out with proper KB article for this.

PS: I also found Connect Bug already raised for this issue. When I say not supported(for installing Enterprise edition on client OS) that does not means you cannot run this infrastructure it only means you are on your own if you hit some "bug" or something fails unexpectedly. If you raise case with MS about any such issue I am sure they would point this out.

  • 1
    @Beginner and Shanky: I checked that file (C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Install\SqlTraceCollect.dtsx) in Notepad++ and it shows an encoding of "UCS-2 LE BOM", which is really UTF-16 LE, which in Microsoft-land is called "Unicode". Not sure if the bug is in Windows or SQL Server, but given that the file has a Byte Order Mark (BOM), it shouldn't have attempted to read it as UTF-8 regardless of the system's default encoding. That is, after all, the entire purpose of having the BOM ;-) The file even starts with: <?xml version="1.0" encoding="utf-16"?>. – Solomon Rutzky Oct 2 '18 at 16:46
  • 1
    I installed the developer edition (SQL Server 2014, have to test backwards compability) and the same thing applies there. Your solution worked great for it. – jgauffin May 21 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.