Is it normal to use LocalDb in production?

前端 未结 3 1748
挽巷
挽巷 2020-12-13 13:53

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?

<
3条回答
  •  时光取名叫无心
    2020-12-13 14:35

    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.

提交回复
热议问题