NetSuite SuiteAnalytics Connect ODBC and JDBC Connection String Generator
This generator builds the connection settings for NetSuite SuiteAnalytics Connect on the NetSuite2.com data source: a JDBC URL with a Java test, Windows DSN fields, ODBC connection strings for Excel and Power BI, a Linux odbc64.ini stanza and test SQL. Everything uses port 1708 and the values from your Driver Download page.
Fill in
Copy it from Your Configuration on the SuiteAnalytics Connect Driver Download page.
As shown under Your Configuration, for example 1234567 or 1234567_SB1.
3 is Administrator. Prefer a dedicated read-only role with the SuiteAnalytics Connect permission.
Copy the exact name from the Drivers tab of the ODBC Administrator; 32-bit and 64-bit names differ.
1. JDBC URL and Java test
jdbc:ns://1234567.connect.api.netsuite.com:1708;ServerDataSource=NetSuite2.com;Encrypted=1;NegotiateSSLClose=false;CustomProperties=(AccountID=1234567;RoleID=3)
Driver class: com.netsuite.jdbc.openaccess.OpenAccessDriver (file NQjc.jar on the classpath)
User: your NetSuite login email Password: your NetSuite password
// Minimal Java connection test
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
public class ConnectTest {
public static void main(String[] args) throws Exception {
Class.forName("com.netsuite.jdbc.openaccess.OpenAccessDriver");
String url = "jdbc:ns://1234567.connect.api.netsuite.com:1708;ServerDataSource=NetSuite2.com;Encrypted=1;"
+ "NegotiateSSLClose=false;CustomProperties=(AccountID=1234567;RoleID=3)";
try (Connection c = DriverManager.getConnection(url, System.getenv("NS_USER"), System.getenv("NS_PASSWORD"));
ResultSet rs = c.createStatement().executeQuery("SELECT id, tranid FROM transaction WHERE ROWNUM <= 10")) {
while (rs.next()) {
System.out.println(rs.getString(1) + " " + rs.getString(2));
}
}
}
}2. Windows ODBC DSN, connection strings and Excel
Windows: ODBC Data Source Administrator (64-bit) > System DSN > NetSuite DSN > Configure > General tab Name: NetSuite Account ID: 1234567 Role ID: 3 Service Host: 1234567.connect.api.netsuite.com Service Port: 1708 Service Data Source: NetSuite2.com (pick with Browse) Then click Test Connect and sign in with your NetSuite email and password. DSN connection string (Excel, Power BI, scripts): DSN=NetSuite;UID=<netsuite login email>;PWD=<password> DSN-less connection string (Windows): DRIVER=NetSuite Drivers 64bit;Host=1234567.connect.api.netsuite.com;Port=1708;Encrypted=1;AllowSinglePacketLogout=1;Truststore=system;SDSN=NetSuite2.com;UID=<netsuite login email>;PWD=<password>;CustomProperties=AccountID=1234567;RoleID=3 Excel: Data > Get Data > From Other Sources > From ODBC > choose NetSuite > enter credentials > pick tables in the Navigator, or open Advanced options and paste a SQL statement.
3. Linux odbc64.ini stanza
# /opt/netsuite/odbcclient/odbc64.ini (use odbc.ini for the 32-bit driver) [ODBC Data Sources] NetSuite=NetSuite ODBC Drivers [NetSuite] Driver=/opt/netsuite/odbcclient/lib64/ivoa27.so Description=NetSuite2.com via SuiteAnalytics Connect Host=1234567.connect.api.netsuite.com Port=1708 ServerDataSource=NetSuite2.com Encrypted=1 AllowSinglePacketLogout=1 TrustStore=/opt/netsuite/odbcclient/cert/ca4.cer CustomProperties=AccountID=1234567;RoleID=3
4. Test queries
-- NetSuite2.com test queries SELECT id, tranid FROM transaction WHERE ROWNUM <= 10 SELECT id, tranid, trandate, type FROM transaction WHERE type = 'SalesOrd' AND trandate >= ADD_MONTHS(SYSDATE, -1)
Take Service Host, Account ID and Role ID from the SuiteAnalytics Connect Driver Download page (Settings portlet > Set Up SuiteAnalytics Connect), not from the browser URL. Remove any ciphersuites parameter from old JDBC URLs, and keep NegotiateSSLClose=false. Use NetSuite2.com: Oracle has retired the older NetSuite.com data source. On Linux, check the certificate file name in /opt/netsuite/odbcclient/cert for your driver version and set TrustStore to it. Token login is possible through the OAuth2Token attribute inside CustomProperties; check Oracle's OAuth 2.0 for Connect topic for the token format.
Connect still failing?
Send us the redacted connection settings and error text and we will tell you which setting or permission is blocking it.
Optional. The tool and every export work without this. No spam.
How to use it
Enable the SuiteAnalytics Connect feature (Setup > Company > Enable Features > Analytics) and give the role you will connect with the SuiteAnalytics Connect permission. Log in with that role, open the Settings portlet on the home dashboard and click Set Up SuiteAnalytics Connect. That Driver Download page lists the drivers and, under Your Configuration, the Service Host, Service Port, Service Data Source, Account ID and Role ID. Paste those values here and copy the block that matches your tool: JDBC for DBeaver, Java or Spark, Windows ODBC for Excel and Power BI, Linux for servers.
- Use a dedicated integration user and role, not a person's administrator login.
- The user logs in with email and password; the role ID selects which data is visible.
- Install the driver bitness that matches the client: 64-bit Excel needs the 64-bit driver.
Where each setting comes from
The JDBC URL follows Oracle's documented form: jdbc:ns://<ServiceHost>:1708 with ServerDataSource=NetSuite2.com, Encrypted=1, NegotiateSSLClose=false and CustomProperties=(AccountID=...;RoleID=...). Optional attributes such as OAuth2Token also go inside CustomProperties. The Windows DSN dialog asks for Account ID, Role ID, Service Host, Service Port and Service Data Source. The Linux file uses Host, Port, ServerDataSource, Encrypted, AllowSinglePacketLogout=1, TrustStore and CustomProperties, and DSN-less ODBC strings use SDSN for the data source. Property names are not case sensitive, but values such as NetSuite2.com must match exactly.
Version differences and gotchas
NetSuite.com, the old data source, has been retired, so any DSN or report still pointing at it fails; NetSuite2.com uses the same record and field names as SuiteQL and the Records Catalog. Older JDBC URLs often carried a ciphersuites parameter, which now blocks the connection. Oracle's documented ODBC settings include AllowSinglePacketLogout=1, so keep it in DSN-less strings and odbc64.ini. Sandbox accounts have their own service host and account ID with an _SB suffix. Connect respects role permissions, so a missing table usually means the role cannot see that record type, not a driver fault. Large extracts are better here than over SuiteQL REST, which stops at 100,000 rows.
Checking the connection
Click Test Connect in the Windows dialog, or run the Java class or a tool like DBeaver with the JDBC URL. Then run SELECT id, tranid FROM transaction WHERE ROWNUM <= 10, which should return ten rows quickly. If the login fails, check that the user has the role, the role has the SuiteAnalytics Connect permission, and the account ID matches the host. If it hangs, check that outbound TCP 1708 is open on the firewall or proxy, since Connect does not use 443. Timeouts on long queries call for narrower date ranges and only the columns needed.
Frequently Asked Questions
What is the NetSuite ODBC connection string?
With a DSN: DSN=NetSuite;UID=<email>;PWD=<password>. Without one: DRIVER=<driver name>;Host=<service host>;Port=1708;Encrypted=1;AllowSinglePacketLogout=1;Truststore=system;SDSN=NetSuite2.com;UID=...;PWD=...;CustomProperties=AccountID=<id>;RoleID=<role>. Take the host, account and role from the Driver Download page, and copy the exact driver name from the Drivers tab of the ODBC Administrator, since 32-bit and 64-bit names differ.
What port does NetSuite ODBC use?
SuiteAnalytics Connect uses TCP port 1708 for ODBC, JDBC and ADO.NET, on the host <account>.connect.api.netsuite.com shown on your Driver Download page. The connection is encrypted, so Encrypted=1 is required. Make sure the firewall allows outbound 1708, which corporate networks often block by default.
Where do I download the NetSuite JDBC or ODBC driver?
In NetSuite, open the Settings portlet on the home page and click Set Up SuiteAnalytics Connect. The SuiteAnalytics Connect Driver Download page offers ODBC for Windows and Linux, JDBC (NQjc.jar) and ADO.NET, and shows your configuration values. The role needs the SuiteAnalytics Connect permission to see the page.
How do I connect NetSuite to Excel?
Install the 64-bit ODBC driver if your Excel is 64-bit, create a DSN with your service host, account ID, role ID and NetSuite2.com, then in Excel go to Data > Get Data > From Other Sources > From ODBC, pick the DSN and sign in with your NetSuite email and password. Use Advanced options to send a SQL query.
If you want to ask NetSuite data questions in plain English with the SQL shown, running against Connect on your own servers, we can set that up.
Related Tools
NetSuite REST API SuiteQL Request Generator
Turn a SuiteQL statement into a ready POST to the REST query/v1/suiteql endpoint, plus curl and a Python script that pages through every result.
Developer ToolsNetSuite OAuth 2.0 Client Credentials (M2M) JWT Code Generator
Generate the openssl commands, the signed JWT client assertion and the token request for NetSuite machine-to-machine OAuth 2.0, in Python and Node.js.
NetSuiteSuiteQL Query Generator
Fill in a table, columns, filter and sort and get a SuiteQL statement ready for the N/query module, the REST SuiteQL endpoint or the SuiteAnalytics Workbook.
NetSuiteNetSuite Role Permission Matrix Worksheet
An editable worksheet that records which role holds which permission level on each record area and scores the access risk for review.
More NetSuite tools
See all- NetSuite Saved Search Formula Generator
- NetSuite CSV Import Template Guide
- NetSuite Inventory Costing Method Reference
- NetSuite Month End Close Checklist
- NetSuite License Cost Estimator
- NetSuite User Access Request Form Template
- NetSuite Custom Record Design Spec Template
- NetSuite SuiteScript Deployment Handover Template
- NetSuite Sandbox and Release Change Log Worksheet
Keep exploring
Free tools
- NetSuite SuiteAnalytics Connect ODBC Setup and Troubleshooting ChecklistCheck licensing, role permissions, driver bitness, DSN settings and the usual failure points when connecting Excel, Power BI or a warehouse to NetSuite over ODBC or JDBC.
- SuiteQL Query GeneratorFill in a table, columns, filter and sort and get a SuiteQL statement ready for the N/query module, the REST SuiteQL endpoint or the SuiteAnalytics Workbook.
- NetSuite SuiteQL Custom List and Custom Record Query GeneratorEnter a custom list or custom record script ID and its fields to get SuiteQL for its values, its records, a join from transactions, and a ready REST call.