Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I've C# app with sql server ,that I want to deploy.

-First of all, how can I add my local database to my project?
- How to deploy it ?
Posted

1 solution

You should not include SQL Server in your installation. There are a couple of reasons:
0) You can only distribute SQL Server Express for copyright reasons - not SQL Server full version.
1) They may already have SQL Server installed on the network. If so, then they will presumably want to use that version.
2) If they do have SQL server installed and you start proliferating SQL server Express instances, you are going to annoy the heck out of the database administrator...
3) A single site installation of SQl Server is a lot more likely to be backed up than a number of scattered version under user control.
4) Sql server is quite complex for a "normal" user to install and administer - it is not a good idea!
5) It will destroy the primary advantage of using Sql Server over SqlCE or SQLite - multiuser access. If everyone installs their own copy of SQL server, then you will have multiple copies of your database, each used by a single person. This will cause some confusion, and (depending on how you wrote the original database) may take some considerable effort to combine into a single instance when the problem is realized.
 
Share this answer
 
Comments
Member 8584763 20-Dec-12 5:38am    
Ok, suppose that I did the setup to my app, then on client PC ,I should install sql server, if it's not exist? and do I need to install sql server management?
OriginalGriff 20-Dec-12 5:51am    
No! If they want Sql Server, they they must install it - again it is thier choice which machine to install it, and which version to install.
SSMS is installed as part of the SQL server installation.
Member 8584763 20-Dec-12 5:55am    
The app can't run without it. How come it's their choice?
OriginalGriff 20-Dec-12 6:05am    
SQL server is not a trivial object - it has to be installed correctly, configured and maintained. It also has to be backed up if the customer has any sense. Unless your application is running as a single user database, the choice of which machine it should run on is very important - if you choose a machine and install it, what guarantee is there that the machine will be powered on when your customer(s) need to use it? That it will have sufficient spare capacity to run MsSql under the load of all the users? That its network connection is sufficient to support them all? If they already have a full (and expensive) copy of SQL server installed on the network, do you think they will be pleased that you install another Express version? What if two users instal your app? Should you add another version of SQL server? What happens if they both update their own copies? They can't see each others data!

And if you are running SQl server as a single user database, then your application needs some serious rethinking because there are much, much smaller footprint databases out there for single user use!
Member 8584763 20-Dec-12 6:18am    
Actually, it's a single user database, and I was planning to install sql server and sql server management on the client PC. After that, I'll install my app, but the problem what if the sql server didn't run. what other database I should use? I heard of Sqlserver compact?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900