Is there any way to get MSSQL latest changed row b...
# replication-ask-ai
p
Is there any way to get MSSQL latest changed row by using timestamp binary? Failure reason: The following tables have invalid columns selected as cursor, please select a column with a well-defined ordering with no null values as a cursor. {tableName='dbo.tables', cursorColumnName='table_timestamp', cursorSqlType=BINARY, cause=Unsupported cursor type}
k
Based on the information provided in the extracts, it seems like you're trying to use a binary column as a cursor for incremental data syncing in MSSQL. However, according to the [Postgres troubleshooting guide](https://docs.airbyte.com/integrations/sources/postgres/postgres-troubleshooting), the supported cursor types do not include binary. Here are the supported cursor types: -
TIMESTAMP
-
TIMESTAMP_WITH_TIMEZONE
-
TIME
-
TIME_WITH_TIMEZONE
-
DATE
-
BIT
-
BOOLEAN
-
TINYINT/SMALLINT
-
INTEGER
-
BIGINT
-
FLOAT/DOUBLE
-
REAL
-
NUMERIC/DECIMAL
-
CHAR/NCHAR/NVARCHAR/VARCHAR/LONGVARCHAR
Although this information is from the Postgres guide, it's likely that similar limitations apply to MSSQL as well. If you want to capture the latest changes in your MSSQL database, you might want to consider using Change Data Capture (CDC). CDC can capture row-level
INSERT
,
UPDATE
, and
DELETE
operations on CDC-enabled tables. You can find more information about setting up CDC for MSSQL in the [MSSQL source documentation](https://docs.airbyte.com/integrations/sources/mssql#setting-up-cdc-for-mssql). If your table has a primary key but doesn't have a reasonable cursor field for incremental syncing (i.e.
updated_at
), CDC allows you to sync your table incrementally. Please note that enabling CDC requires at least db_owner permissions on the database(s) you intend to sync from.