Package com.microsoft.sqlserver.jdbc.dns

# Class DNSUtilities

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

public class DNSUtilities extends Object
Provides utility functions for the DNS package

## Constructor Summary

Constructors
Constructor
Description
`DNSUtilities()`

## Method Summary

Modifier and Type
Method
Description
`static Set<DNSRecordSRV>`
`findSrvRecords​(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 Set<DNSRecordSRV> findSrvRecords​(String dnsSrvRecordToFind) throws 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:
  `NamingException` - if DNS is not available