Sql-server – Restoring SQL Server 2012 database onto 2008

sql-server-2008sql-server-2012

I am trying to restore a SQL Server 2012 database after I set the compatibility level to SQL Server 2008 by following the instructions as listed on: http://learnsqlwithbru.com/2012/01/11/setting-database-compatibility-level-for-sql-server-2012/

However, the restore still doesn't work and I get "specified cast is invalid". Is there any way I can fix this problem?

Note: I don't want to use a Generate scripts option.

Best Answer

Compatibility level only controls what features may or may not be used on a given database and has no bearing on the restoration of DBs from different versions.

As pointed out by others, it can't be done by any means other than scripts or, if you can get it to work, the built in Copy Database tool. However that uses SSIS and I have never managed to get it to work successfully as it requires a whole heap of fiddly security apparatus, and usually consumes far more time than it's worth.

If you truly don't want to use scripting, then pretty much your only option is to upgrade your target DB server to 2012, or install a new one (using developer or Express editions is an option provided that a) It isn't a production instance if you use Developer Edition and b) the limitations of Express don't affect you).