Raspberry pi to MSSQL server (python)

snakedoctor

Well-known member
  • Dec 9, 2017
    605
    465
    63
    බොක්කලා, රාස්ප්බෙරි පායි එකක් තියෙනෝ MSSQL එකකට කොනෙක්ට් කරගන්න මම පොඩි පයිතන් කෝඩ් එකක් ලිව්වා, ඒක වින්ඩෝස් වල රන් වෙනවා අවුලක් නැතුව, ඒත් ඒක රාස්ප්බෙරි පායි එකට දැම්මම එරර් එකක් එනවා

    "error connection to the database 08s01 freetds"
    "adaptive server does not exist or access denied"

    වගේ කියලා.... රාස්ප්බෙරි පායී එකක් එක්ක මේ වගේ වැඩක් කරගත්ත එකෙක් නැද්ද... මේකේ...
     

    NEMISIS

    Well-known member
  • Nov 13, 2013
    11,349
    19,445
    113
    Colombo
    MSSQL එක කොහෙද රන් වෙන්නෙ

    PI එකකට SSH කරලා ඒකෙන් මොනවා හරි command line MSSQL Client එකක් දාල කමාන්ඩ් ලයින් එකෙන් MSSQL එකට කනෙක්ට් වෙන්න පුලුවන්ද කියලා බැලුවද
    මම වැඩිය MS SQL එක්ක වැඩ කරලා නැහැ නමුත් මම දන්න විදියට Microspft එකෙන්ම දෙන මොකක් හරි command line tool එකක් තියනවා MSSQL වලට ලිනක්ස් වල ඉඳලා කනෙක්ට් වෙන්න



    මට පේන විදියට PI එකේ ඉඳන් MSSQL වලට කනෙක්ට් වෙන්න බැහැ වගේ

    my suggestion,
    Try to connect to the MSSQL Server from R PI, by using a command line tool (or some GUI tool if you have monitor connected)
    If that works, then check if the required libraries and supporting tools are installed on RPI


    PS : Did a quick google based on given errors,

    It seems there are two database(For MSSQL) driver options for linux,
    Microsoft ODBC Driver and FreeTDS, and people has reported the same error when using FreeTDS driver, but not with Microsoft ODBC driver, if you are using FreeTDS then you can try switching to Microsoft ODBC Driver.

    Second error is also seems to be related to the FreeTDS Driver.
     
    Last edited:
    • Like
    Reactions: tharuka17

    snakedoctor

    Well-known member
  • Dec 9, 2017
    605
    465
    63
    Mysql da mssql da

    Kohoma unath privilege haiyata UBA log wena userta set wela na wage
    MSSQL

    MSSQL එක කොහෙද රන් වෙන්නෙ

    PI එකකට SSH කරලා ඒකෙන් මොනවා හරි command line MSSQL Client එකක් දාල කමාන්ඩ් ලයින් එකෙන් MSSQL එකට කනෙක්ට් වෙන්න පුලුවන්ද කියලා බැලුවද
    මම වැඩිය MS SQL එක්ක වැඩ කරලා නැහැ නමුත් මම දන්න විදියට Microspft එකෙන්ම දෙන මොකක් හරි command line tool එකක් තියනවා MSSQL වලට ලිනක්ස් වල ඉඳලා කනෙක්ට් වෙන්න



    මට පේන විදියට PI එකේ ඉඳන් MSSQL වලට කනෙක්ට් වෙන්න බැහැ වගේ

    my suggestion,
    Try to connect to the MSSQL Server from R PI, by using a command line tool (or some GUI tool if you have monitor connected)
    If that works, then check if the required libraries and supporting tools are installed on RPI


    PS : Did a quick google based on given errors,

    It seems there are two database(For MSSQL) driver options for linux,
    Microsoft ODBC Driver and FreeTDS, and people has reported the same error when using FreeTDS driver, but not with Microsoft ODBC driver, if you are using FreeTDS then you can try switching to Microsoft ODBC Driver.

    Second error is also seems to be related to the FreeTDS Driver.
    i can ping the sql server ip from the RPI, and the server is allowed to remote loggings. I hope need to try Ms. ODBC.
    ------ Post added on Dec 20, 2023 at 7:47 PM
     
    Last edited:

    NEMISIS

    Well-known member
  • Nov 13, 2013
    11,349
    19,445
    113
    Colombo
    MSSQL


    i can ping the sql server ip from the RPI, and the server is allowed to remote loggings. I hope need to try Ms. ODBC.
    ------ Post added on Dec 20, 2023 at 7:47 PM
    ping doesn't mean that the SQL connection works or not neh
    You might be able to connect using other computers or windows box, but to debug your issue, you need to check the SQL Connection from the R PI itself.
    I also think that your issue is related to the db driver, easiest way to debug that is trying to connect using some standard command line tool
     
    Last edited:
    • Like
    Reactions: snakedoctor