I'm trying to use the CONNECT engine in MariaDB to access NetSuite. I have the ODBC drivers installed and working with everything except MariaDB. Every time I try, I get this error:
ERROR 1296 (HY000): Got error 174 'SQLDriverConnect: [unixODBC][Driver Manager]Can't open lib '/opt/netsuite/odbcclient/lib64/ivoa27.so' : file not found' from CONNECT
I'm using MariaDB 10.11.2 on Ubuntu 22.04.2 LTS. I've checked that everything is 64-bit. I've done multiple purges and installs and restarts. I tried downgrading to MariaDB 10.6 (the version in the Ubuntu repository). Pyodbc and isql are connecting perfectly. It's only failing with MariaDB.
I've tried everything I can find and nothing is working. I'll dump everything relevant below. I'll take any suggestions at this point. It's still near the beginning of the project, so switching databases or even Linux distributions is still on the table. If anyone has successfully connected to NetSuite from a SQL database on Linux, please share.
Thanks.
ldd:
/opt/netsuite/odbcclient/lib64$ ldd ivoa27.so
linux-vdso.so.1 (0x00007fffb35a7000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb700afc000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb700af7000)
libicuuc.so.42 => /opt/netsuite/odbcclient/lib64/libicuuc.so.42 (0x00007fb700400000)
libicudata.so.42 => /opt/netsuite/odbcclient/lib64/libicudata.so.42 (0x00007fb6ff300000)
libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007fb700ae5000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb700ade000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb6ff0d6000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb6fefef000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb700abe000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb6fedc7000)
libaudit.so.1 => /lib/x86_64-linux-gnu/libaudit.so.1 (0x00007fb7006d2000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb700b0a000)
libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0 (0x00007fb700ab4000)
/etc/environment:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
LD_LIBRARY_PATH="/opt/netsuite/odbcclient/lib64"
ODBCINI="/opt/netsuite/odbcclient/odbc64.ini"
OASDK_ODBC_HOME="/opt/netsuite/odbcclient/lib64"
/etc/odbc.ini:
[ODBC Data Sources]
NetSuite=NetSuite ODBC Drivers 8.1
[NetSuite]
Driver=/opt/netsuite/odbcclient/lib64/ivoa27.so
Description=Connect to your NetSuite account
Host=3989691.connect.api.netsuite.com
Port=1708
ServerDataSource=NetSuite2.com
Encrypted=1
AllowSinglePacketLogout=1
Truststore=/opt/netsuite/odbcclient/cert/ca3.cer
CustomProperties=AccountID=3989691;RoleID=1015
[ODBC]
Trace=0
IANAAppCodePage=4
TraceFile=odbctrace.out
TraceDll=/opt/netsuite/odbcclient/lib64/ddtrc27.so
InstallDir=/opt/netsuite/odbcclient
/etc/odbcinst.ini:
[ODBC Drivers]
NetSuite ODBC Drivers 8.1=Installed
UsageCount=1
[NetSuite ODBC Drivers 8.1]
APILevel=1
ConnectFunctions=YYN
Driver=ivoa27.so
DriverODBCVer=03.52
FileUsage=0
SQLLevel=1
UsageCount=1
isql with results:
isql 'NetSuite' 'user' 'password'
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
A python test file:
import pyodbc
try:
connection = pyodbc.connect('DSN=NetSuite; UID=user; PWD=password')
except e:
print(e)
else:
print("Success!")
cursor = connection.cursor()
cursor.execute("[SQL statement]")
row = cursor.fetchone()
if row:
print(row)
Python results:
python3 test_ns.py
Success!
[SQL results]