SQL Server version 612 , 655? - sql-server

I have SQL Server 2008 and VS2008 installed on my computer and I am trying to run a web application I've created on a computer which has SQL Server 2008 and VS2008 and VS2010 beta 2 with its SQL Server Express.
I am getting an error with the database version that is
"...aspnetdb.mdf" cannot be opened because it is version 655. This server supports version 612 and earlier...."
Configuring the database in Visual Studio ->Tools -> Options -> Design-Time Validation Database is not working since I don't have the SQL Server version comes with VS 2010.
EDITED : I also edited aspnetdb and inserted a few more tables so I need the same aspnetdb
Is there any solution to convert this db ?
Also, after fixing this, I am looking forward to upload it on my hosting which has SQL Server 2005 DB and configure it in PLESK.

The SQL Server databases have a version specific format. Each SQL Server runtime version (SQL 2008 SP1, SQL 2008 RTM, SQL 2005 SP2, SQL 2005 SP1, SQL 2005 RTM etc) knows how to upgrade to its own verison. Unfortunately, once upgraded the database cannot be downgraded. So if your MDF was upgraded to version 655, it cannot be downgraded to any prior version. If you know you're going to deploy on SQL Server 2005, you must develop on SQL Server 2005 too. Not only that, but the actual build number of your development has to match the build number of the deployment (or at least be lower than that): the SP level and CU level must match.
You can a attach the 2008 version MDF you created to a SQL Server 2008, script out the database content, then import the script into a SQL Server 2005 database of the proper version.

I had this problem and when I changed my_computer_name\SQLEXPRESS with . to connect to server and it works and I could attach MDF file

may be you have both services run. (Mssql2008 and mssqlexpress) Maybe you have runing the mssqlespress running, that's the error that you have. Try to stop the mssqlserver express service and run mssql2008 services, and attach again your databases. I try this and works for me

Related

How to target multi SQL Server editions

I have built a Windows application to backup databases.
I downloaded SQL Server 2012, I want to add Microsoft.SqlServer.Smo.dll and Microsoft.SqlServer.SqlWmiManagement.dll DLLs as references to my project to connect with SQL Server 2016 and/or SQL Server 2014. What do I need to deploy in order to achieve that?
When I added references that are not related to the same SQL Server edition I got the error :
Could not load file or assembly 'Microsoft.SqlServer.WmiEnum, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
Any help please?
Thanks in advance.
You need the newest version of the DLL's.
If you have the SQL Server 2012 version, you can connect to any server with a version up to 2012 - SQL Server 2005, 2008, 2008 R2, 2012.
If you want to connect to SQL Server 2014 and 2016, too, you must use the SQL Server 2016 versions of those SMO DLL's
Exactly, remember that you SMO is installed with SQL Server version that you have installed in your machine, you have to download the last version to be compatible with all previous version.
Download Microsoft SQL Server 2016 Feature Pack

How do you upgrade a SQL Server Express instance from 2012 to 2014

I performed what I thought was an upgrade from SQL Server Express 2012 to 2014 by running the 64-bit executable. Everything seemed to be working fine during installation as it recognized my existing server instance (2012) which I presumed would be upgraded to 2014.
However, when I try to restore a 2014 DB from my web host, I get the following error:
The database was backed up on a server running version 12.00.2000.
That version is incompatible with this server, which is running
version 11.00.5343. Either restore the database on a server that
supports the backup, or use a backup that is compatible with this
server.
I definitely have 2014 installed, but when I view my instance from inside SMS 2014 it looks to still be running on SQL version 11.xxx which I presume is 2012 (the name of the instance is the same as it was when I was running 2012).
Did I do something wrong during the installation? How do I upgrade my instance to 2014 so that I can restore my DB locally?
downloadsqlserverexpress.com helps to find the correct download of SQL Server Express from MS Download Center. You need the one that contains the SQL Server Engine, not just Management Studio.
sqlserverbuilds.blogspot.com.au has a full list of SQL Server versions and builds.
Using it we can see that you are running Management Studio 2014 (build 12.0.2000.0), but you are connecting to SQL Server 2012 engine (build 11.0.5343).
Maybe you now have two engines running (both 2012 and 2014). You can check the list of running processes and verify if two instances of sqlservr.exe are running.
It should be possible to upgrade the engine in place by installing 2014 on top of 2012. I don't know why it didn't happen in your case. You could have chosen to install only Management Studio even if you had a full installer.
One long, but sure way to clean up would be to uninstall everything related to SQL Server and install 2014 again. Make proper backups of databases at first, of course.

Are there glitches with trying to use SQL Server Management Studio 2008 R2 to manage MSSQL 2005 DB instances?

I'm currently using Microsoft SQL Server Management Studio ver. 9.00.4035.00 to manage my SQL Server 2005 (90) compatible databases.
Will I encounter problems should I attempt to upgrade the Management Studio software to SQL Server Management Studio 2008 R2 to manage MSSQL 2005 DB instances? I will not be upgrading the version of the database instance.
My personal expreience says that you wont have any migration issues if you have sql server 2005 db instances. The attach and detach of DB is same in 2008 version. Only thing is, once you use a 2005 instance DB and attach it to 2008 version, it cannot be used with 2005 version again. Apart from that, from functionality point of view, there are no issues, you can continue to use the 2005 version DB on 2008 as normal.
link for moving the DB from 2005 to 2008 -
http://www.packtpub.com/article/moving-a-database-from-sql-server-2005-to-sql-server-2008-in-three-steps
EDIT: Incase you want to move back to 2005 version for same DB instance, I dont think it will be possible except for doing a data export import onto new 2005 DB instance.

