Sql-server – SQL 2005 SP2 Database on SQL 2012 Instance

compatibility-levelsql-server-2005

I've an SQL Server 2005 SP2 instance that contain old databases that are not compatible with other SP of SQL Server 2005.
Those databases are on physical server that don't have any space to backup them so i planned to put them on a new virtual machine on a SQL Server 2012 instance with compatibility level at 90.

But i want to know if the compatibility level of the 2012 instance is equivalent of an SQL Server 2005 SP4 because if is this i can't put the database on it.

Best Answer

The Compatibility Level never changes due to a Service Pack upgrade. So SP4 has the same Compatibility Level as SP2, same features and limitations etc, it's just presumably better/faster/more stable/more secure.

SQL2005 databases have Level 90 (unless they were restored from even older versions without updating the Level) and can be restored on SQL 2005 through 2012.

For the complete table of SQL Server versions vs supported Compatibility Levels, see: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-compatibility-level