Can SQL Server Express LocalDB be connected to remotely? Can SQL Server Express LocalDB be connected to remotely? sql-server sql-server

Can SQL Server Express LocalDB be connected to remotely?


No, SQL Server Express LocalDB doesn't accept remote connections.

The idea with shared network folder might work, but only if you are able to make sure the LocalDB instance is shutdown before you try to copy the file. Also keep in mind that only one LocalDB instance can have any given database file open at the same time. and don't forget about the log files!

Additional security warning: unlike SQL Server Compact databases, SQL Server Express databases (including LocalDB ones) are not designed as secure data exchange format. For instance, they can contain malicious code in .NET assemblies embedded in them. So you should never open databases from untrusted source.

Maybe providing the customer with a simple tool that automates the backup process would be a better idea?


This isn't a fresh thread, but I would like to share my experience with SQL Server Express database LocalDB.

I have a WPF C# project using SQL database with LocalDb Engine. It is working fine no problem, I can use the database with the WPF app. I wanted this app to work on network with more PCs.On the network another PC can use the database from my PC using UNC path in the connection string.
It seemed to me the remote connection is working. However when the remote PC is connected, I am not able to use the database with my local WPF app. If I run my app first the remote PC could not connect. So this tells me that the remote connection is working, but the multiple connection is not allowed.
OK, I didn't give up and I run the app from my PC twice and I saw it is working which tells me that the same SQL LocalDB engine can handle multiple connections locally only.

I hope this experience will help someone. Thanks.


In short, yes it can. Here is a tutorial on how to configure it.

Also, here is another post with a potential issue that might occur.

Both explain how to configure SQL Server Express to accept Remote Connections.