0

I am preparing for a SQL Server database migration. I would like to use the alias functionality from the SQL Server Native Client, configured with cliconfg.exe, to redirect my client applications to the new server. I am using this in conjunction with DNS aliases so I can redirect the connection to a new port. However, my applications use MSSQL JDBC instead of the native client.

Does MSSQL JDBC use the alias settings from the native client? Is it, by chance, a wrapper over the native client functionality? Both are provided by Microsoft. If not, does MSSQL JDBC have an equivalent client-hosted server name redirect functionality? How is this configured?

I did some preliminary testing with the native client settings and it seems like the JDBC driver does not utilize the alias. However, the naming schemes are a bit different between the two so I may not have had the names correct. I am referring to jdbc:sqlserver://servername:port compared to servername,port in the alias tool.

CElliott
  • 442
  • 2
  • 8
  • JDBC is cross-platform whereas native client (and aliases) are Windows only. I doubt Microsoft would implement a platform-specific feature in their JDBC driver. – Dan Guzman Dec 13 '22 at 15:18
  • Considering that the native client is defunct now (it doesn't even ship with SQL Server 2022, per [Support Policies for SQL Server Native Client](https://learn.microsoft.com/en-us/sql/relational-databases/native-client/applications/support-policies-for-sql-server-native-client?source=recommendations&view=sql-server-ver16)), looking at tools on an obsolete driver is a little pointless anyway. Microsoft recommends OLEDB or ODBC. – Thom A Dec 13 '22 at 15:20
  • @Larnu - The settings are not obsolete. I just tested and the MSOLEDBSQL linked server provider utilizes the Native Client aliases. SSMS and SQL Server utilize these settings. It is not limited to the legacy Native Client driver. I worked with MS Support this year to configure a relatively new replication feature and aliases were a core component of the fix. – CElliott Dec 13 '22 at 15:58

1 Answers1

0

I asked the mssql-jdbc team and at this time (Dec 2022) the driver does not support aliases.

CElliott
  • 442
  • 2
  • 8