I have a C# project that I want create a setup for. I use Advanced Installer.
I use SQL Server 2017 Express for creating instance of my database. Now when I want to choose "Prerequisites", I have 2 options:
SQL Server 2017 Express
SQL Server 2017 Express Local DB
What should I choose, and what's the difference?
SQL Server Express LocalDB: This edition is mainly used as a development tool. It is a lighter version of Express that runs as a local app. It does support all the main programmability features of the other editions.
The big advantage of LocalDB for developers is that it allows them to create a local environment that is much easier to install and manage. Users can just start up an instance of LocalDB runtime as they need it and do not need to install a service.
For details, please check the SQL Server Express LocalDB article.
Related
I'm writing a program with using C#. And I'm using SQL Server Management Studio to create local databases to keep my data. I would like to run this program on other computers. I do not want to install SQL Server Management Studio on every computer. Can I move my local database to other computers without installing SQL Server Management Studio?
In example I don't mind installing localDB. Actually I think that I can do it only using localDB but I could not find proper info. My program can reach the database with connections.
In other words, how can I move my database to another computer which ONLY has localDB?
Thanks...
From Microsoft:
LocalDB is a feature of SQL Server Express targeted to developers. It is available on SQL Server 2016 Express with Advanced Services.
LocalDB installation copies a minimal set of files necessary to start the SQL Server Database Engine. Once LocalDB is installed, you can initiate a connection using a special connection string. When connecting, the necessary SQL Server infrastructure is automatically created and started, enabling the application to use the database without complex configuration tasks. Developer Tools can provide developers with a SQL Server Database Engine that lets them write and test Transact-SQL code without having to manage a full server instance of SQL Server.
You can work with LocalDb without having to install Management studio.
I have developed an WPF application using .Net 4.0 framework. I have installed SQL 2012 Express edition on my machine .
My application performs basic CRUD operations on this database using appropriate connectionstring. I am very new to deployment. so my question is How can I deploy my mdf files at the client end ? I cannot install ~130MB of software at client end just for my 4MB of mdf files it doesn't make sense. Also while deploying project I saw this pre-requisites screen
My questions are:
(I think if i check SQL Server 2008 Express SP1 it will download it at client end) But I have SQL 2012 Express Edition Installed so how can I go with it ?.
Also is it possible If I give client seperate exe of my SQL 2012 Express edition ? (There is no need for management studio at clientside.so what should be given to client so it that installs only those software which are required to run .mdf file )
To answer your first question,
1. You will require a .prq file for SQL server 2012. Either you can create it or you can download it from web. You can add/edit '.prq' file from 'Redistributable' section.
For your second question,
2. You can pass the setup of aql 2012 express to your client with specific instructions to only install server and not the management studio.
You need SQL Server Compact most probably
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 have a .NET 4.0, SQL Server 2008 application built on VS 2010.
Since more than 10 months I have been working on a project and its completed now. I moved to the next task of creating an installation of the software. Its also done. But now I have a big issue.
My clients already run software running SQL Server 2005 and its installed on their system. However when I was packaging my VS2010 C# application, I deployed it with prerequisite of SQL Server 2008 but now the problem is, when I try to install my application, it asks to uninstall the 2005 and then to install 2008. But my clients are very rigid to allow my program to uninstall any application on their system. I am stuck here.
I also tried to remove it from my prerequisites and the application was successful to install itself but after when I tried to run my application, its unable to access the database.
How I can solve this issue? Is there any way to make application and database both work with SQL Server 2005 or 2008. Or maybe any other expert advice.
EDIT 1
I also have Datetime stuff which really annoyed with to accomplish, as my project is multilingual so I have separate functions to handle datetime to insert in SQL.
EDIT 2
Is it possible to upgrade SQL Server 2005 to 2008 using my own Visual Studio Deployment Project?
EDIT 3
This is the error I am getting
Prerequisite check for system component SQL Server 2008 Express failed with the following error message:
SQL Server 2008 Express Service Pack 1 (x64) cannot upgrade the existing instance of SQL Server 2005 Express (x64 WoW) named 'SQLEXPRESS'. Uninstall this instance of SQL Server 2005 Express and retry installing SQL Server 2008 Express Service Pack 1 (x64)."
See the setup log file located at 'C:\Users\BOOGI~1\AppData\Local\Temp\VSD41A1.tmp\install.log' for more information.
EDIT 4 (Main)
Is it possible to make a Microsoft SQL Server database file compatible to run with both SQL Server 2005 and SQL Server 2008?
It is usually not a problem to run an application against any version of SQL Server. Create the database using Management Studio and you're ready to go.
If you have a setup, you may need to change the prerequisites, so that it works with SQL Server 2005.
You may have to adjust the connection string. In the error message you're providing, it is obvious that the instance name of the SQL Server is "SQLEXPRESS", so you need to add this in your connection string.
Also, it is not a problem to run SQL 2005 Express and 2008 Express side by side.
One thing you can do is install SQL 2005 in your development machine or another machine then migrate your schema's and data from SQL Server 2008 to SQL Server 2005 and get your C# application working again. .NET 4.0 doesn't care which version of SQL server you are connecting to as long as you have the appropriate drivers installed for each appropriate database.
For your datetime create a function in SQL server so that it works in both version. Check out some examples in this link.
Thanks,
Kalagen
include sql enterprise in setup project?
how to include sql enterprise when it's not appear in prerequisites of the setup project
and if it's not possible do i have install the full enterprise edition on the client machine?
i use visual studio 2010 and sql enterprise 2008.
i'm a database beginner and i always used to use sql express edition but now data base getting grow fast and the limitations of the sql express for 4gb make a big problem so any help i will be grateful
Microsoft SQL Enterprise edition follows and uses it's own License, you need to install it through the Web or offline Setup only.
It's a paid licence product, witch Express and Compact Editions are not, and this last two editions are the ones that you can pack with your application as their licenses allow you to do so.
You can always use a file that can run on a database to populate with records, or use, for example, Windows SQL Azure to have a centered database and Export / Import your schema with data.