LocalDB requires SQL Server 2016 LocalDB - sql-server

I have written an addin for my company using a local database. I am now in the stage of deploying it to other users using a setup so I can set the prerequisites. So far so good.
The issue I am having is that for some reason the database requires SQL Server 2016 LocalDB to be installed. Other users already have SQL Server 2014 Express LocalDB. In the prerequisites of the setup I put 2016, but for some reason the download is not functioning. It gives an error on the download (hresult 2146697203 in the log file). I read somewhere that there is no redistributable avialabe for 2016 and 2017. So I tried it with 2019. This is downloading and installing, but my database is not working. It wants 2016 for some reason.
My question(s):
Is it possible to change the local database to 2019 or 2014 Express?
Or do I need another bootstrapper for 2016?
Or is there another option I am missing/overlooking?

Related

SQL local server disappear after uninstall SSMS 2014 and install SSMS 2017

I am planning to install the latest version SQL Server Management Studio SSMS 2017 and trying to use the same local server name which was on SSMS 2014.
So I uninstalled SSMS 2014 then install SSMS 2017. After the installation complete, I am not able to login to my local server by using the same credential.
I have checked SQL Server 2017 Configuration Manager, there is nothing under the SQL Server services.
And there is nothing under the registered servers.
Need help to retrieve my local server name, or guide how to recreate a new server name.
Thanks

SQL Server Management Studio 2017 not showing databases that were created in SQL Server 2016

I had Express edition installed of SQL Server 2016. I needed to use SQL Agent Jobs. For that purpose I installed a patch of SQL Server 2016 enterprise edition but it didn't worked. After that I installed SQL Server 2017 Developer edition which showed me the SQL Agent Jobs node (which i wanted).
After installation i was able to see my databases in both servers 16 & 17 connected locally. Today when I logged into my system and connected the instance of the server I'm not able to see my databases. When i try to attach the data files located at:
C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\DATA
it does not show the file in the popup to attach it. Although in the file explorer I can see the file. For reference I have added an image of the list of databases, i cannot find my databases in it.
Any help regarding it would be thankful.
Screenshot from both SCM's.
You installed second instance (2017). You need to connect to 2016 instance (using /instance_name) and then make a backup, and then restore backup (+transfer logins) on 2017 server, and finally uninstall 2016. Or detach files on SQL 2016 instance and reattach on 2017 + uninstall.
Alternatively you need to choose in-place upgrade 2016-> 2017 instead of installing a new instance.

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.

How to run SQL Server 2012 Services

I have Installed Microsoft Visual Studio 2012 (Ultimate) , and it installed all the SQL files,
yet I can't find the SQL Server Manager in the Start Menu, like the old version, so I can't start the services, , or there is an other way to run the services, so I can connect to the SQL Server?
In Run window, type "C:\Windows\SysWOW64\mmc.exe" /32 C:\windows\SysWOW64\SQLServerManager12.msc. I did come across the same problem (Sql Server Configuration Manager is not in start menu) before, and I had to pin it to task bar.
SQL Sever 2012 service are installed via Microsoft® SQL Server® 2012 Express as VS 2012 does not install it unless you are using custom installer..
Once you install Microsoft® SQL Server® 2012 Express in your machine you can use SSMS and other tools to manage SQL services on your machine.
Use 'sqlserver.exe' to start SQL Server from the command line - MSDN reference here. Or you can download SQL Server Management studio as shown below - from this link.

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