mssql-change-tracking
TypeScript icon, indicating that this package has built-in type declarations

0.11.3 • Public • Published

MS SQL server change tracking functions

This node.js module written in Typescript and uses mssql under the hood to run the sql commands and provide high level functions to manage and work with MS SQL Change Tracking.

Docs

How to use

npm i mssql mssql-change-tracking

import { ctDbStatus } from "mssql-change-tracking";
import sql from "mssql";

const pool = new sql.ConnectionPool({
  server: "xxxx",
  user: "xxxx",
  password: "xxxx",
  database: "MY_DB_NAME",
});

await pool.connect();

const status = await ctDbStatus({ dbName: "MY_DB_NAME", pool });
console.log(status);

Note to begin

Before an application can obtain changes for the first time, the application must send a query to obtain the initial data and the synchronization version. The application must obtain the appropriate data directly from the table, and then use CHANGE_TRACKING_CURRENT_VERSION() to obtain the initial version. This version will be passed to CHANGETABLE(CHANGES ...) the first time that changes are obtained.

TODO

Package Sidebar

Install

npm i mssql-change-tracking

Weekly Downloads

2

Version

0.11.3

License

MIT

Unpacked Size

167 kB

Total Files

98

Last publish

Collaborators

  • saostad