From c35d10b955d6b83df48c476a502f3eb08b419624 Mon Sep 17 00:00:00 2001 From: Collin Simon Date: Fri, 4 Sep 2020 14:48:02 -0400 Subject: [PATCH] Get the correct change tracking information in azure (#41) Co-authored-by: kamd --- src/tap_mssql/sync_strategies/logical.clj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tap_mssql/sync_strategies/logical.clj b/src/tap_mssql/sync_strategies/logical.clj index 6ea8390..d00b0b4 100644 --- a/src/tap_mssql/sync_strategies/logical.clj +++ b/src/tap_mssql/sync_strategies/logical.clj @@ -30,8 +30,10 @@ (defn get-change-tracking-databases* [conf] (set (map #(:db_name %) (jdbc/query (config/->conn-map conf) - [(str "SELECT DB_NAME(database_id) AS db_name " - "FROM sys.change_tracking_databases")])))) + [(str "SELECT DB.name AS db_name " + "FROM sys.change_tracking_databases CTDB " + "INNER JOIN sys.databases DB " + "ON CTDB.database_id=DB.database_id")])))) (def get-change-tracking-databases (memoize get-change-tracking-databases*))