Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.
  1. I've made a backup of a SQL Server database running on SQL Server 2008.
  2. I've restored that backup into a SQL Server 2012 instance.
  3. I've set the compatibility level on the restored instance to SQL Server 2012 (110).

What does this do to the database?

Does it, for example,

  1. cause stored procedures to be examined for incompatibilities
  2. cause any updates to all of the data pages in the database
  3. Cause updates to to datapages as the are accessed in the future
  4. Cause errors in the future if stored procedures or views are executed that use incompatible syntax

Where in books on line, or else where, can I find more detail?

share|improve this question
    
Stored Procedures will be recompiled with the new compatability level when you set it to 110. See this BOL Reference for a very extensive read on how everything is handled: msdn.microsoft.com/en-us/library/bb510680%28v=sql.110%29.aspx –  Thomas Stringer Mar 18 '12 at 16:52

1 Answer 1

up vote 3 down vote accepted

Compatibility level simply changes the language syntax that is supported by the SQL Statements. This will cause all the execution plans to be expired and force them to be recompiled. It has nothing to do with the data storage engine or the way that the data is written to the disk.

Once a database is attached to a SQL 2012 instance, it is in the SQL 2012 storage format and can't be moved back to an older version of SQL (no matter what setting the compatibility level is set to).

The link provided by @Shark (http://msdn.microsoft.com/en-us/library/bb510680%28v=sql.110%29.aspx) in the comments provides some additional reading on the subject.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.