数据库无法打开,因为它是706版本的。

您所在的位置:网站首页 数据库版本706无法打开661 数据库无法打开,因为它是706版本的。

数据库无法打开,因为它是706版本的。

2024-07-12 01:47| 来源: 网络整理| 查看: 265

百度翻译此文   有道翻译此文 问题描述

I have the problem that I am using Visual Studio 2013 to create a MDF file and then open it like it is described in this tutorial:

creating-the-membership-schema-in-sql-server

But when I try to attach the database to the MSSQLServer I get error 948 which basicly says:

The database cannot be opened because it is version 706. This server supports version 663 and earlier.

I have read these two articles:

The database cannot be opened because it is version 782. This server supports version 706 and earlier. A downgrade path is not supported

The database cannot be opened because it is version 706. (ASP.net)

From this is assume that it is possible to switch "Visual Studio" to a different SQL Server Version. So I could delete my old file, create a new one (In vS2013 ) and then attach it to my SQlServerExpress.

Could I switch under

Tools-> Options -> Database Tools -> Data Connections

to SQL version (LocalDB)\v10.0 ? And if so are there any reasons to not switch because it could lead to errors or unexpected behavior in VS2013

推荐答案

When you create a database, you can specify the compatibility version. This turns off features that would be available in a newer version of SQL Server, but it is unlikely that you would be using those if you just have a database for authentication.

It appears that only SQL Server Express version 2008 R2 (with some patches applied) in your problem server. To create your database in a compatible version, you have to go through many steps (full article):

Backup your current database In the Database Manager, right click and choose the "Generate Scripts" task: Script entire database Save to file and choose your destination path, choose Unicode text file Select the following advanced options: Script for Server Version: SQL Server 2008 R2 Types of data to script: schema and data Script Foreign Keys: true Script Indexes: true Connect to a SQL Server 2008 R2 instance (important) Run the scripts you generated to recreate the database and data in the downgraded version (you may have to correct the database name in the top of the script) Take the generated MDF file and incorporate it in your application

A newer database can work with an older MDF file (within reason, Server 2012 won't go further back than 2008), but it won't be able to create an MDF file that is compatible with an older version.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3