Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Compatibility Mode Questions Expand / Collapse
Author
Message
Posted Tuesday, April 2, 2013 9:41 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, June 23, 2014 11:03 AM
Points: 160, Visits: 368
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

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

Thanks!
Post #1437974
Posted Tuesday, April 2, 2013 10:03 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 2:03 PM
Points: 13,289, Visits: 12,136
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)
Post #1437987
Posted Tuesday, April 2, 2013 10:06 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:52 AM
Points: 42,803, Visits: 35,919
amy26 (4/2/2013)
I'm really bummed about this cause now I can't use some of the new features of SQL 2008


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 2008, MVP
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

Post #1437990
Posted Tuesday, April 2, 2013 10:41 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, June 23, 2014 11:03 AM
Points: 160, Visits: 368
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


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.
Post #1438005
Posted Tuesday, April 2, 2013 10:47 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, June 23, 2014 11:03 AM
Points: 160, Visits: 368
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.
Post #1438007
Posted Tuesday, April 2, 2013 11:32 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:52 AM
Points: 42,803, Visits: 35,919
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


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 2008, MVP
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

Post #1438024
Posted Tuesday, April 2, 2013 11:38 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 4:16 PM
Points: 4,389, Visits: 9,526
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


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 opportunites brilliantly disguised as insurmountable obstacles.

How to post questions to get better answers faster
Managing Transaction Logs
Post #1438025
Posted Tuesday, April 2, 2013 11:49 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, June 23, 2014 11:03 AM
Points: 160, Visits: 368
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!
Post #1438033
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse