2012-05-20 35 views
7

我认为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中做到这一点。任何人都有想要尝试的建议?或者让我知道现在是否不可能?

+1

您是否设法找到解决方案?我得到完全相同的半球问题... – mcintyre321

回答

2

这是很难,如果当前的SQL Azure是基于SQL Server上说2008年或2012年。然而2011年11月更新的SQL Server 2008和2012年更多信息在数据库引擎版本增加了许多新的功能,它:

更新的引擎版本:此版本在跨数据中心推出时将底层SQL Azure数据库引擎版本从11.0.1477.26更新为11.0.1750.34。

关于什么是,什么不是SQL Azure的支持比较到SQL Server 2008和SQL Server 2008 R2以下链接会谈:

http://msdn.microsoft.com/en-us/library/windowsazure/ff394115

以下链接增加了更多的信息什么新的可编程性增强功能从SQL Server 2012在SQL Azure中补充说:

http://msdn.microsoft.com/en-us/library/windowsazure/hh987034.aspx

+0

这变得接近,但并没有真正回答这个问题... –

+0

+1我认为它确实很好地回答了这个问题。数据库引擎是版本11,兼容级别是100.通过第二个链接,您可以看到它确实获得了SQL 2012查询功能,如OFFSET/FETCH。然而,看起来如果你依赖于兼容级别110的东西,你不会得到它(然而 - 微软经常对Azure做出重大改进)。 – Paul

2

更新:2015年8月 Azure的SQL数据库V12具有广告使用ALTER DATABASE SET COMPATIBILITY_LEVEL语法的默认兼容级别为120,可能性高达130或更低。