Skip to content

Commit

Permalink
Get the correct change tracking information in azure (#41)
Browse files Browse the repository at this point in the history
Co-authored-by: kamd <[email protected]>
  • Loading branch information
cosimon and kamd authored Sep 4, 2020
1 parent 81cce9b commit c35d10b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tap_mssql/sync_strategies/logical.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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*))

Expand Down

0 comments on commit c35d10b

Please sign in to comment.