Native ODBC driver for SQL Server and Sybase ASE for Node.js and Electron. Current stable version is 5.2.0, requires Node >=18. Ships prebuilt binaries for Linux (x64, glibc 2.28+, musl), macOS (x64, arm64), and Windows (x64, ia32). Provides high-performance bulk insert (130k+ rows/s), BCP, TVP, streaming, Always Encrypted, stored procedures, prepared statements, connection pooling, and Windows integrated auth. Requires Microsoft ODBC Driver 17 or 18 installed on the host. Differs from tedious (pure JS) and mssql (wrapper) by being a native add-on with superior throughput for bulk operations.
npm install msnodesqlv8No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to SQL Server using ODBC Driver 18, runs a query to fetch server version, and prints it.
Upgrade to Node 18 or later. If stuck on older Node, pin to msnodesqlv8@4.x.
Use sql.promises.open() and conn.promises.query() instead of sql.open()/conn.query() with callbacks.
Switch to sql.promises.open() and conn.promises.query().
Install Microsoft ODBC Driver 17 or 18 from Microsoft repos and ensure unixODBC is present.
Use ODBC Driver 18 for BCP. Set table.setUseBcp(true) before insert.
Install the Microsoft ODBC Driver for SQL Server and verify it's listed in odbcinst -j.
Reinstall: npm rebuild msnodesqlv8. Ensure Node version >=18 and build tools (Python, C++ compiler) are available.
Ensure you await sql.promises.open() and do not call conn.promises.query() after conn.promises.close().