can i use local DB in production environments

Loyal P T 1 Reputation point
2021-11-15T14:38:56.25+00:00

Our application is a utility that is getting installed in client machines with SQLCE as backend currently.

As a replacement for SQLCE which Microsoft is ending support, we are planning to have local DB. Do Microsoft recommends Local DB in production environments? or is it only for Development purpose?

Are there any performance/security issues in using Local DB?

SQL Server Other
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 60,161 Reputation points
    2021-11-15T17:39:53.41+00:00

    You can use LocalDB in a production environment but all the standard things to consider apply such as limitations on data, performance, etc. Compared to Compact it should be better in all regards as it is effectively SQL Express but it does take advantage of query optimizations that Compact couldn't but you should always test your queries. Note that you still have to install LocalDB so there is also the debate about simply using SQL Express instead but you'll have to make that decision.

    You can read more about LocalDB vs Compact here.

    0 comments No comments

  2. AmeliaGu-MSFT 14,006 Reputation points Microsoft External Staff
    2021-11-16T02:47:37.623+00:00

    Hi LocalPT-5093,

    Welcome to Microsoft Q&A.
    In addition, please note that SQL Server LocalDB runs in user mode with applications and not as a service. And LocalDB will shut down automatically if it doesn't have any request for a while.
    If you need to accept remote connections or administer remotely in the production environment, it is recommended to use SQL Server Express.
    Please refer to this blog which might be helpful.

    Best Regards,
    Amelia


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.