Module com.microsoft.sqlserver.jdbc
Package com.microsoft.sqlserver.jdbc.dns

# Class DNSUtilities

java.lang.Object
com.microsoft.sqlserver.jdbc.dns.DNSUtilities

    public class DNSUtilities
    extends java.lang.Object

Provides utility functions for the DNS package

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`DNSUtilities()` |

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`static java.util.Set<DNSRecordSRV>` | `findSrvRecords​(java.lang.String dnsSrvRecordToFind)` | Finds all SRV Record using DNS.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DNSUtilities

public DNSUtilities()

## Method Details

### findSrvRecords

public static java.util.Set<DNSRecordSRV> findSrvRecords​(java.lang.String dnsSrvRecordToFind) throws javax.naming.NamingException
Finds all SRV Record using DNS.

Parameters:
  `dnsSrvRecordToFind` - the DNS record, for instance: _ldap._tcp.dc._msdcs.DOMAIN.COM to find all LDAP servers in DOMAIN.COM
Returns:
  the collection of records with facilities to find the best candidate
Throws:
  `javax.naming.NamingException` - if DNS is not available