We plan on pushing a windows application on computers external from our companies network (in various locations). I'm wondering what options I have for databases. I'd like to use SQL Server, but is there a way to avoid paying for licenses for each PC we load the windows application on?
Also, is there a way to have the data part of the executable when deploying the application, or would I need to install SQL Server on each machine?
Thanks!
As an alternative and a bit newer technology to Sql Server Compact Edition, you could use LocalDB.
Both are MS SQL products, but LocalDB doesn't have the disadvantages of CE, is still a file based DB and doesn't require the server installation, configuration and maintenance of SqlServer Express, only the runtime components.
Here you can find a nice comparison between Express, Compact and LocalDB
and here you can find the introduction of LocalDB by Microsoft.
The licensing of LocalDB is the same as for SqlExpress and you also need an installer to run for the runtime components of LocalDB (which is one downside when compared to CE).
Is there a way to avoid paying for licenses for each PC we load the windows application on?
Presumably you're just accessing a local database on these machines right? In that case you can use SQL Server Compact. It's free and pretty darn good.
Is there a way to have the data part of the executable when deploying the application?
If you're deploying your application via ClickOnce, then you can set SQL Server Compact as a prerequisite so the application will check for its presence and install it if needed.
Otherwise, you can push it out like any other prerequisite as part of the installer package (i.e. InstallShield or WiX).
Related
I've a winform application that intreacts with MS sql server for database. How can I deploy the winform application in any computer and make it runnable ? I'm not clear on how can we deploy sql server database to the client computer and make the application running.
You can convert to SQL Server LocalDB (https://msdn.microsoft.com/en-us/library/hh510202.aspx), which basically involves a changing your connection string and then deploying a copy of the .mdf file with your application. LocalDB will need to be installed on the user's computer.
MsSql Server has several editions with different constraints and requiring different configurations (https://www.microsoft.com/en-us/sql-server/sql-server-editions).
If you focus on standard, developer, enterprise, or web edition of MsSQL Server,
You need to deploy your database to a separate db server as a best practice, and your application connects it remotely by appropriate using connection string.
If you will use Ms Sql Express edition which you can deploy your database with your application together; in addition, you can prepare an installation package and attach the db to that installation process. You should keep in mind that Express edition has limitations such as storage.
If your applications is not stuck with Sql Server, you can take a look at alternative standalone databases such as sqllite. You can follow the thread for the details (Alternatives to SQLite?)
I created a c# program which relies solely on .NET and SQL Server. What do the end-users need to install in order to use my program? I know they have to install .NET Framework but I'm unsure if the program will work without the appropriate SQL files. or am I wrong?
I'm sorry if this question is rather misguided but this is my first program.
If your application is using SQL Server you will need to install SQL Server AND the database your application is looking for.
.NET Framework does not include SQL Server but SQL Server will install the .NET Framework. (SQL Server 2016 installation)
SQL Server 2016 Express had a LocalDB version that may suit your needs. LocalDB is a lightweight version of Express that has all its programmability features yet runs in user mode and has a fast, zero-configuration installation.
Good luck with your first program. :-)
I have got a C# .NET application which uses an SQL Server 2008 R2 database.
I have no problem deploying the actual application to multiple PCs, however I am having a whole world of trouble deploying the database. The application is going to be used by a large amount of users - it can be downloaded and installed by anyone. My problem is that the application uses a connection string to connect to the database.
How am I going to include the database as part of the installation using the Visual Studio publish tool, and make sure that it will work on any installation with the same connection string.
I have spent a long time searching, and have tried out many potential solutions, including this, however in the latter particular case, the application could not find the database when it was deployed.
As per your given SQL connection, it seems your are using Sql Server Express edition, to bundle express edition with your application, here are the options,
Add SQL Server Expression edition setup in your installation media, and invoke setup.exe through your setup program
Or you can use Web Platform Installer
Or you can simply check in your setup program, whether desired SQL Server Express Edition is installed, if NOT then display the message to user that "Please install the Sql Server Express Edition", and guide how he/she can install, for example providing a download link
Or you can go with Sql Server Compact Edition which is a light weight version and I think only few DLLs are required to make it functional on end user's PC.
For more information:
Sql Server Express Edition:
http://blogs.msdn.com/b/user_ed/archive/2012/12/09/how-to-embed-sql-server-express-in-an-application.aspx
Sql Server Compact Edition:
https://msdn.microsoft.com/en-us/library/aa983326(v=vs.140).aspx
I'm currently learning C# with Visual Studio 2013 and planning to write an application with Database. There i have some questions:
What's the best database to publish with my application to
friends/customers? The database won't be too big. And every user
should use his own database.
How do i publish my application with the database and make an installer from it? I want to give customers a setup.exe that they can install. With everything they need, i.e. .net, database, etc
Thanks in advance
Here is a good SQL Comparison Table that shows what you can and can't have with different options (SQL Server Express, Local DB, SQL Server Compact / CE).
You probably want SQL CE so you can bundle up an actual database file with your installer.
As for the installer, you'll need to create a Bootstrapper which will contain your installer + other installers you require + your database that you're releasing (assuming you mean a pre-populated database?).
MS SQL Server Compact edition would be a good choice. It's free and redistributable with Your application. No extra installation needed. http://www.microsoft.com/de-de/download/details.aspx?id=17876
For really small databases, you could use sqlite.
Otherwise, I'd suggest using MS SQL Server, it has a free Express edition. I don't think attaching another install.exe would cause problems.
I want to deploy a project which is coded in C# with SQL Server as the database server.
I have to deploy the project where there is no SQL Server installed.
Anybody have any idea about how this can be done?
Thanks.
A full SQL Server install is probably not something you should even try to deploy - licensing aside, the configuration of a SQL server is environment dependent. It would be better to list sql server as a pre-requisite in documentation only, and get it installed manually.
If your database is smaller, though, a SQL server express install might be reasonable to embed in an installer (if you use a named instance); IIRC the larger version of the installer allows you to create a custom installer for an application, ideal for deployment scenarios.
Even better; if you can fit into SQL server compact, then that is an embedded server; there is no install as such - just ship the runtime with the application.