viva-server-mssql is a library for working with Microsoft SQL Server, providing a class-based API for connection management, query execution, transaction handling, and data manipulation (e.g., clone_table). The current stable version is 3.1.1, released primarily for Node.js environments. It uses the 'mssql' package as a peer dependency and supports both callback-based and promise-based patterns. Key differentiators include built-in action scheduling, timezone offset handling, and performance monitoring. The library is designed for server-side applications requiring direct MSSQL interaction with fine-grained control over connections and execution options.
npm install viva-server-mssqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Server_mssql instance, connects to MSSQL, executes a simple query, and logs the result.
Use import syntax or dynamic import(). Alternatively, downgrade to v2.x for CommonJS support.
Call new Server_mssql() without arguments, then call .init(config).
For promise usage, omit the callback and await the result: const result = await server.exec('SELECT 1').Update mssql to version 8.x in your project dependencies.
Always validate config before .init() and handle error in callback.
Check changelog and pin version for stable use.
Change require('viva-server-mssql') to import { Server_mssql } from 'viva-server-mssql'.Ensure init completes before exec: await server.init(config); then await server.exec(...);
Check hostname, port, and network connectivity. Ensure SQL Server is running and accepts remote connections.
Upgrade to v3 and use exec(); check migration guide for renamed methods.