I have a computer that working as server and client machine. I installed SQL Server 2008 R2 and Visual Studio 2012 in it.
Using SQL server management studio I generated a DB then I created few table in that DB , then I insert data into it.
Then I deattached that DB using 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 .
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
"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"
Cannot be opened because it is version 706. This server supports
version 661 and earlier
How to overcome this error ? your ideas/suggestions highly appreciate
By default, you can't attach a DB file from a SQL Server 2012 to an instance which is running SQL Server 2008 R2.
Version 661 is a SQL Server 2008 R2 DB file and version 706 is a SQL Server 2012 DB file. More information: How to determine version of Local Sql Instance and your database
You will therefore need to update your SQL Server instance, e.g. by upgrading to 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
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.
one simple solution without any changes to your server setup, use Generate Script feature that should help you.
Related
For some days I am a little desperate about a problem in Visual Studio 2008, what happens is that in my company I work with VS 2008 and SQL Server 2014, I have worked normally but when choosing a new connection in a DataSet (Example: when I want to add a DataGridView with data from the database I have to do it by means of the code and not by the VS designer to add connections) I have the following error:
Yes, I installed two or three times the update for Visual Studio 2008 Service Pack 1 followed by restarting the computer several times and getting absolutely nothing, I also chose to install SQL Server 2008 R2 on my computer and does not solve the problem can anyone Orient me and is it possible to solve this?
Ok guys,
I think the most efficient solution to this problem is to move the project to a newer technology, this would avoid headaches in the future.
However a temporary and somewhat "disgusting" solution is:
Having SQL Server 2008 R2 Service Pack 2 SP2
Restore the database (SQL Server 2014) in SQL Server 2008 R2 SP2
In VS 2008 you would choose to connect to the instance of SQL Server
2008 R2 SP2 and work locally
If this does not work then try to install Service Pack 1 for SQL Server 2008 R2 SP2 and restart the computer
For now I will have to adapt to the second solution jejeje
Thank you very much to all!
The database 'C:\USERS\ROANEPC\DESKTOP\FINAL\BROADCASTWEB\APP_DATA\ASPNETDB.MDF' cannot be opened because it is version 661. This server supports version 655 and earlier. A downgrade path is not supported.
Could not open new database 'C:\USERS\ROANEPC\DESKTOP\FINAL\BROADCASTWEB\APP_DATA\ASPNETDB.MDF'. CREATE DATABASE is aborted.
An attempt to attach an auto-named database for file C:\Users\RoanePC\Desktop\Final\BroadcastWeb\App_Data\ASPNETDB.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Database version:
655 means SQL Server 2008 instance.
661 means SQL Server 2008 R2 instance.
684 means SQL Server 2012 CTP1 instance.
706 means SQL Server 2012 instance.
782 means SQL Server 2014 instance.
You'll need to install the R2 version and continue to use that version. Downgrades do not work as in your example from 2008 R2 (10.50) to 2008 (10.00) but you can upgrade versions.
I am using Visual Studio 2012 working on a web application, a registration page. I have installed SQL Server 2008 Express and done the configuration but still when when I try to add a SQL Server database file in the project, I get an error
Connection to SQL Server Database file (.mdf) requires SQL Server 2005 or SQL Server 2008 Express to be installed and running on you local computer
Please help I am stuck here.
You need to install the LocalDB or to change your connection string to use the SQL server you have installed, it seems like you are trying to use a MDF file.
I have developed a C# desktop application. I need to deploy it in a client's machine. This app needs SQL Server 2008 R2. It is not feasible to set up SQL Server first and then my app. So, I thought of giving dependencies. Unfortunately the prerequisites option in VS has no option to include SQL Server 2008 R2.
It has only option for SQL Server 2005 Express and SQL Server 2008 Express.
How do I include SQL Server 2008 R2?
Sql Server 2005 express and Sql Server 2008 express come with below Limitation :
uses only 1 CPU
can use max of 1 GB of RAM
is limited to 10 GB of database size
you can use these software for individual system (desktop).
But Sql Server 2008 R2 is dedicated database server ,you can install it same system or separate system.
you need to write custom code for pre-detection Sql Server 2008 R2 Instance.
Below link would be helpful :
https://msdn.microsoft.com/en-us/library/a6t1z9x2.aspx
http://www.codeproject.com/Articles/16231/Deploy-your-Application-and-Database
I have written c# application that uses mdf file for database.when i make setup of that project and runs on other computer having dotnetframework and sql server compact 3.5 then id dose not runs and exception is shown saying something sql server not found or not ready for connection something like that what should i do
mdf is not for sql server compact edition, it is for the real sql server. You need to deploy it to Sql Server Express edition or higher.
Edit:
You can install SQL server express edition or if you want to use the sql compact server you need to create a "local database" in visual studio.
When adding a mdf-database to your visual studio project is is attached to your local sql express database server behind the scenes when you start your project.