ODCB error from Linux client

  • Hi Folks,

    When connecting to one of SQL Server 2022 servers , from a linux machine, there is this ODBC error . Strangely the same isql test is successful when I test against another SQL server 2022 server on a different server and also in the same VLAN. I can connect to both these servers well from my machine, and clients can also from their respective machines. I have to do this as part of onboarding in onto Zabbix monitoring on that Linux machine. Thank you in advance for your comments/advices to fix this.

    root@lupfigzabbix:/etc# isql -v SuccessDNS user1 pwd

    +---------------------------------------+

    | Connected! |

    | |

    | sql-statement |

    | help [tablename] |

    | quit |

    | |

    +---------------------------------------+

    SQL> quit

    root@lupfigzabbix:/etc# isql -v FailureDNS user2 pwd2

    [S1T00][unixODBC][Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired

    [08001][unixODBC][Microsoft][ODBC Driver 17 for SQL Server]MAX_PROVS: Error Locating Server/Instance Specified [xFFFFFFFF].

    [08001][unixODBC][Microsoft][ODBC Driver 17 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.

    [ISQL]ERROR: Could not SQLConnect

    Best Regards

    Arshad

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • firewall, wrong dns (do a ping on that box to see ip vs what you get on your pc), wrong instance name (is it a named instance? if so "\" needs to be escaped or using "/" - don't know which )

  • well dang. i found that SSC is scrubbing my posts if i paste the commands i previously used  in linux.

     

    i had a script in python that worked everywhere in windows, but reported an issue with the odbc provider. i had to install the ms odbc driver explicitly msodbcsql18

    my python script had a connection string like this:, and when it was used, it got the provider error:

    connection_string = ( "DRIVER={ODBC Driver 18 for SQL Server};" "SERVER=10.0.0.128;" "DATABASE=LinkedInLeads;" "UID=sql-lizaguirre;" "PWD=MyFakePasswordForTheInterwebs#312;" "TrustServerCertificate=Yes;" )

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • I'm also having the same problem

     

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply