Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I installed my Windows Form Application developed by using C# 2.0 and SQL Server 2005 on two machines reside in same place. Will I have to install SQL Server 2005 on both machines???
If yes, then how the user can it.??? If not, then what I have to do??
Please suggest me good solution. Thanks
Posted
Comments
[no name] 14-Aug-13 14:12pm    
Well SQL Server has to be installed somewhere in order for your users to use your database. Either on their computer individually or a common server. Up to you.
nithibs 30-Aug-13 6:58am    
Well, the same above question arises for me also. if a client needs to install my exe on another machine how can he/she individually install the exe. Whether they also needs to install the sql server and should change the connection string??

NO!

That's the whole idea - SQL Server is a SERVER database - multiple users make requests to SQL Server, it coordinates them with the database file and serves up the results. If you install a second instance for your second PC, then it will use a different database file and you will not be able to share information between your users.

All you (probably) need to do is change the Connection String on one of the PCs to point at the other PC (unless you installed SQL server on a third PC in which case it should just work provided they are on the same LAN, and well done!)

Having said that, I have two installations of SQL Server: one for production and one on my PC for development. That way, If I perpetrate a cockup when altering the code it does not affect the production data in any way. That's because there is no data shared between the two SQL instances.
 
Share this answer
 
Comments
ridoy 14-Aug-13 16:07pm    
5ed!
When you wrote your code you should have a Connection String which is how you tell your code how to connect to SQL. So, no, you just need 1 SQL Server that both machines can access.
 
Share this answer
 
Comments
ridoy 14-Aug-13 16:09pm    
+4

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