How to target multi SQL Server editions - sql-server

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

Related

MS SQL Server Management Studio 2014, with older (2012) version of SQL server

I am using locally the MS SQL Server Management Studio 2012 with SQL server 2012 database engine.
I have the following question:
Can I upgrade ONLY the SQL Server Management Studio 2012 (TOOLS) to 2014 version, and leave my old 2012 already installed database engine version?
Yes, you can.
But install SSMS 2014 as standalone (instead of trying to upgrade tools).
From SSMS 2014 SP1 release notes you can see that it vitally supported SQL Server 2012. See how many compatibility fixes for 2012 were delivered.
Generally I'd recommend to prefer latest release of SSMS 2016 which
works with all supported versions of SQL Server (SQL Server 2008 - SQL Server 2016)
(Besides that I tried to find similar statement for SSMS 2014 (there was one), but I couldn't.)
I'm using SSMS 2008 + SSMS 2016 side by side and they are running just fine. In similar way, I was using SSMS 2008 + SSMS 2014 before the upgrade.
You can download and install SQL Server Management Studio using the links provided in: Scott Hanselman's website
There are links to various SSMS versions (2012, 2014, for x86, x64), as well as links to various SQL-Server Express versions.
By the way, you can use the latest SSMS 2014 to manage your 2012 database.
You could simply install new SSMS 2014 version and leave the 2012 version installed ONLY IF they are all 32-bit or 64-bit. You cannot upgrade 32-bit 2012 to 64-bit 2014 and vice versa. Ideally you could use 2014 version SSMS to access databases created in 2012 before because of the compatible level allows you to do that, but it will raise another problem for restoring the databases since you cannot restore any backup files that backed up from old(2012) to (2014) because of the database version did not match.
SSMS is now a separate free product that works with all versions from 2008 and up. The current version is 16.5.3
For older versions:
There is no explicit block for SQL Server 2000 or SQL Server 2005, but some features may not work properly.
You'll have to download the RC version if you want to connect to SQL Server vNext, eg to SQL Server on Linux

Is SSDTBI for Visual Studio 2012 Compatible with SQL Server 2014?

Currently I am creating SSIS packages for SQL server 2014 using Visual Studio 2012 and the SSDTBI for VS2012.This works well.
But I found some compatability issues with VS2012 for SSIS 2014(on web).I'm new to SSIS.I dont know what is that exact issues with VS2012?.And also they mentioned SSIS 2014 is compatible only with VS2013.Here i have mentioned the link below.
http://www.stefanjohansson.org/2015/02/issues-upgrading-an-ssis-solutionpackage-from-visual-studio-2012-to-vs-2013/
http://blogs.technet.com/b/dataplatforminsider/archive/201
3/11/13/microsoft-sql-server-data-tools-update.aspx
Can anyone tell me what is exact compatability issues for VS2012 with SSIS 2014?.I can not seem to find anything on google.
Thank you
According to msdn it possible.
On an instance of SQL Server 2014, you can import packages from an
instance of SQL Server 2008 or from an instance of SQL Server 2012,
but you cannot export packages to an instance of SQL Server 2008 or to
an instance of SQL Server 2012.
-
Run packages. You can run SQL Server 2008 Integration Services and SQL
Server 2012 Integration Services packages by using the SQL Server 2014
version of the dtexec utility or of SQL Server Agent. Whenever a SQL
Server 2014 Integration Services tool loads a package that was
developed in SQL Server 2008 or SQL Server 2012, the tool temporarily
converts, in memory, the package to the package format that SQL Server
2014 Integration Services (SSIS) uses. If the SQL Server 2008 or SQL
Server 2012 package has issues that prevent a successful conversion,
the SQL Server 2014 Integration Services tool cannot run the package
until those issues are resolved. For more information, see Upgrade
Integration Services Packages.
However, I would just use VS 2013 if you can.

SQL Server 2008 R2 Express Prerequisite Upgrade fails

We have a Visual Studio Installer which has many prerequisites one which is SQL Server Express 2008 R2 (English version)
We have a target computer which has SQL Server Express 2005 in Italian.
The installation fails with the error message as in this screenshot:
Is there a way to change the command line arguments to support a language independent upgrade?
UPDATE:
"Localized versions of SQL Server can only be upgraded to localized versions of the same language, and cannot be upgraded to the English-language version."
http://technet.microsoft.com/en-us/library/ee210665(v=sql.105).aspx
Does this mean the only way would be to backup data, uninstall 2005 and install the 2008 English version?
We solved the problem by creating a named instance of the SQL Server 2008 R2 Express database.

SQL-DMO: You must use SQL Server 2005 management tools to connect to this server

Getting an error in SQL Server 2000 Enterprise manager - Please see in the attached screenshot!
Kindly help how to overcome the issue
You have to install the backward compatibility package. You can download it from here.The file is called SQLServer2005_BCxxx.msi
You're trying to access a SQL Server 2005 instance using SQL Server 2000's Enterprise Manager, which isn't possible.
You need to install a copy of SQL Server Management Studio - the 2008 R2Express version should be fine, or you can dig out the 2005 version

SQL Server version 612 , 655?

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

Resources