TITLE: Microsoft SQL Server Management Studio
Attach database failed for Server \'DESKTOP-MR6JCUA\'. (Microsoft.SqlServer.Smo)
ADDITIONAL
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.
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;