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

  • 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?

  • 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

  • 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.

  • 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.

  • 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?

  • 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.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply