Server 2005 and Compatibility Level

Posts   
 
    
AlexWalker
User
Posts: 40
Joined: 05-Nov-2008
# Posted on: 02-Mar-2010 16:59:58   

Is it possible to run LLBL with SqlServerDQECompatibilityLevel 2 (SqlServer2005) when connecting to a SQL Server 2005 instance running in compatibility level 80 (SQL Server 2000)?

I wouldn't have thought so, but I tried it and the new-style paging code (using the 2005+ only OVER clause) works fine.

It seems that compatibility level 80 doesn't disallow all of the functionality that was new with 2005.

Does LLBL running under SqlServerDQECompatibilityLevel 2 utilize any functionality that would be barred by SQL Server running in compatibility level 80?

Thanks!

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 02-Mar-2010 21:23:24   

You should be OK, but there is only ever one way to be sure - testing ! The differences between the SQL compatibility levels are listed here

Matt

AlexWalker
User
Posts: 40
Joined: 05-Nov-2008
# Posted on: 02-Mar-2010 21:40:58   

Matt,

Thanks for the response.

Someone had to take the time to separate the functionality that is used in the different SqlServerDQECompatibilityLevel levels, so I'm hoping that someone also knows if those features are available or unavailable in the different SQL compatibility levels.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39866
Joined: 17-Aug-2003
# Posted on: 03-Mar-2010 11:26:12   

The llblgen pro compatibility level for sqlserver is used for paging query generation and also for NEWSEQUENTIALID() usage, TOP (parameter) instead of TOP value. The compatibility level 80 in sqlserver is used for the table structure etc. if I'm not mistaken, it doesn't limit sqlserver 2005/2008 features, it's just more flexible when executing sqlserver 2000 code. http://blogs.msdn.com/sqlserverstorageengine/archive/2007/04/26/what-s-the-difference-between-database-version-and-database-compatibility-level.aspx

I find it a bit confusing myself as well, I think what MS wants to explain is that if you define a database to compatibility level 80, code which ran on sqlserver2000 will work.

Our DQE doesn't do that much fancy stuff with sqlserver specific features other than the paging, newsequentialid() and TOP (param) stuff. Setting our compatibility level to 2005 for a sqlserver 2000 database will fail in some situations (paging, guid pk fields without a value set, and limited queries as they use a TOP (param) construct), using the 2000 compatibility level on a 2005/2008 database will work, as it will just omit using sqlserver 2005+ features and will use temptables for paging, not support MAX types, will use TOP n instead of TOP (@param)

Frans Bouma | Lead developer LLBLGen Pro
AlexWalker
User
Posts: 40
Joined: 05-Nov-2008
# Posted on: 03-Mar-2010 17:12:28   

Frans,

Thanks for all of your help on this and other questions!

Alex