Refresh fails due to incorrect compatibility level in shadow DB
PeterDanielsCRB
Posts: 126 Bronze 3
SCA: 4.2.20023.15120
VS 2019: 16.4.3
I have the project set for target platform "SQL Server 2008", which should be compatibility level 100. However, when I "Refresh" the project, it builds a shadow DB at compatibility level 150. This causes a failed table creation due to:
"Msg 402, Level 16, State 1, Server E000PDANIELS0L1, Line 34
The data types datetime and time are incompatible in the add operator."
Is there some other place where I'm supposed to configure the compatibility level?
VS 2019: 16.4.3
I have the project set for target platform "SQL Server 2008", which should be compatibility level 100. However, when I "Refresh" the project, it builds a shadow DB at compatibility level 150. This causes a failed table creation due to:
"Msg 402, Level 16, State 1, Server E000PDANIELS0L1, Line 34
The data types datetime and time are incompatible in the add operator."
Is there some other place where I'm supposed to configure the compatibility level?
Tagged:
Best Answer
-
PeterDanielsCRB Posts: 126 Bronze 3After resolving the installation issue , which required a second update to vs 2019 ent (v 16.4.4) and uninstalling and reinstalling sca, I am up and able to "refresh" the project in VS. I was able to use a pre-deployment script to set the compatibility level of the shadow DB to 100. It still seems that this is a bug , though, unless I'm misunderstanding the concept of setting the target platform to "sql server 2008" in the project settings.
Answers
In this case, the best option would be to configure the project to host the Shadow Database in a SQL Server 2008 server, you can do this by following the instructions on this documentation page:
https://documentation.red-gate.com/sca/developing-databases/concepts/shadow-database
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools