问题
TITLE: Microsoft SQL Server Management Studio
Attach database failed for Server 'DESKTOP-MR6JCUA'. (Microsoft.SqlServer.Smo)
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)The database 'ABC_Management_System' cannot be opened because it is version 869. This server supports version 852 and earlier. A downgrade path is not supported.
Could not open new database 'ABC_Management_System'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 948)
回答1:
Your Sql server 2016 database that you are importing into cannot load the Sql Server 2017 backup.
One Solution:
The SQL Utilities that create bacpac files with schema and data can accomplish this usually. You would be transferring the data from one sql server to the other. It would be a fancy copy operation that does not rely on the backup file. Pay attention to target and source if you do this.
Another Solution:
Upgrade your “2016” server to a 2017 server, but you should also consider installing a second 2017 Instance next to your 2016 instance if your 2016 target is a really a dev machine. Then you will be able to restore your original 2017 backup file into your new 2017 sql server instance.
回答2:
Please select Data source as .\sqlexpress
intead of (localdb)\MSSQLLocalDB
For example, try to set the Database connection string as
Data Source=.\sqlexpress;AttachDbFilename=C:\\...\\XXX.mdf; Integrated Security=True;
来源:https://stackoverflow.com/questions/51334857/sql-server-version-error-while-attaching-a-mdf-file