- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 12-23-2020 07:37 AM
(1912 views)
We have got a situation where we have to enter DSN for an SQL database which uses dynamic ports. I tried specifying the range of ports using hyphen character like shown below but it gave an error. Can someone help me how we can specify range of ports inside odbc.ini?
Example: Port=1024-2048
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What driver are you using? UNIX ODBC or Microsoft ODBC? Connecting to a dynamic port is supported only by Microsoft ODBC driver version 17.4 and higher, please see https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/connection-string-keywords-and-data-sour... and contact Microsoft if needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
We are using unixODBC - FreeTDS. Thank you. This helps understand the situation. Are you aware of any workaround for this situation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
No, I'm not aware of any workarounds other than using Microsoft ODBC driver.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Per FreeTDS documentation, you should use the instance name in the config.
http://www.freetds.org/userguide/freetdsconf.html#tab.freetds.conf