SQL Server Express 2008 Install Side-by-side w/ SQL 2005 Express Fails

When I try to install a new instance of SQL Server 2008 Express on a development machine with SQL 2005 Express already up and running, the install validation fails because the "SQL 2005 Express tools" are installed and I'm told to remove them.
What exactly does that mean?
After reading this article:
http://www.asql.biz/Articoli/SQLX08/Art1_5.aspx
I uninstalled the 2005 version of the SQL Management Studio but received the same error from the 2008 installer during my follow-up attempt.
Updates
1) Uninstalled the SQL 2005 Management Studio only. Received the same error from the 2008 install.
2) Removed all SQL 2005 common components. Received the same error from the 2008 install.
3) Installed the shared components from the SQL 2008 installation program. Received the same error from the 2008 install when trying to install the new SQL 2008 instance.
4) Uninstalled SQL 2008 components, rebooted, re-installed SQL 2005 Management Studio from installation media, rebooted, un-installed SQL 2005 Workstation Components from Control Panel, re-booted.
Installation of SQL 2008 is now proceeding as it should.
Seems likely that if I'd re-booted after update 2 above things would have gone more smoothly. :-(
Although you should have no problem running a 2005 instance of the database engine beside a 2008 instance, The tools are installed into a shared directory, so you can't have two versions of the tools installed. Fortunately, the 2008 tools are backwards-compatible. As we speak, I'm using SSMS 2008 and Profiler 2008 to manage my 2005 Express instances. Works great.
Before installing the 2008 tools, you need to remove any and all "shared" components from 2005. Try going to your Add/Remove programs control panel, find Microsoft SQL Server 2005, and click "Change." Then choose "Workstation Components" and remove everything there (this will not remove your database engine).
I believe the 2008 installer also has an option to upgrade shared components only. You might try that. Good luck!
In my case even after uninstalling all 2005 related components it didn't worked. I had to resort to a brute force way and remove following registry keys
32 Bit OS: HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\90
64 Bit OS: HKLM\Software\Wow6432Node\Microsoft\Microsoft SQL Server\90
I had to unistall the Workstation Components and SSMS Tools Pack (SSMS Tools Pack is an add-in for Microsoft SQL Server Management Studio (SSMS) including SSMS Express.)
Installation of SQL 2008 is now proceeding as it should.
The problem is that SQL 2008 MS has a bug where connecting to a remote server (say like a service provider collocation) it will always try to open the fist db in the list, and since the possibilities of been ur db the first on the list are really low, it will throw and error and fail to display the list of dbs... which using sql 2005 management studio it just works.
Wished I could use SQL 2008 MS, but looks like as far I connect to remote SQL 2005, SQL 2008 is out of the question on my dev machine :(
Just Remove the the Workstation Components from Add/Remove Programs - SQL Server 2005.
Removing Workstation Components, SQL Server 2008 installation goes well.
Simply remove the Microsoft SQL Server Management Studio Express 2005 from control panel
N.B. These notes are for SQL Server Express 2008 R2 (so Microsoft still haven't made this any easier). I also realise that I complicated things by installing 32-bit SQL Server Express 2005 and 64-bit SQL Server Express 2008.
I followed the steps by Josh Hinman above. Uninstalling the SQL Server Express 2005 "Workstation Components" was not enough. I required an uninstall of the 2005 Management Studio as well.
I also tried the Upgrade route that Josh Hinman suggested by clicking on the 'Upgrade from SQL Server 2000, SQL Server 2005 or SQL Server 2008'. This route never gave me the option of installing the components side-by-side it just went straight through the process of upgrading from 2005 to 2008. It completed successfully - but hadn't actually done anything. Thankfully though it hadn't harmed any existing database instances. So be warned trying that route.
If you currently have Red Gate SQL Toolbelt, you will need to unistall that too before continuing. Somehow it adds a reference to the 2005 version of the SQL Management Studio.
I'am trying to install SQL SERVER developer 2008 R2 alongside SQL SERVER 2005 EXPRESS,
i went to program features, clicked on unistall SQL SERVER 2005 EXPRESS, and only checked, WORKSTATION COMPONENTS, it unistalled: support files, sql mngmt studio
After that installation of sql 2008 r2 developer went ok....
Hopes this helps somebody
I also had to remove the SMSS before it would get past that step.

SQL 2000 database copy to SQL 2005 options

We have a production web and database server with SQL Server 2000. (However, a few clients they have their own servers with SQL 2005.) So we have local installs of SQL 2005 Express for development on Windows XP SP3 boxes (which don't allow SQL 2000 Enterprise installations).
We often need to copy SQL 2000 databases to SQL 2005 instances. In the past, we have used the SQL Publishing tool (also mentioned here). However, one of our databases is so big that using that tool fails as it creates SQL scripts that get too large for Management Studio to handle them properly. Besides, it takes too long... :)
We would use the Copy Database Wizard included with SQL 2005, but our development machines run SQL 2005 Express which don't included SQL Server Agent, which is required for Copy Database Wizard to work. So, I guess our solution will be to upgrade our development installs with the full version of SQL 2005 (we have an MSDN subscription of course).
I was wondering what other solutions, if any, work well for you guys? (Besides complaining to the bosses to upgrade our production servers to 2005 or even 2008--which I've already tried.)
Back it up in SQL Server 2000 and then use the RESTORE WITH MOVE command into 2005 Express.

Resources