Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change SQL Server database version

Tags:

sql-server

I have a SQL Server 2008 version database (version number 655). If I try to create for attach it to a SQL Server 2005 or SQL Server 2000, I get an error:

This database is version 655. This server is compatible with version 612 or previous

Of course I can attach the database to SQL Server 2008 without errors. I know I can generate SQL commands for the structure, but there is a lot of data also in many tables.

If I can change the internal database version (the compatibility level is now set to SQL Server 2000), the attach process in any server version will work, as this process updates the version automatically.

Any suggestions?

EDIT: I just realized that if the update of the version number is automatic, there will be no way of doing a version change. So, I reformulate the question:

Do you know any tool that generate a "package" with data and structure that is compatible for SQL Server versions from 2000 to 2008? A tool or a Script, perhaps.

Thanks again.

Thanks in advance.

like image 792
Franklin Albricias Avatar asked Jan 22 '23 20:01

Franklin Albricias


1 Answers

You cannot under any circumstances attach a database from a SQL Server 2008 server to a previous version like SQL Server 2005.

There is no way to achieve this - there's no "conversion" tool to change the database version or anything.

If you need to support SQL Server 2005, you have to have a SQL Server 2005 server at hand (maybe in a VM or something). Or then you need to use tools like Red Gate's SQL Compare and SQL Data Compare to synchronize changes between your SQL Server 2008 and your other SQL Server 2005 database.

like image 58
marc_s Avatar answered Jan 30 '23 08:01

marc_s