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


SQL Compatibility Mode Questions


SQL Compatibility Mode Questions

Author
Message
amy26
amy26
SSC Veteran
SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)

Group: General Forum Members
Points: 246 Visits: 551
Hello again!

We have recently upgraded from SQL 2000 to SQL 2008 and you would think with my 10+ years experience that I would have known that the compatibility mode of the DB did not automatically change to 2008 when I configured the server. Be that as it may, I figured it out and changed it to 100.

However, we apparently have queries and logic that is not compatible with 100. So, I had to change it back to 80.

Is there a tool or an extended stored procedure that will identify all the things I need to change? It really isn't feasable for me to go through every single thing in the DB and check it.

I'm really bummed about this cause now I can't use some of the new features of SQL 2008 Angry

And there isn't any way to set certain things in the DB to 80 and other things to 100 is there?

Thanks!
Sean Lange
Sean Lange
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16671 Visits: 17030
Try looking at the upgrade advisor. http://www.microsoft.com/en-us/download/details.aspx?id=11455

And no you can't have part of the database in 80 and others in 100. It is set at the database level.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47415 Visits: 44402
amy26 (4/2/2013)
I'm really bummed about this cause now I can't use some of the new features of SQL 2008 Angry


Why not?

Comparability level doesn't disable new features, it just changes how the query execution engine handles some constructs and whether some forms of SQL are valid or not.


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


amy26
amy26
SSC Veteran
SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)

Group: General Forum Members
Points: 246 Visits: 551
GilaMonster (4/2/2013)
amy26 (4/2/2013)
I'm really bummed about this cause now I can't use some of the new features of SQL 2008 Angry


Why not?

Comparability level doesn't disable new features, it just changes how the query execution engine handles some constructs and whether some forms of SQL are valid or not.


Well, for example... I wrote a stored procedure that uses PIVOT and I cannot run this procedure when the compatibility mode is set to 80. It will only work if its set to 100.
amy26
amy26
SSC Veteran
SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)

Group: General Forum Members
Points: 246 Visits: 551
Sean Lange (4/2/2013)
Try looking at the upgrade advisor. http://www.microsoft.com/en-us/download/details.aspx?id=11455

And no you can't have part of the database in 80 and others in 100. It is set at the database level.


We ran the upgrade advisor initially and it didn't find anything blaring things that would not upgrade. It didn't mention anything about the compatibility mode. We were able to get everything on to SQL 2008 already ... and I can't run the upgrade advisor now as we don't have any SQL 2000 machines anymore.
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47415 Visits: 44402
amy26 (4/2/2013)
GilaMonster (4/2/2013)
amy26 (4/2/2013)
I'm really bummed about this cause now I can't use some of the new features of SQL 2008 Angry


Why not?

Comparability level doesn't disable new features, it just changes how the query execution engine handles some constructs and whether some forms of SQL are valid or not.


Well, for example... I wrote a stored procedure that uses PIVOT and I cannot run this procedure when the compatibility mode is set to 80. It will only work if its set to 100.


Yes, Pivot is the exception, along with CROSS APPLY iirc. Most of the other new features work fine regardless of compat mode.


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Jeffrey Williams 3188
Jeffrey Williams 3188
SSCarpal Tunnel
SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)

Group: General Forum Members
Points: 4468 Visits: 9836
amy26 (4/2/2013)
GilaMonster (4/2/2013)
amy26 (4/2/2013)
I'm really bummed about this cause now I can't use some of the new features of SQL 2008 Angry


Why not?

Comparability level doesn't disable new features, it just changes how the query execution engine handles some constructs and whether some forms of SQL are valid or not.


Well, for example... I wrote a stored procedure that uses PIVOT and I cannot run this procedure when the compatibility mode is set to 80. It will only work if its set to 100.


The trick to get around this type of limitation is to create a separate database - set the compatibility to 100 and run your code from that database using 3-part naming (or synonyms) to reference the tables in the 80 database.

One way of 'tricking' the system to do this is to create a new procedure in the 100 database that has your working code. Rename the old procedure in the 80 database and then create a synonym for the original procedure. The synonym will then reference your new code.

Jeffrey Williams
Problems are opportunities brilliantly disguised as insurmountable obstacles.

How to post questions to get better answers faster
Managing Transaction Logs

amy26
amy26
SSC Veteran
SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)SSC Veteran (246 reputation)

Group: General Forum Members
Points: 246 Visits: 551
Ah, now that is an interesting concept..... very interesting indeed! Thank you for that... I am going to mull that over in my brain for a while!
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