Best way to provide db components to end user to use my application

Posted on 2012-09-18
Last Modified: 2012-09-22

I would like to provide along with my application, a simple SQL Server database which would be easily installable, via an installer, on even a virgin machine. (1)How would that work? Right now I am looking at either using a SQL Server compact db or the SQL Server Express Local DB. More likely the Local DB option.

(2)Is there any better way of doing this?
(3)With the localDB option, once the end user runs the install for the localDB, what is the standard way of installing all the db objects needed for him to use the app?
(4)What are the local DBs limitations?

    LVL 12

    Accepted Solution

    SQL Server compact (SQL Server CE) is embedded in the application, and is mobile-enabled. It is by far the easiest to implement, BUT has a size limit of 4GB compared to the 10 GB limit of SQL Express 2012, and has a limited feature set.

    SQL Express also allows for stored procedures, views, and triggers. These are critical for most of my applications, so I've primarily used SQL Server Express for storing transactional data, and SQL Server CE for storing membership information for my application.

    I'll typically including the .MDF file in my projects app_data folder, and then attach the file in the database connection string.

    When implementing the solution, I have to make sure that the process identity (<hostname>\aspnet or >hostname\network service) has write access to the data applications folder of the project on the web server to avoid potential errors.

    Other than that, the only requirement is that the host actually has SQL Server Express installed (not required with SQL Server Compact).

    I don't have any experience to offer with localDB.
    Jerry Nixon wrote a great article that evaluates the merits of each of these.

    I would definitely recommend reading it.

    Author Comment

    Great! Decided to go with SqlLocalDb. Thanks.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
    Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
    Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    26 Experts available now in Live!

    Get 1:1 Help Now