Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


What exactly gets enabled in SQL 2012 when you set compatibility mode to 110


What exactly gets enabled in SQL 2012 when you set compatibility mode to 110

Author
Message
john.p.lantz
john.p.lantz
Valued Member
Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)

Group: General Forum Members
Points: 61 Visits: 95
Some new functions (eg. CONCAT) work as soon as you migrate to 2012 and leave compat mode at 100. But other functions (eg. PERCENTILE_CONT) need to have compat mode at 110 in order to work.

Is there a list somewhere of what new functions work simply by upgrading to SQL 2012, and what needs to have compat mode set to 110?
Ed Pollack
Ed Pollack
SSC-Addicted
SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)

Group: General Forum Members
Points: 474 Visits: 513
john.p.lantz (5/22/2014)
Some new functions (eg. CONCAT) work as soon as you migrate to 2012 and leave compat mode at 100. But other functions (eg. PERCENTILE_CONT) need to have compat mode at 110 in order to work.

Is there a list somewhere of what new functions work simply by upgrading to SQL 2012, and what needs to have compat mode set to 110?


There's quite a bit---start with this MSDN article first, and see if your questions are answered there, as their lists here will be more complete than anything I could ever recite from memory:
http://msdn.microsoft.com/en-us/library/bb510680%28v=sql.110%29.aspx
john.p.lantz
john.p.lantz
Valued Member
Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)

Group: General Forum Members
Points: 61 Visits: 95
I've looked at that MSDN article before, but it doesn't explain what I am seeing. Take the one example (PERCENTILE_CONT), that is not mentioned at all in article under the section (differences between 100 and 110). But it's something that is only available after you set compat mode to 110.
Ed Pollack
Ed Pollack
SSC-Addicted
SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)

Group: General Forum Members
Points: 474 Visits: 513
You're 100% correct---and this behavior appears to be undocumented on MSDN. Attempting to run a query with this analytic function results in:

Msg 10762, Level 15, State 1, Line 4
The PERCENTILE_CONT function is not allowed in the current compatibility mode. It is only allowed in 110 mode or higher.

The following analytic functions work normally under 100 compatibility mode in SQL Server 2012:
CUME_DIST
FIRST_VALUE
LEAD
LAG
LAST_VALUE
PERCENT_RANK

The following functions are unavailable below compatibility mode 110:
PERCENTILE_CONT
PERCENTILE_DISC

Further research shows no documentation anywhere regarding these functions and compatibility modes. I was able to easily reproduce (and fix) by taking a test database and switching between compatibility modes.

I'll send a note to Microsoft advising them to update their documentation regarding both of these functions.
john.p.lantz
john.p.lantz
Valued Member
Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)Valued Member (61 reputation)

Group: General Forum Members
Points: 61 Visits: 95
I know this is an old thread, but did you ever get any information from Microsoft on the "undocumented" things that are enabled when you set compatibility mode to 110?
Ed Pollack
Ed Pollack
SSC-Addicted
SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)SSC-Addicted (474 reputation)

Group: General Forum Members
Points: 474 Visits: 513
john.p.lantz (9/4/2014)
I know this is an old thread, but did you ever get any information from Microsoft on the "undocumented" things that are enabled when you set compatibility mode to 110?


Unfortunately, nothing as of yet. I've filed it away as, "this is how it works", made a mental note of it, and let it go for now. If/when I get a reply, I'll put that info here. Wish I could provide more, but we at least know what happens in this specific case and can easily reproduce/prove it out.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search