It is possible to connect to NetSuite ODBC interface from Linux. This article brings instructions specific for Red Hat Linux.
Requirements:
- ODBC driver - can be downloaded from links in SuiteArticle Alternative way of installing NetSuite ODBC on Linux
- Red Hat Linux system
- Create a user that will own the odbc driver (root privileges needed)
# useradd -d /home/netsuiteodbc netsuiteodbc
- Assign a password to the netsuiteodbc user
# passwd netsuiteodbc
- Copy the downloaded odbc driver files to netsuiteodbc home directory /home/netsuiteodbc as user netsuiteodbc home
- Log in to the Linux system as user netsuiteodbc
- Replace all paths beginning "/usr" with "/home/netsuiteodbc" in files:
- /home/netsuiteodbc/oaodbc60/odbc.ini
- /home/netsuiteodbc/oaodbc60/odbcinst.ini
- /home/netsuiteodbc/oaodbc60/oaodbc.sh
- In /home/netsuiteodbc/oaodbc60/odbc.ini change "Host" from "odbcserver.netsuite.com" to "odbcserver.na1.netsuite.com"
- Make the driver application executable
$ chmod 700 /home/netsuiteodbc/oaodbc60/tools/odbcisql
- Adjust environment with driver variables
$ source /home/netsuiteodbc/oaodbc60/oaodbc.sh
- Run the odbc application
$ /home/netsuiteodbc/oaodbc60/tools/odbcisql -m 0
- Connect to NetSuite (connection string is in form "email"*"password"@netsuite)
ISQL> connect "john.doe@gmail.com"*"mypassword"@netsuite
Example - connect to NetSuite:
source /home/netsuiteodbc/oaodbc60/oaodbc.sh/home/netsuiteodbc/oaodbc60/tools/odbcisql -m 0ISQL> connect "john.doe@gmail.com"*"mypassword"@netsuiteISQL> select count(*) from transaction_lines;COUNT(*)75011Rows selected = 1SQL: Operation successful.Elapsed time 903 ms.Elapsed time: Prepare 136 ms. Execute 185 ms. Fetch results 582 ms.ISQL>
No comments:
Post a Comment