Ashwin_DSA
Databricks Employee
Databricks Employee

Hi @cvh,

Fair point. The writing point was to prove that the permissions work, and it is not a precondition. 

Can you connect to SQL Server using the same login/user the gateway uses, and run these statements?

-- 1) Utility functions
SELECT dbo.lakeflowUtilityVersion_1_5() AS utility_version;
SELECT dbo.lakeflowDetectPlatform()     AS platform;

-- 2) DDL audit table access
SELECT TOP (1) * FROM dbo.lakeflowDdlAudit_1_5;

-- 3) CT enabled on this database
SELECT ctdb.*
FROM sys.change_tracking_databases ctdb
JOIN sys.databases db ON db.database_id = ctdb.database_id
WHERE db.name = DB_NAME();

-- 4) CT enabled on one of the failing tables
SELECT s.name AS schema_name, t.name AS table_name, ct.*
FROM sys.change_tracking_tables ct
JOIN sys.tables  t ON ct.object_id = t.object_id
JOIN sys.schemas s ON t.schema_id = s.schema_id
WHERE s.name = '<schema>' AND t.name = '<table>';

Do any of these fail with a permission error?

If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.

Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***