Shahar
Shahar

Reputation: 655

Installations on client connecting to remote SQL server

I wrote a C# application that connects to a SQL server. I want to run this application on different computers (clients) in my network and make them connect to one central SQL server remotely.

I installed SQL Server 2008 only on the central computer, not on the clients.

The clients operating system will be Windows 7, 8 or Server 2012.

Should I need to install anything on the clients running my application in order to be able to connect to the SQL server? should I add DLLs to my application? or will it work naturally without problems?

Upvotes: 1

Views: 1550

Answers (3)

Mahesh
Mahesh

Reputation: 1

It's very simple:

  1. Install Sql server 2008 Mix Mode Not Install Only Windows Mode :- If you install mix mode they can ask for password

  2. After that use App.config file for using connection for Software to Database

  3. Connection String Use Intergrity Security= false; User Id="sa" Password="Enter Your Password"

Upvotes: 0

swandog
swandog

Reputation: 749

You will be able to connect fine without installing any additional dlls, just make sure that your connection string refers to the server that your SQL Server instance is on and uses the correct authentication method.

For SQL Server Authentication:

Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;

For Windows Authentication:

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;

For instructions on how to allow remote connections on the server, enable TCP/IP connections, and configure the firewall, you can find very good instructions here, http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx.

Upvotes: 1

You can connect naturally to your clients, you need just to check some basic network things like firewalls,etc. And make sure that your sql server is configured to accept remote connetions check this link to see how to do this

http://support.microsoft.com/kb/914277#method2

if you have some doubt about how to write the connection string to connect to your server, you can use this site to help you:

http://www.developerfusion.com/tools/sql-connection-string/

Upvotes: 2

Related Questions