I have a disk top application made by c# visual studio. My question is do I have to setup SQL server on each client to use my application? or there is another way to attach my database with my application and compress it as one and send to each client and those just extract that file and use the application correctly?
-
1You should look at using LocalDB https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-2016-express-localdb – Alec. Mar 08 '18 at 11:07
-
You would need the SQL server engine, Management studio not needed. Or you can host and instance on a central server and have multiple databases on there. Then the client connects to their database via network. – King of the North Mar 08 '18 at 11:22
-
Possible duplicate of [LocalDB deployment on client PC](https://stackoverflow.com/questions/9655362/localdb-deployment-on-client-pc) – Sacha K Mar 08 '18 at 11:23
-
@Alec for LocalDB you still need to install a SQL Server engine. – CodeCaster Mar 08 '18 at 11:24
-
2At the risk of asking something totally obvious, I'm going to ask just to be certain - is your goal to have each client using their own copy of the data with none shared between them? – Kyle Burns Mar 08 '18 at 11:25
-
You have SQL Server Compact Edition which is just one or more assemblies. It doesn't support everything SQL Server supports. You also have LocalDB, which is a more lightweight SQL Server installation (but it has to be installed), and then you have the full blown SQL Server (which also has to be installed). Ideally you would've thought through the deployment scenario before you created your application. – Lasse V. Karlsen Mar 08 '18 at 11:29
2 Answers
On a real scenario, your database should be placed on a remote server and the clients should only access the database through your API (that will need to support authentication or any other identity based systems).
If your application only needs to store some local information (relevant only for your client app), then you can just use LocalDB or AppSettings, depending on your data structure.
Otherwise, if your application contains more complex features, then you will need an API and a remote DB managed only by you.
To conclude, you only need to setup Sql Server once, when you want to create the design of it (tables, columns, links). The clients will only have to connect to it and pull their data. And this task can be done without installing SqlServer. This link shows you that you only need System. Data assembly to connect to a Sql Server DB.

- 3,598
- 4
- 23
- 48
Yes you need to instal SQL server on each machine or if you go for LocalDB then also u need to instal SQL server engine ,and you have a better option u need to buy sqlserver from AZURE (it's free for one month try if want click here AZURE)

- 1,048,767
- 296
- 4,058
- 3,343

- 79
- 6