CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Raymond Lewallen

Framework Design, Agile Coach, President Oklahoma City Developers Group, Microsoft MVP C#, TDD, Continuous Integration, Patterns and Practices, Domain Driven Design, Speaker, VB.Net, C# and Sql Server

Update your compatibility level on your databases

It has been awhile since we've all upgraded from 7.0 to 2000 Sql Server.  Just a reminder, don't forget to update your compatibility levels, if applicable, when moving your databases from 2000 (version 8.0) to 2005 (version 9.0) in order to take advantage of the latest features and enhancements.  I keep forgetting to do this when moving my databases and discover it every time I try to PIVOT code (topic coming soon using 'pubs' database as an example) and it throws an error.

The syntax is as follows:
Exec sp_dbcmptlevel 'pubs', '90'

If you move the pubs database from 2000 to 2005, that will change its compatibility level to 2005.  Values accepted are:
70 = SQL Server 7.0.
80 = SQL Server 2000.
90 = SQL Server 2005.

FYI, I have moved 8 databases from 2000 to 2005 Beta2 with no problems.



Comments

Dewayne Mikkelson and Shadow his Webdog said:

SOURCE: Raymond Lewallen : Update your compatibility level on your databases. Update your compatibility level on your databases posted on Wednesday, March 23, 2005 8:02 PM by rlewallen It has been awhile since we've all upgraded from 7.0 to 2000
# April 8, 2005 6:16 AM

renato2099 said:

Hey Raymond, I have a question about this migration mystery. I know there are several methods to get this task done but about this compatibility opcion there hasn't been enough information out. Do you know if there are any mayor disadvantages? Why shouldn't we use this option? I hope you can answer soon. Thanks in advance.

# April 24, 2008 6:52 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Raymond Lewallen

Working primarily in the public sector during his career, Raymond has designed and built several high profile enterprise level applications for all levels of the government. Raymond now works as a solutions architect for EMC. Raymond is an agile coach, Microsoft MVP C# and also president of the Oklahoma City Developers Group and Oklahoma Agile Developers Group. Raymond spends a lot of his time learning and teaching such things as Test Driven Development, Domain Driven Design, Design Patterns and Extreme Programming practices and principles, to name a few. Raymond is also an advocate of Alt.Net. Raymond is primarily a framework guy, so don't ask him anything about UI :) Check out Devlicio.us!