Having a computer with multiple NICs, I need to specify somehow the one to use for the connection to SQL Server.
相关问题
- Faster loop: foreach vs some (performance of jsper
- Inheritance impossible in Windows Runtime Componen
- IPAddress.[Try]Parse parses 192.168 to 192.0.0.168
- how to get running process information in java?
- Why wrapping a function into a lambda potentially
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Bundling the Windows Mono runtime with an applicat
- Windows 8.1 How to fix this obsolete code?
- RMI Threads prevent JVM from exiting after main()
- DOM penalty of using html attributes
- Which is faster, pointer access or reference acces
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)
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.
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.