这是正常生产中使用的LocalDB? [英] Is it normal to use LocalDb in production?
问题描述
我知道,使用的LocalDB
是非常好的,易于研究与开发,我不知道它是否使用它在生产时,我的IIS服务器上托管的网站的好主意吗?
我问,因为我不知道它不会在生产任何种类的速度问题。
这是我想在生产中使用我的连接字符串
服务器=(的LocalDB)\\\\ 11.0;集成安全性= SSPI; MultipleActiveResultSets = TRUE;
AttachDBFilename = | DataDirectory目录| ProjectDB.mdf;
的LocalDB是绝对的生产支持。从性能的角度来看它是相同的SQL Server的防爆preSS,因为它们共享相同的数据库引擎。
现在,在完整的IIS中运行的网站,我会建议使用SQL Server防爆preSS的基于服务的实例。由于IIS正在运行作为一种服务,最好是有一个服务托管的数据库为好。这意味着你应该的不可以是使用用户实例=真
或 AttachDbFileName = ...
在您的连接字符串。
如果您想了解更多,我建议这个<一个href=\"http://blogs.msdn.com/b/sqlex$p$pss/archive/2011/12/09/using-localdb-with-full-iis-part-1-user-profile.aspx\">post使用的LocalDB从完整的IIS,第1部分并<一个href=\"http://blogs.msdn.com/b/sqlex$p$pss/archive/2011/12/09/using-localdb-with-full-iis-part-2-instance-ownership.aspx\">its跟进,第2部分。他们去到更多的细节。
I know that using LocalDb
is very good and easy for developement, I wonder if it's good idea to use it in production when I host websites on IIS server?
I'm asking because I wonder if it won't have any kind of speed issues in production.
This is my connection string that I want to use in production
Server=(LocalDB)\\v11.0;Integrated Security=SSPI;MultipleActiveResultSets=true;
AttachDBFilename=|DataDirectory|ProjectDB.mdf;
LocalDB is absolutely supported in production. From the performance point of view it is identical to SQL Server Express, as they share the same database engine.
Now, for a site running in full IIS I would recommend using service-based instance of SQL Server Express. Since IIS is running as a service it is best to have a service-hosted database as well. That means you should not be using User Instance=true
or AttachDbFileName=...
in your connection string.
If you want to learn more, I recommend this post on using LocalDB from full IIS, part 1 and its follow up, part 2. They go into more details.
这篇关于这是正常生产中使用的LocalDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!