Reputation: 9
Please help me about this.. I use to attach a database but it has an error this is the error. And I use SQL Server 2012
Microsoft SQL Server Management Studio
Attach database failed for Server 'DANICA-PC\SQLEXPRESS'.(Microsoft.SqlServer.Smo)
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
The database 'MTS' cannot be opened because it is version 782. This server supports version 655 and earlier. A downgrade path is not supported.
Could not open new database 'MTS'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 948)
Upvotes: 0
Views: 574
Reputation: 754478
You cannot do this - you cannot attach/detach or backup/restore a database from a newer version of SQL Server (the mdf
file is version 782 - this is SQL Server 2014) down to an older version (version 655 is SQL Server 2008) - the internal file structures are just too different to support backwards compatibility.
You can either get around this problem by
using the same version of SQL Server on all your machines - then you can easily backup/restore databases between instances
otherwise you can create the database scripts for both structure (tables, view, stored procedures etc.) and for contents (the actual data contained in the tables) either in SQL Server Management Studio (Tasks > Generate Scripts
) or using a third-party tool
or you can use a third-party tool like Red-Gate's SQL Compare and SQL Data Compare to do "diffing" between your source and target, generate update scripts from those differences, and then execute those scripts on the target platform; this works across different SQL Server versions.
Upvotes: 3
Reputation: 606
I would try scripting out the tables and data and then creating it in SQL Server 2012 so you'll have a compatible version. You are trying to attach a SQL Server 2014 database with SQL Server 2012. The database is incompatible with your SQL Server.
Upvotes: 2