1. I've made a backup of a SqlServer database running on SqlServer 2008. 2.I've restored that backup into a SqlServer 2012 instance.
  2. 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?

link|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 – Shark Mar 18 at 16:52
feedback

1 Answer

up vote 2 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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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