Как получить версию sqllocaldb (2017) для запуска из командной строки?
I have been using SqlLocalDB 2016 (version 13.0) for a while, and it is working fine except the utility SqlLocalDB.exe does not work properly - when I execute the following command it returns errors: C:\Program Files\Microsoft SQL Server\130\Tools\Binn>SqlLocalDB i "MSSQLLocalDB" FormatMessageW failed. Error code returned: 15100 FormatMessageW failed. Error code returned: 15105 FormatMessageW failed. Error code returned: 15105 FormatMessageW failed. Error code returned: 15105 FormatMessageW failed. Error code returned: 15105 I installed SqlLocalDB 2017 (version 14.0), and when I run the same command from the directory where the new SqlLocalDB.exe is installed it runs correctly: C:\Program Files\Microsoft SQL Server\140\Tools\Binn>SqlLocalDB i "MSSQLLocalDB" Name: MSSQLLocalDB Version: 13.2.5102.14 Shared name: Owner: Vics_PC\Victor Auto-create: Yes State: Stopped Last start time: 9/12/2020 10:24:38 AM Instance pipe name: However, when I run SqlLocalDB.exe from any other directory, for instance the debug directory where my code is running, I get the errors. So it seems Windows is running the 2016 version of the utility, not the 2017 version. I can see references to three versions of SqlLocalDB.exe in the Windows Registry, V12, V13, V14. How do I get Windows to run the latest version?
Что я уже пробовал:
Я пробовал бежать SqlLocalDB.exe (V14) из установленного каталога, и он работает, но Windows запускает более старую версию (V13) из любого другого каталога.