I have a Windows Form project in VS2015 that uses a local database file (.MDF). Currently I have SQL Server Express 2016 installed, including 2016 LocalDB. 2014 LocalDB is also installed. The default instance for LocalDB (instance name = MSSQLLocalDB) is 12.0 (2014 version), but I need it to be 13.0 (2016 version).
I have tried using the command line utility SqlLocalDB.exe to delete and then create the MSSQLLocalDB instance, but it does not work, I just get the errors shown below.
C:\Program Files\Microsoft SQL Server\130\LocalDB\Binn>SqlLocalDB.exe delete "MSSQLLocalDB" FormatMessageW failed. Error code returned: 15100
C:\Program Files\Microsoft SQL Server\130\LocalDB\Binn>SqlLocalDB.exe create "MSSQLLocalDB" FormatMessageW failed. Error code returned: 15100
How do I change the default instance to 13.0? Do I need to uninstall 2014 LocalDB?
Answer by ArcherVic ·
I could not get SqlLocalDB.exe to work. However, I went into "Programs and Features" and selected Sql Server 2016 LocalDB and did a "Repair". That seems to have changed the default to 2016 version. Wish I understood why that worked.