无法打开数据库,因为它是版本 904.此服务器支持版本 852 及更早版本.不支持降级路径 [英] The database cannot be opened because it is version 904. This server supports version 852 and earlier. A downgrade path is not supported
本文介绍了无法打开数据库,因为它是版本 904.此服务器支持版本 852 及更早版本.不支持降级路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB
;AttachDbFilename=D:\xxxx\xxxx\xxxxx.mdf
;Integrated Security=True");
con.Open();
推荐答案
该文件是使用 SQL Server 2019 版本(localdb 或 full)创建的.
您机器上安装的 localdb 支持 SQL Server 2016 文件.
因此,您无法打开该文件.
That file has been created with a SQL Server 2019 version (localdb or full).
The localdb installed on your machine supports SQL Server 2016 files.
Therefore you are not able to open that file.
您有两个选择:
- 将您的 localdb 版本升级到 2019 版.
- 尝试制作与您的版本兼容的文件.
这里是 SQL Server FILE 版本的列表:
Here a list of the SQL Server FILE versions:
https://sqlserverbuilds.blogspot.com/2014/01/sql-server-internal-database-versions.html
这篇关于无法打开数据库,因为它是版本 904.此服务器支持版本 852 及更早版本.不支持降级路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文