views:

189

answers:

3

Having a computer with multiple NICs, I need to specify somehow the one to use for the connection to SQL Server.

A: 

If the NIC's have diffrent subnets, windows should automatically route the request through the right NIC (running "route print" from the command line will show you what gets routed where)

pzycoman
+2  A: 

Following on from @pzycoman, SqlConnection (and SQL OLEDB/SQL Server ODBC) has no explicit connection string semantic to express the bound NIC other than to specify the destination server host address (which in turn triggers the route metrics discussion). Splitting out services or applications onto different subnets can work - but equally can also generate the utilization asymmetry similar what you see today.

Another potential option would be NIC teaming if your adapters support it. Teaming software bonds multiple NICs into a single logical channel for increased throughput with less NetOps complexity. This happens at a much lower level in the OSI and as such is transparent to your applications and services.

Teaming used to be frowned on for a number of reasons (predominantly NLB issues and driver quality), but those have been largely mitigated in the last couple of years.

As always engineering mentality will help - test everything.

stephbu
A: 

The windows networking stack will figure out which nic to use to reach your database server. If you use the netbios name of your sql server in the connection string you might want to replace it with the IP adress (or dns entry) in the subnet that your preferred nic is on.

thijs