I'm workig on a web app which is using
SQL Server Express (Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64) Oct 28 2016 18:17:30 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows 10 Pro 6.3 (Build 18362: )).
The web app is using connection string to connect to DB. After searching for a few days for a proper connection string format I managed to find the format, using method described by Nik in this blog post and it is:
Data Source = np:\\.\pipe\LOCALDB#A9DE3E14\tsql\query; Initial Catalog = MyDataBaseCatalog; User ID = myuser; Password=mypassword;
Everything was working fine yesterday, but today it stopped. I discovered that the service name has changed to:
LOCALDB#B87CB983
After replacing the instance name with the new service name in the connection string the web app works well, but it's not an acceptable solution.
Can you tell me why the instance name is changing, is it any Express version limitation? How can configure the name to be permanent?