Introduction

Enzo Server
  Installation
  Quick Start
  Core Features
    Async Calls
    ConnectionStrings
    Edge Cache
    HTTP Access
    Scheduling
    Views
  Advanced Capabilities
    Change Data Capture
  Administration
    Configuration Settings
    Logins & ACL
    Auditing
    Current Executions
    Linked Server
    SSL

  User Guides
     Sharding
     Sharding Overview

     SharePoint

   Adapters
    All Adapters
    Azure Bus
    Azure IoT Hub
    Azure Key Vault
    Azure Storage
    Couchbase
    CSV
    DB (RDBMS)
    Files
    Flight Aware
    FTP
    Geonames
    HttpEndpoint (REST)
    Insteon
    Loggly
    Messaging (SMS/SMTP)
    MongoDB
    Motus
    MSAD
    MSMQ
    Pipeline
    Pressero
    RabbitMQ
    SalesForce
    Shard
    SharePoint
    SQL Server
    Threading
    Twilio
    Twitter
    VellemanDMX
    Weather (Underground)
    Whiparound
    WMI
    Xls (Excel)
    ZIP


  SDK
    Overview
    Installation
    DevHost
    Create A Simple Adapter
    Handler Columns

    Advanced SDK Concepts
      Handler Decorators
      Dynamic Columns
      Table & Table Enumerators
      Virtual Tables

/adapters/sqlserver




SQLServer


The SQLServer adapter allows you to access the Change Tracking capabilities of SQL Server databases.


Configuration Settings



Name Description Default
Boolean _isDefault Make this the default configuration. Defaults to true if configName is already the default.
String connectionString Connection string to the destination database
String defaultDB Default database to connect to
String appName The application name
Boolean ssl True if the connection should be encrypted
Int32 retries Max connection and execution retries
Int32 defaultTimeout Default execution timeout for SQL commands 30

Handlers



GetChangeTrackingSetting Returns SQL Server Change Tracking database settings if enabled (returns nothing if not configured). details 

Arguments


SQL Call

EXEC SQLServer.GetChangeTracking


Http Call

/bsc/sqlserver/getchangetrackingsetting

Output Columns

Int32 database_id
Int32 is_auto_cleanup_on
Int32 retention_period
Int32 retention_period_units
String retention_period_units_desc
Int32 max_cleanup_version
GetChangeTrackingTables Returns list of tables that have a Primary Key (so that Change Tracking can be enabled) details 

Arguments


SQL Call

SELECT * FROM SQLServer.ChangeTrackingTables


Http Call

/bsc/sqlserver/getchangetrackingtables

Output Columns

String name
String trackingSet
GetFields Returns list of fields for a given table details 

Arguments

Name Description Default
tableName R The name of the SQL Server table

SQL Call

SELECT * FROM SQLServer.Fields WHERE table = 'table1'


Http Call

/bsc/sqlserver/getfields

Output Columns

String tableName
String name
String datatype
GetTable Executes a SELECT command on a table as specified by the table parameter details 

Arguments

Name Description Default
tableName The table name to execute the SELECT command against
_where An optional WHERE clause
_cols An optional list of columns *
_configName An optional definition other than the default for the current login
_execTimeout An optional timeout value that overrides the default setting 30

SQL Call

SELECT * FROM SQLServer.table@myTable1 WHERE ID=1


Http Call

/bsc/sqlserver/gettable

Output Columns

This call does not return data.

ListChangeTracking Lists the tables that currently have ChangeTracking enabled. details 

Arguments


SQL Call

EXEC SQLServer.startChangeTracking 'table1'


Http Call

/bsc/sqlserver/listchangetracking

Output Columns

String tableName
String object_id
String is_track_columns_updated_on
String min_valid_version
String begin_version
String cleanup_version
Run Execute an SQL statement against the database. details 

Arguments

Name Description Default
sql R The SQL statement to execute

SQL Call

EXEC SQLServer.Run 'SELECT * FROM mytable'


Http Call

/bsc/sqlserver/run

Output Columns

This call does not return data.

RunAsJson Execute an SQL statement against the database and returns a JSON document. details 

Arguments

Name Description Default
sql R The SQL statement to execute

SQL Call

EXEC SQLServer.RunAsJson 'SELECT * FROM mytable'


Http Call

/bsc/sqlserver/runasjson

Output Columns

String resultThe JSON document
SetChangeTrackingSetting Enable/Disable the SQL Server Change Tracking feature at the database level. details 

Arguments

Name Description Default
setting R 1 to enable change tracking; 0 to disable
retentionDays Number of days changes will be available for replication 7
autoCleanup Automatically deletes changes after the retention period has elapsed 1

SQL Call

EXEC SQLServer.SetChangeTracking 1
EXEC SQLServer.SetChangeTracking 0


Http Call

/bsc/sqlserver/setchangetrackingsetting

Output Columns

This call does not return data.

StartChangeTracking Starts Change Tracking on a specific SQL Server table. details 

Arguments

Name Description Default
tableName R The name of the table

SQL Call

EXEC SQLServer.startChangeTracking 'table1'


Http Call

/bsc/sqlserver/startchangetracking

Output Columns

This call does not return data.

StopChangeTracking Stops Change Tracking on a specific SQL Server table. details 

Arguments

Name Description Default
tableName R The name of the table

SQL Call

EXEC SQLServer.stopChangeTracking 'table1'


Http Call

/bsc/sqlserver/stopchangetracking

Output Columns

This call does not return data.

TableChanges Gets available changes on a specific table since the last sync id. details 

Arguments

Name Description Default
tableName R The name of the table
lastSyncId The last sync id retrieved 0
fireEvents When 1, fire change events of changes that were detected 0
failOnMissedEvents When 1, throws an exception if events were missed 0

SQL Call

SELECT * FROM SQLServer.TableChanges WHERE tableName = 'mytable' AND sinceId = 1


Http Call

/bsc/sqlserver/tablechanges

Output Columns

This call does not return data.

TableChangesWithData Gets available changes on a specific table since the last sync id including current record data. details 

Arguments

Name Description Default
tableName R The name of the table
lastSyncId The last sync id retrieved 0
changeType The type of changes to return (all, upsert, delete) all
fireEvents When 1, fire change events of changes that were detected 0
failOnMissedEvents When 1, throws an exception if events were missed 0

SQL Call

SELECT * FROM SQLServer.TableChangesWithData WHERE tableName = 'mytable' AND sinceId = 1


Http Call

/bsc/sqlserver/tablechangeswithdata

Output Columns

This call does not return data.