我认为SQL Azure的是建立在SQL Server 2012中的顶部,但是当你创建一个新的数据库兼容级别为100(SQL Server 2008中的兼容级别),而不是110SQL Azure的兼容性级别
SELECT compatibility_level FROM sys.databases WHERE name = 'Test';
ALTER DATABASE Test SET COMPATIBILITY_LEVEL = 110;
--> Incorrect syntax near 'SET'.
EXEC sp_dbcmptlevel 'Test', 110;
--> Could not find stored procedure 'sp_dbcmptlevel'.
其原因,这是我的问题是因为SQL 2008不支持地理形状,这跨东西半球,所以如果你放大:
我想它使用两种方法,我知道的变化到110出一张地图来看看这个世界,并试图存储它将失败的地图边界。非常愚蠢的权利?
我认为这不会是在SQL Azure中的一个问题,因为它已被固定在SQL Server 2012中,但是当我试图创建跨越半球我得到以下错误的形状:
Microsoft.SqlServer.Types.GLArgumentException: 24205: The specified input does not represent a valid geography instance because it exceeds a single hemisphere. Each geography instance must fit inside a single hemisphere. A common reason for this error is that a polygon has the wrong ring orientation. To create a larger than hemisphere geography instance, upgrade the version of SQL Server and change the database compatibility level to at least 110.
所以它告诉我要改变兼容级别,就像它知道这已经被修复一样,但我无法弄清楚如何在SQL Azure中做到这一点。任何人都有想要尝试的建议?或者让我知道现在是否不可能?
您是否设法找到解决方案?我得到完全相同的半球问题... – mcintyre321