简体   繁体   English

错误948:带有SQL Server 2008 R2的Visual Studio 2012

[英]Error 948 :Visual Studio 2012 with SQL Server 2008 R2

I have a computer that working as server and client machine. 我有一台充当服务器和客户端计算机的计算机。 I installed SQL Server 2008 R2 and Visual Studio 2012 in it. 我在其中安装了SQL Server 2008 R2和Visual Studio 2012。

Using SQL server management studio I generated a DB then I created few table in that DB , then I insert data into it. 使用SQL Server Management Studio,我生成了一个数据库,然后在该数据库中创建了几个表,然后将数据插入其中。

Then I deattached that DB using Server Management studio . 然后,我使用Server Management Studio断开了该数据库的连接。 Then I move that DB into my project "App_Data" folder.Then using "server explorer" & T_SQL pane functions of Visual Studio 2012 I did few changes of that DB . 然后,将该数据库移到我的项目“ App_Data”文件夹中。然后使用Visual Studio 2012的“服务器资源管理器”和T_SQL窗格功能,对该数据库进行了少量更改。

Since I want to do massive changes , I close that DB connection with the project. 由于我想进行大量更改,因此我关闭了与项目的数据库连接。 I move that DB into SQL server default Database Location which is 我将该数据库移入SQL Server默认数据库位置,即

"C:\\Program Files\\Microsoft SQL Server\\MSSQL10_50.MSSQLSERVER\\MSSQL\\DATA" “ C:\\ Program Files \\ Microsoft SQL Server \\ MSSQL10_50.MSSQLSERVER \\ MSSQL \\ DATA”

then I try to attach that DB using server management studio , I'm getting 然后我尝试使用服务器管理工​​作室附加该数据库,

"Error 948" “错误948”

Cannot be opened because it is version 706. This server supports version 661 and earlier 由于它是706版,因此无法打开。此服务器支持661版和更早版本

How to overcome this error ? 如何克服这个错误? your ideas/suggestions highly appreciate 您的想法/建议高度赞赏

its a version comparability issue. 其版本可比性问题。

Initially you created in sqlserver 2008 R2 that version would be 661 and when you moved to VS2012 it was updated to 706, and when you tried to go back to SQl server 2008 R2 again this 706 version is not being downgraded to 661, obviously it can't be done. 最初,您在sqlserver 2008 R2中创建的版本为661,而当您移至VS2012时,该版本已更新为706,并且当您尝试再次回到SQl Server 2008 R2时,此706版本并未降级为661,显然可以不能完成。

one simple solution without any changes to your server setup, use Generate Script feature that should help you. 一个简单的解决方案,无需对服务器设置进行任何更改,请使用“生成脚本”功能,该功能应为您提供帮助。

By default, you can't attach a DB file from a SQL Server 2012 to an instance which is running SQL Server 2008 R2. 默认情况下,您无法将SQL Server 2012中的数据库文件附加到运行SQL Server 2008 R2的实例。

Version 661 is a SQL Server 2008 R2 DB file and version 706 is a SQL Server 2012 DB file. 版本661是SQL Server 2008 R2 DB文件,版本706是SQL Server 2012 DB文件。 More information: How to determine version of Local Sql Instance and your database 详细信息: 如何确定本地SQL实例和您的数据库的版本

You will therefore need to update your SQL Server instance, eg by upgrading to SQL Server 2012 因此,您将需要更新您的SQL Server实例,例如,通过升级到SQL Server 2012

I would also recommend you patch to the newest released build of SQL Server 2012. Check here for the newest version numbers for the different SQL Server versions: Microsoft SQL Server Version List 我还建议您修补SQL Server 2012的最新版本。请在此处查看不同SQL Server版本的最新版本号: Microsoft SQL Server版本列表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM