اگر نام سرور SQL رو داری که کانکت شدن بهش با همون نام کفایت می کنه، اما اگر اصرار داری که با آی پی باشه با این کد می تونی نام سیستم (Hostname) رو تبدیل به آی پی کنی:
IPHostEntry hostEntry;
hostEntry= Dns.GetHostEntry(host);
//you might get more than one ip for a hostname since
//DNS supports more than one record
if (hostEntry.AddressList.Length > 0)
{
var ip = hostEntry.AddressList[0];
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
s.Connect(ip, 80);
}