ChristophBaecke
Contributor
Contributor

OnPrem-DB-Update 19.09.0.4 fails (coming from 19.07.0.18)

Hello there, today we tried an update on a customers lab-environment (Servers are 2016-1607, SQL 2014) which failed during the DB-Update-phase with the following error:

2019-10-24 07:05:32.737 ... done dbo.TimeZone.seed.sql .Net SqlClient Data Provider: Msg 242, Level 16, State 3, Line 24
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value Script execution error.

The executed script: PRINT (CONVERT (VARCHAR (24), GETUTCDATE(), 121)) + ' ... Starting Post Deployment'; SET NOCOUNT ON; DECLARE @COMMIT_ID AS NVARCHAR (50) = '5cc4a529043738fa8785bd7df644dd89e3bd0f9e'; DECLARE @BUILD_ID AS NVARCHAR (255) = 'BTA-ACRPAT18-6'; IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'dbo.UpgradeHistory') AND type IN (N'U')) AND NOT EXISTS (SELECT 1 FROM dbo.UpgradeHistory) BEGIN INSERT INTO dbo.UpgradeHistory (MajorVersion, MinorVersion, Revision, HotFix, Description, StartTime, PerformedBy, CommitID, BuildKey) VALUES (19, 9, '4', 0, '1909 Contains major feature enhancements', GETUTCDATE(), SUSER_NAME(), @COMMIT_ID, @BUILD_ID); END IF ('$(InstallType)' <> 'U') BEGIN PRINT 'Disabling Constraints'; EXECUTE USP_DISABLE_ALL ; END EXECUTE dbo.SystemCode_DeleteObsolete ; EXECUTE dbo.SystemCodeGroup_DeleteObsolete ; EXECU An error occurred while the batch was being executed. Updating database (Failed)
______________________________

Reverted back to previous state, so no problem. Any ideas what could be the root cause on customer side? Regards, Christoph

Labels (1)
0 Kudos
5 Replies
LukasSchfer
Enthusiast
Enthusiast

Hey Christoph, I had the same error right now. Take a look to your error message: ' Data type to a datetime data type resulted in an out-of-range datetime ' .
In my case it helped, that we changed the language of the WSO SQL Service Account from German to English (German comma = English dot' 
For changing the language take a look to: https://stackoverflow.com/questions/15705983/how-to-change-default-language-for-sql-server
0 Kudos
ChristophBaecke
Contributor
Contributor

Hey Lukas,

thank you very much! Provided with your perfect explanation it does make both sense and works!

Best Regards,

Christoph
0 Kudos
LukasSchfer
Enthusiast
Enthusiast

Bute be aware. I think there a bug in the Application installer: https://support.workspaceone.com/posts/360037215653
0 Kudos
ChristophBaecke
Contributor
Contributor

Yeah, having an eye on that as well. Staying with 1907 in Production-Environments until those issues have been cleared.
0 Kudos
FredericLOUKA
Contributor
Contributor

Hi Lukas, 

Same problem here while upgrading from WS1 UEM 1811 to 2011.

Thanks for the tips: our service account was in french.

In my SQL Server, I put the language to english and retry the installation: it worked !

Thank you

0 Kudos