开发者

How to connect database over local area network SQL Server 2008

I want to connect my db on SQL Server 2008 over local area network I want to put it on one computer on the LAN so any computer on the network can acce开发者_运维技巧ss it what should I do please give me correct steps


In a Client-Server scenario, you will have the SQL Server installed on your server machine.

Clients will be the computers accessing that SQL Server using a client software (can be SQL Server Management Studio, web/forms application, Excel worksheet, etc).

Each of the client will provide you a way of making a connection to the SQL Server Instance running on the server. From server you will need IP Address or Servername along with SQL Server Instance name. They both combined form host name.

Data Source = ServerName\InstanceName
Note: Instance name not required for default instance.

User name: You need to add user from domain or a sql server authenticated user under security tab (SSMS) on the SQL Server.

Password: Corresponding password.

Note: Once you add a user to SQL Server Instance, do not forget to attach the user to databases you want the user to access and provide appropriate role(s).


  1. Install SQL Server 2008 on one machine on your LAN (let's call it SQLServer)
  2. Connect that machine to the LAN (network cable)
  3. You're done.

Now, all other computers can connect to that SQL Server machine by its name in the connection string - in .NET, that would look like:

server=SQLServer;database=YourDatabase;User ID=YourUser;Pwd=top$Secret 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