Local db error. An error occurred while establishing a connection to SQL Server related to a network or a specific instance

I have a website that is running Visual Studio 2015 with local db, everything works fine. But the production server is down.

connection string

"Data Source = (LocalDB)\MSSQLLocalDB; AttachDbFilename =|DataDirectory|\SeedDb.mdf; Integrated Security=True;MultipleActiveResultSets=True;". 

I tried the connection string

"Data Source = (LocalDB)\V11.00; AttachDbFilename =|DataDirectory|\SeedDb.mdf; Integrated Security=True;MultipleActiveResultSets=True;".

Full error:

Server error in application "/".

When connecting to SQL Server, a network-related or specific instance error occurred. The server was not found or was not available. Verify the instance name is correct and configure SQL Server to connect remotely. (provider: SQL Network Interfaces, error: 50 - A local database error has occurred. The specified LocalDB instance does not exist.)

: -. .

: System.Data.SqlClient.SqlException: SQL Server . . SQL Server . (: SQL, : 50 - . LocalDB .

?

+4
2

, . prod-

.

" = (LocalDB)\MSSQLLocalDB; AttachDbFilename = | DataDirectory |\SeedDb.mdf; Integrated Security = True; MultipleActiveResultSets = True;".

, , env =|DataDirectory|\SeedDb.mdf / dir ( )

+1

init SQL-.

data source=SQLSERVER\INSTANCE;initial catalog=databaseName

SQL Server . .

-2

Source: https://habr.com/ru/post/1615013/


All Articles