SQL Server

SQLlocalDB – and How to add a latest version of a LocalDB instance

For those that develop with a backend DB, localdb has always been a good ‘go to’ option. A Dev db hosted on a localDB instance provides a good base that is simple to move to Production. It also has a benefit of Migrations. (Yes, SQL Server is not the only DB engine to provide such, but we will talk about SQL Server here).

LocalDB is a handy, for free, SQL instance that basically comes with VS installations (yes, now a days you do have to pick the correct workload).
With that in mind, those of us that long ago installed the venerable LocalDB, we were often suck with older versions of the SQL instance.

Well, not so much anymore does one have to work with a LocalDB based on 2012 (Yeah, one has been using Visual Studio for awhile).
So what is the secret? Use the command line utility SQLlocalDB to create a new “more recent version” LocalDB instance. Yes, one can remove the older instances as well. Just remember, if you have databases that are still in use with other development, make sure you re-create those DB’s etc on your new instance. Now onto the secret sauce…

SQLlocalDB Utility  The Microsoft page that gives full details on this SQL utility.

From your favorite command line do a SQLlocalDB c <name of your instance>

At this one will get a 15.0.4153.1 version of a SQL instance. Also, make note of SQLlocalDB i and SQLlocalDB s <instance name> and SQLlocalDB p <instance name>

~SG

Leave a Reply