且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SQL Server Express LocalDB是否可以远程连接?

更新时间:2022-11-25 13:36:44

否,SQL Server Express LocalDB 不接受远程连接。

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

使用共享网络文件夹的想法可能有效,但前提是您能够确保在尝试复制文件之前关闭LocalDB实例。还要记住,只有一个LocalDB实例可以同时打开任何给定的数据库文件。并且不要忘记日志文件!

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!

其他安全警告:与SQL Server Compact数据库不同,SQL Server Express数据库(包括LocalDB数据库)不是作为安全数据设计的交换格式。例如,它们可以包含嵌入在其中的.NET程序集中的恶意代码。因此,您不应该从不受信任的来源打开数据库。

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?