Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
複数の IP を持つサーバーがあります。たとえば、デフォルトは 10.1.1.2 で、セカンダリは 192.168.1.2 です。
リモート SQL Server に接続する必要がありますが、192.168.1.2.
SqlClient 接続でローカル IP を設定するにはどうすればよいですか?
ありがとう!
プロパティで接続文字列を設定します。
Data Source=192.168.1.2;Initial Catalog=<databaseName>;uid=<userName>;pwd=<password>