05-07-2018 10:44 AM
I have a cRIO 9035 (NI Linux Real-Time x64 3.10.31-ltsi-rt29-2.10.0f0) with labview 2014 SP1 realtime. the application requires access to a Microsoft SQL Server. We had a similar system (cRIO 9035) deployed last year had the same requirement and we were able to get it access the SQL Server using unixODBC and FreeTDS. However, that system had problem at boot up that sometimes it boot into safe mode rater than loading the labview application. this time we started from scratch and had no problem booting up the system so we wanted to install the unixODBC and FreeTDS rather than using the image from previous system.
The drivers were installed and i was able to execute isql command and sql statements under SSH command line, using either the 'admin' or the 'lvuser" accounts (had to add the lvuser using the web interface and assign it to administrator group). however, the same command when called using "system exec.vi" in labview vi causes segmentation fault - the return code from the "system exec.vi" is 139:
“
/bin/sh: line 1: 1224 Done echo "select count(*) from _status"
1225 Segmentation fault (core dumped) | isql -b -v -x0x09 dbname username password
"
and, in the labview VI when i execute the command "which isql" it returns nothing and the return code was 1. however, the same command executed under SSH command line returned the path to the isql, which is under "/usr/local/bin".
I am confused about the different behavior of running the command in SSH and in labview VI, while both logged in as user "lvuser".
Any helps are greatly appreciated!
-Joe
p.s. i haven't tried it with newer labview version yet as our project requires labview 2014.
Solved! Go to Solution.
05-08-2018 01:01 PM
found the solution. apparently the freetds and unixodbc version makes the difference. in this case, an older version worked while the latest version caused the segmentation fault in lv2014 realtime.
-Joe