SQL Server integration
Your SQL Server database from a flow. The action reads and writes rows with forms, calls stored procedures and runs your own SQL. It can also be an AI toolkit that lets an AI Node touch only the tables you list. As a trigger it starts a flow for each new, changed or deleted row. It works with SQL Server 2017 or later, Azure SQL Database, Azure SQL Managed Instance and Amazon RDS for SQL Server, with a SQL login or with Microsoft Entra.
Setup
1. Create the credential
Under Settings → Credentials, or straight from the node, pick the SQL Server credential type, name it, and fill in:
- Host and Port (1433 if you leave it empty). Your server's address, e.g.
myserver.database.windows.netormydb.abc123.us-east-1.rds.amazonaws.com. Through a tunnel it islocalhost. The public endpoint of an Azure SQL Managed Instance uses port3342. - Database. Required for
*.database.windows.netthat isn't a Managed Instance: Azure SQL Database has noUSE, so a connection is to one database. On the other servers it is optional, and each node and trigger can pick its own. - Authentication: SQL login (a user and password of the server) or Microsoft Entra service principal (an app in your tenant, Azure SQL only). See Microsoft Entra.
- User and Password, with a SQL login. The password is encrypted, and it comes back to the panel only in
Edit keys and settings, after you verify it's you, and only for a person who can see it. - TLS and the CA certificate: see below.
- Tunnel (optional): for a server HostWebhook can't reach over the internet.
Or paste a connection string. What the Azure portal gives you, e.g. Server=tcp:myserver.database.windows.net,1433;Initial Catalog=shop;User ID=…;Password=…;Encrypt=True; fills the fields. HostWebhook reads it itself: only the server and the port, the database, the user, the password, Encrypt and TrustServerCertificate count, and TrustServerCertificate=True is refused (it would accept any certificate). Any other key is refused by name, because HostWebhook never lets a connection string choose how the driver behaves. Authentication is refused too: choose Microsoft Entra in the field instead.
Named instances
A host written as SERVER\INSTANCE is refused with “Named instances aren't supported yet. Give the instance a fixed TCP port and use it here, e.g. 1433.” A named instance listens on a port; give it a fixed TCP port (in SQL Server Configuration Manager) and use host:port.
TLS and the CA certificate
The connection is always encrypted. There is no Off mode: the login is never sent in the clear.
| Mode | What it does |
|---|---|
| Strict | Encrypted before anything else (TDS 8.0), and the certificate is checked. Azure SQL, SQL Server 2022 or later on Windows, and SQL Server 2025 on Linux. SQL Server 2022 on Linux doesn't take it: it closes the connection with error 17821. |
| Required | Encrypted, and the certificate is checked. The default. e.g. Azure SQL, RDS. |
- CA certificate: paste the PEM your server uses, as text (never a path), e.g. your company CA. Empty means the usual public roots, which is what Azure SQL uses.
- Amazon RDS: a shortcut in the same field. RDS certificates come from a CA that isn't in the public roots, and HostWebhook already carries the AWS bundle. On RDS,
rds.force_sslis a static parameter: the instance needs a restart to apply it. - A server with a self-signed certificate (the usual for your own SQL Server): paste its CA. HostWebhook always checks the certificate, also through a tunnel: there is no mode that accepts any. If the check fails you see “The certificate couldn't be checked. Paste your server's CA, or connect through a HostWebhook tunnel.”
- A credential saved before with Required, no check isn't deleted: its card says Required, no check (not accepted any more), and a Test or a run says what to do. Change it to Required with the CA in Edit keys and settings.
- With Microsoft Entra only Strict or Required work, with the public roots.
Where HostWebhook connects from
HostWebhook only connects to public hosts. It looks up the name, checks the address it got and connects to that same address, so a name can't answer one thing for the check and another for the connection. A name that resolves to a private address, a loopback address (localhost, 127.0.0.1) or a metadata address is refused when you save the credential and every time it connects. If your server filters by IP — the Azure SQL firewall, the security group of an RDS instance, the NSG of a Managed Instance — allow HostWebhook's static egress IP, which you find in the banner when you create a database credential.
- Azure SQL Database answers on
myserver.database.windows.net:1433. Its connection policy decides how a client reaches a node: with Proxy everything goes through 1433. With Redirect the gateway sends the client to another node on a port between 11000 and 11999. HostWebhook follows that redirect only to another Azure SQL address, once, never through a tunnel; any other redirect is refused before a connection is made. - Azure SQL Managed Instance: turn on its public endpoint and open port 3342 in its network security group. The host looks like
mi.public.<zone>.database.windows.net. A Managed Instance that only has a private address in your virtual network is reached with a tunnel. - Amazon RDS for SQL Server: the endpoint of the instance on 1433, and a security group that lets HostWebhook's egress IP in.
- Your own server (a VM, Docker):
host:1433, or the fixed port of the instance. A SQL login needs the server in mixed mode: if it only accepts Windows authentication, change it and restart the service.
For a server on a homelab, a virtual network or a Mac on your desk, run hostwh expose-tcp --target=localhost:1433 --id=prod-sqlserver (or the Docker agent ghcr.io/hostwebhook/agent) on a machine that can reach the server. Check in Settings → Tunnels that it shows online, and pick it in the Tunnel field of the credential. The steps are in Reverse tunnel for databases. With a tunnel the destination is your own network, so HostWebhook doesn't check the address; the host is then the one you type, e.g. localhost. The certificate is still checked, against that host: pick Strict or Required and paste the CA, and use the name the certificate carries as the agent's --target and as the host (there is no Off, and no mode that accepts any certificate). Putting, changing or removing a tunnel asks for the password again, in the same request: the tunnel decides where the password travels. Microsoft Entra never goes through a tunnel: its token only goes straight to Azure.
2. Test the connection
Test connection connects and tells you what is on the other side: the version and the engine (SQL Server 2022, Azure SQL Database…), whether the connection is encrypted, the TLS mode, the user the database sees, and how long it took. It sends a few fixed questions and writes nothing. With Microsoft Entra it first asks for a new token, with no cache; if that fails you see the line of the Entra error instead, without connecting. A failure of the connection comes back as a line in HostWebhook's words, never the text of the server. It also warns you when:
- the user is
sysadmin, ordb_ownerof the database: far more than the node needs. See The SQL Server user; - the server is older than 2017, which HostWebhook doesn't support;
- the server is 2022 or later, or Azure, and the credential doesn't use Strict. Only when the credential has no tunnel: through a tunnel, it doesn't suggest it.
What HostWebhook keeps
- The password (or the secret of the Entra app) is encrypted, like the passwords of your other credentials. The password comes back to the panel only in
Edit keys and settings, after you verify it's you, and only for a person who can see it; the secret of the Entra app never does. - A Microsoft Entra token lives only in memory, for about an hour. It is never written to a log, an error or a trace.
- The rows your database answers are not stored: they are in the run that used them, like the other databases.
Microsoft Entra
Instead of a SQL login, an Azure SQL Database or an Azure SQL Managed Instance can sign HostWebhook in as an app of your tenant (a service principal). It also works when the server only accepts Microsoft Entra sign-in. It does not work with a server outside Azure, or with Amazon RDS, which has no Microsoft Entra. HostWebhook registers no app of its own: the app is yours, in your tenant.
- Register an app in Microsoft Entra, for one organization only, and only for HostWebhook. Its secret can ask for tokens for everything the app can do in your tenant, so don't reuse an app that does more.
- Create a client secret and write down when it expires: 24 months at most, and Microsoft recommends less than 12. Copy its Value (the column called Value, not the Secret ID).
- Save it in a Microsoft Entra app credential (Tenant ID, Client ID and Client secret), and pick it in the Microsoft Entra app field of the SQL Server credential (
Create newsits next to it). The SQL Server credential keeps only which app you picked; the tenant, the client ID and the secret stay in the app credential. - Make the app a user of the database. A Microsoft Entra admin of the server, signed in with Entra (the query editor of the portal, or SSMS), runs the lines in The SQL Server user.
- The app doesn't need API permissions or Azure roles: what it can do is what the
GRANTs of the database say. It has to be in the same tenant as the server.
- Only Azure hosts. The host must end in
.database.windows.net, with a checked certificate (Strict or Required), no CA of your own and no tunnel. Anything else is refused when you save the credential, so a token can't be sent to another server. - Changing the host or the app asks you to pick the app again, and only someone who can reach the app can. That way, whoever can edit the SQL Server credential but not the app can't send its token to another server.
- Rotating the secret. Create a new secret before the old one expires, save it in the app credential with
Edit keys and settings. - If you delete the client secret in Microsoft Entra, SQL Server connections can keep signing in with the token HostWebhook already holds (up to about an hour) until Microsoft is asked again, which happens as soon as anything is refused (a Test, or a connection without a saved token); from then on they stop with “Microsoft Entra rejected the client secret…” and you reconnect with the new Value.
- The token is asked for by HostWebhook, at
login.microsoftonline.comand for Azure SQL only. The driver receives the token and never the secret.
The SQL Server user
Give HostWebhook a user of its own, with only what the flow needs. Azure SQL Database, a contained user in the database:
CREATE USER hostwebhook WITH PASSWORD = '…';SQL Server, Managed Instance and RDS, a login and a user in the database:
CREATE LOGIN hostwebhook WITH PASSWORD = '…', CHECK_POLICY = ON;
CREATE USER hostwebhook FOR LOGIN hostwebhook; -- in the databaseThen give it what the flow uses, and nothing else:
GRANT SELECT, INSERT, UPDATE ON dbo.orders TO hostwebhook; -- DELETE only if a flow needs it
GRANT EXECUTE ON dbo.usp_create_order TO hostwebhook; -- each procedure a flow calls
GRANT VIEW CHANGE TRACKING ON dbo.orders TO hostwebhook; -- for the trigger with Change TrackingWith Microsoft Entra, a Microsoft Entra admin of the server runs this in the database, with the name of the app you registered:
CREATE USER [hostwebhook-app] FROM EXTERNAL PROVIDER;
GRANT SELECT, INSERT, UPDATE ON dbo.orders TO [hostwebhook-app];
GRANT EXECUTE ON dbo.usp_create_order TO [hostwebhook-app];
GRANT VIEW CHANGE TRACKING ON dbo.orders TO [hostwebhook-app];- A trigger only needs
SELECTon its table, andVIEW CHANGE TRACKINGin Change Tracking mode. - An AI toolkit needs the permissions of the tables on its list, and no more. For
query_sqlserver, if you unlock it, use a separate credential whose user only hasdb_datareader. - Never
sysadmin,db_owner,CONTROL,ALTER ANY …or permissions onxp_cmdshell. Careful withEXECUTEon a procedure: because of ownership chaining, the procedure can touch what the user can't. - The Microsoft Entra identity of the server needs no
Directory Readersrole here: a person creates the users.
Operations
Drop a SQL Server node, pick the credential, choose Single operation (or AI toolkit) and an operation. There are 7. Database, Schema, Table and the columns are picked from lists that HostWebhook reads from your database, so a name is never typed by hand where it can be chosen.
| In the dropdown | What it does | Fields | Comes back as |
|---|---|---|---|
| Get rows | Reads rows from a table or a view, up to 1,000, without writing SQL. | Database · Schema · Table · Columns (empty = all) · Filters · Order by · Direction · Limit (1–1,000, 100 by default) | rows · rowCount |
| Insert rows | Adds one row, or a list of up to 500. Identity, calculated and rowversion columns are not written: a value for an identity column is refused. | Table · Rows | rows, as they were left (identity, defaults and rowversion included) |
| Update rows | Changes the rows that match the filters. At least one filter is required. | Table · Set (column → value) · Filters | affectedRows · rows after the change (up to 100) |
| Upsert rows | Inserts a row, or updates it if its key already exists. | Table · Rows · Columns to update when the key exists | inserted · updated · rows |
| Delete rows | Deletes the rows that match the filters. At least one filter is required. | Table · Filters | affectedRows · rows as they were (up to 100) |
| Execute stored procedure | Calls a procedure by RPC, with typed parameters read from the database, so no SQL text is built. | Database · Schema · Procedure · its parameters | returnValue · outputParameters · resultSets (up to 5) |
| Run SQL | Runs the whole batch you write. Values in {{ }} are sent safely, as parameters. | SQL · Parameters (by hand) · Return rows | resultSets, or affectedRows |
Filling in the fields
- Filters are a list, not SQL:
=,!=,>,>=,<,<=,LIKE,IN,IS NULLandIS NOT NULL, all of which must match. The column names are only ones your table has, and each value is sent as a typed parameter, never inside the text of the SQL. - Update rows, Upsert rows and Delete rows need a table with a primary key: “This table has no primary key, so HostWebhook can't tell its rows apart. Use Run SQL.” Update and Delete need at least one filter, so a flow can't change or delete every row by mistake.
- Update and Delete run in a transaction, and give back the rows only if everything went well, because the table may have triggers of its own.
- Insert rows of many rows go in groups, inside one transaction.
- Run SQL runs the whole batch, as you wrote it. A
{{ }}in the text becomes a parameter (@p1,@p2…), so a value from the payload is never part of the SQL. Or fill Parameters by hand: then a{{ }}in the text is refused. The SQL is what you wrote in the node, never something that came in the payload. - Execute stored procedure: pick the procedure from the list of those your user can run, and its parameters appear with their type, read from the database. Output parameters and the return value come back.
- Types:
bigint,decimal,numeric,moneyanduniqueidentifiercome back as text so they don't lose digits;datetime2,datetimeoffsetandtimeas ISO text; binary columns in base64, marked{ "$base64": … }. In Get rows, aMAXcolumn comes back cut at 64 KiB and markedtruncated. Run SQL rewrites nothing: its own results can lose the precision of a type that doesn't fit in JSON. - Every call has a deadline (10 seconds by default, with the cap of your plan). When it passes, the statement is cancelled; if the server doesn't confirm in 5 seconds, the connection is closed and not reused.
When your SQL Server says no
A failure says what to do and where the data comes from, with no value of a row and no SQL. The lines are HostWebhook's, not the server's:
| What happened | What you see |
|---|---|
| 18456 (the login) | SQL Server rejected the user or password. Reconnect the credential. |
| 18456 on a server that only accepts Microsoft Entra | This server only accepts Microsoft Entra sign-in. Switch the credential to Microsoft Entra service principal. |
| 18456 with an Entra token | The app signed in, but this database has no user for it. Run CREATE USER [your-app] FROM EXTERNAL PROVIDER, see the guide. |
| Any other refusal of the login of an Entra app (not 4060, Azure busy or a firewall) | The app signed in, but this database has no user for it, or it can't connect. Run CREATE USER [your-app] FROM EXTERNAL PROVIDER and GRANT CONNECT, see the guide. |
| AADSTS7000215 | Microsoft Entra rejected the client secret. Paste its Value, not its ID, and reconnect. |
| AADSTS7000222 | The client secret has expired. Create a new one in Microsoft Entra and reconnect. |
| AADSTS700016 | Microsoft Entra can't find this client ID in the tenant. Check both IDs, e.g. on the app's Overview page. |
| AADSTS90002 | Microsoft Entra can't find this tenant. Check the Directory (tenant) ID, e.g. on the app's Overview page. |
| AADSTS7000112 | This app is disabled in Microsoft Entra. Ask your Entra admin to turn it back on. |
| AADSTS53003 | A Conditional Access policy in your tenant blocked the sign-in. Ask your Entra admin. |
| 208 | Table dbo.orders doesn't exist. Pick another in the node. |
| 4060 | This database can't be opened with this user. Check the user's access. |
| The certificate | The certificate couldn't be checked. Paste your server's CA, or connect through a HostWebhook tunnel. |
| 40613, 40501, 10928 | Azure SQL is busy or paused. HostWebhook will try again. |
Azure SQL being busy or paused is tried again by itself. The Test of a credential, which does not try again by itself, adds what to do when the database is a serverless one that paused itself: “Azure SQL is busy or paused. If it was paused, it is waking up: try the Test again in a minute.” Its first connection wakes it up, usually in less than a minute.
AI toolkit mode
Once the credential is picked, the node asks for a Mode. AI toolkit turns it into 9 tools that an AI Node — or an MCP client, through one of your MCP servers — calls by name. The model never writes SQL of its own for a table: each tool runs a statement that HostWebhook builds, with typed parameters.
| Tool | What it does | Class | At the start |
|---|---|---|---|
| describe_sqlserver_tables | Lists the tables you chose, with their columns and types. | Read | Open |
| select_sqlserver_rows | Reads rows with structured filters, up to 200. | Read | Open |
| insert_sqlserver_rows | Adds rows, up to 100 per call. | Write | Open |
| update_sqlserver_rows | Changes rows. Filters are required. | Destructive | Open |
| upsert_sqlserver_rows | Inserts rows or overwrites the row with that key. | Destructive | Open |
| delete_sqlserver_rows | Deletes rows. Filters are required. | Destructive | Blocked |
| query_sqlserver | Runs a SELECT of its own. | Destructive | Blocked |
| execute_sqlserver_sql | Runs any SQL. | Destructive | Blocked |
| execute_sqlserver_procedure | Calls a stored procedure. | Destructive | Blocked |
operation in their payload that names another tool is refused.What you control
- Tables the AI can use. One per line, e.g.
dbo.orders. The AI touches only those tables. Empty means none: until you add a table, its tools refuse. The tables of the tools that read or write rows are checked before HostWebhook connects, and the refusal names the ones that are allowed. The description of each tool carries the list, so the model knows what it can use, anddescribe_sqlserver_tablesgives it the columns. - Blocked at the start. Deleting rows,
query_sqlserver,execute_sqlserver_sqlandexecute_sqlserver_procedureare off until you unlock them. SQL Server has no read-only mode for a session, soquery_sqlservercan't promise it only reads: if you unlock it, use a separate credential whose user only hasdb_datareader. Withexecute_sqlserver_procedureunlocked, it only calls the procedures on Procedures the AI can use. - Limits. Up to 200 rows per call when reading and 100 per insert.
- Rows are data, not instructions. What comes back from your database is untrusted text: the descriptions of the tools tell the model so.
The trigger
Pick the SQL Server service on a Trigger node, with a SQL Server credential. A SQL Server database can't call a URL by itself, so HostWebhook checks the table on a timer and sends each new, changed or deleted row to the flow. It creates no triggers in your database and reads no log: it only runs SELECT with the credential. There are two modes.
Two ways to see changes
| Mode | Works on | Events |
|---|---|---|
| By column | Any table. It touches nothing in your database. | New rows · Updated rows. Deleted rows aren't seen. |
| Change Tracking | A table that has Change Tracking turned on (a DBA does that once). | New rows · Updated rows · Deleted rows |
By column
- New rows: the cursor is an identity column, or the date the row was created (
created_at). Any other whole-number column needs Only my app sets this id: whoever can insert picks that value, and a huge one would leave the trigger deaf. - Updated rows: the cursor is a
rowversioncolumn (the counter of the database, which moves on every insert and update; the panel proposes it if the table has one) or a date your app sets on every edit (updated_at). A creation column lets the trigger tell that a row touched within 2 seconds of being created isn't an edit; with a rowversion it can't, because the rowversion moves on insert too. - Time zone of this date, for a
datetime2,datetimeorsmalldatetimecursor: Server time zone if the database fills it (e.g.DEFAULT SYSDATETIME()), UTC if your app does, or Not sure, which is safe but may deliver rows hours late. A wrong pick can miss rows. If the newest row is ahead of the clock the trigger waits for, the card tells you which choice it looks like. - A
datetimeoffsetcarries its own zone. A column that allows empty values is allowed, with a warning: rows where it is empty are never seen. If the cursor has no index every check reads the whole table, and the card says so: add an index. - The table needs a primary key. It is what tells two rows with the same cursor apart.
- Filters (the same list as the node) limit which rows count.
Change Tracking
Change Tracking is a feature of SQL Server that records which rows changed. It works in every edition, Express included, and in Azure SQL. A DBA turns it on once:
ALTER DATABASE shop SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 2 DAYS, AUTO_CLEANUP = ON);
ALTER TABLE dbo.orders ENABLE CHANGE_TRACKING;
ALTER DATABASE shop SET ALLOW_SNAPSHOT_ISOLATION ON; -- optional, recommended- The table needs a primary key, and the user needs
VIEW CHANGE TRACKINGandSELECTon it. - The trigger starts from now: what was there before isn't a change. It keeps the version it reached, so a restart of HostWebhook loses nothing.
- Deleted rows send the key and the operation. The row is gone, so the payload has no
row, and filters can't be used with this event. - If the server no longer has the changes since the last check (the retention ran out, or the table was truncated while changes were still waiting to be sent) the trigger pauses: “Change tracking no longer has the changes since the last check: its retention ran out, or the table was emptied with TRUNCATE. Start again from now.” Turn it on again with Activate: it starts from now, and the card says that what changed in between is not sent. Pick a retention longer than the longest your flow could be off.
- A
TRUNCATEsends no deleted rows. Change Tracking doesn't record it: with the trigger up to date, emptying a table withTRUNCATE TABLEproduces no event and no warning, and the rows are simply gone. If you need each row reported as deleted, delete them withDELETE. - Change Data Capture (CDC) is not used: turning it on needs
sysadminand the SQL Server Agent (Express doesn't have it), and while its capture doesn't advance, the log of your database can't be truncated.
Ignore changes made by this flow
On by default. The changes that this flow's own SQL Server nodes make (an Insert rows, an Update rows) don't fire it again, so a flow that writes to its own table doesn't loop. In Change Tracking the node marks its writes with a tag that SQL Server keeps in the change itself (CHANGE_TRACKING_CONTEXT), made of numbers with no data of your rows, and the trigger skips what carries its tag. In By column the node leaves a fingerprint of each row it wrote (the rowversion when the table has one, or a SHA-256 of the row) and the trigger skips a row only if it is exactly that version: if somebody edits it afterwards, it fires. Run SQL isn't covered: it doesn't tell which rows it changed, so the trigger may fire on them.
How often, and what it costs
- How often it checks, in seconds: on Free plans at most every 15 minutes; on paid plans from every minute (300 seconds by default). Rows per check goes up to 500. Rows to send on first activation sends that many of the latest rows once, when you turn it on for the first time.
- A check every few minutes keeps serverless databases awake. The free tier of Azure SQL Database is paused only after 15 minutes without activity, so a trigger that checks every 1–5 minutes keeps it on and spends its monthly allowance of vCore seconds. Pick a longer interval for a database you want to pause.
- A check reads a few small catalog queries and one query of the table, with an index on the cursor it is cheap.
What the trigger sends downstream
By column sends event (row.created or row.updated), database, schema, table, row (the row as the node reads it) and cursor. Change Tracking sends event (row.created, row.updated or row.deleted), database, schema, table, operation (insert, update or delete), key, row (null for a deleted row) and version. database is the database the trigger picked, and null when it uses the credential's. The columns of row and of key keep the types of the node (see Types above): an int is a number, so a key is { "id": 1042 }, and the types that come back as text stay text.
{
"event": "row.deleted",
"database": "shop",
"schema": "dbo",
"table": "orders",
"operation": "delete",
"key": { "id": 1042 },
"row": null,
"version": "132"
}Trying it out
The trigger's Test shows the latest rows (or, in Change Tracking, the latest changes of the kind you chose) that it would pick up, with the same filters, and sends nothing. If the newest row is ahead of the clock, the note about it comes with the list: it is what explains an empty one.
When a trigger pauses
A cause that waiting doesn't fix pauses the trigger at once and says why. A failure that can pass (a deadlock, Azure busy, the network) is tried again, and the trigger pauses after five in a row. Fix the cause and turn it on again; for a rejected login or secret, change it in Edit keys and settings on the credential. Then click Activate: the trigger stays paused until then. Turning a trigger on while the database is busy or waking up fails with a line that says to press Activate again in a minute: nothing is checked again by itself until the trigger is on.
| What happened | What the card says |
|---|---|
| The user or password is rejected | SQL Server rejected the user or password. Reconnect the credential. |
| The server only accepts Microsoft Entra | This server only accepts Microsoft Entra sign-in. Switch the credential to Microsoft Entra service principal. |
| The database has no user for the Entra app | The app signed in, but this database has no user for it. Run CREATE USER [your-app] FROM EXTERNAL PROVIDER, see the guide. |
| The client secret is rejected or has expired | Microsoft Entra rejected the client secret. Paste its Value, not its ID, and reconnect. · The client secret has expired. Create a new one in Microsoft Entra and reconnect. |
| The app, the tenant or the sign-in is refused by Entra | Microsoft Entra can't find this client ID in the tenant. Check both IDs, e.g. on the app's Overview page. · Microsoft Entra can't find this tenant. Check the Directory (tenant) ID, e.g. on the app's Overview page. · This app is disabled in Microsoft Entra. Ask your Entra admin to turn it back on. · A Conditional Access policy in your tenant blocked the sign-in. Ask your Entra admin. |
| The table or a column is gone | A table or column the trigger watches isn't there anymore. Pick it again. |
| The table has no primary key | This table has no primary key, so the trigger can't tell its rows apart. Add one, or watch another table. |
| The user can't read the table | The SQL Server user can't read that table. Give it SELECT on the table (and VIEW CHANGE TRACKING for Change Tracking), or use another user. |
| The database can't be opened | This database can't be opened with this user. Check the user's access. |
| Change Tracking was turned off | Change tracking was turned off on this table. Turn it on again, see the guide. |
| Change Tracking no longer has the changes | Change tracking no longer has the changes since the last check: its retention ran out, or the table was emptied with TRUNCATE. Start again from now. |
| Five failed checks in a row | Paused after 5 failed checks in a row. Fix the cause and turn it on again. |
Limits and what each thing costs
| What | How much |
|---|---|
| Trigger checks | Free: at most every 15 minutes. Paid: from every minute (300 seconds by default). Up to 500 rows per check. |
| Connections | A pool of its own per credential and database, from 1 to 3 connections, closed after 60 seconds without use. Connecting takes 10 seconds at most in total. |
| Microsoft Entra token | One request to login.microsoftonline.com per app each time its token expires (about an hour), with a 10-second deadline. |
| Node | Up to 1,000 rows per read and 500 per write, with a cap on the size of an answer (5 MiB) and on the number of values (rows × columns). |
| Stored procedures | Up to 5 result sets, with the same caps. |
| AI toolkit | Up to 200 rows per call and 100 per insert. |
| Fingerprints | For «Ignore changes made by this flow» in By column. They hold no data of the row, live 24 to 49 hours and have a cap per trigger and per organization. Change Tracking doesn't need them. |
Gotchas
- One database per connection. Azure SQL Database has no
USE: the credential carries the database. For another database of the same server, make another credential. - A new row can take up to a minute to arrive. A date cursor is compared with the clock of the database minus a minute, so a transaction that is still open isn't skipped.
- The first check after you edit what the trigger watches (the table, the cursor, the filters) starts again from now: nothing from before is sent.
- Run SQL runs the whole batch, with the permissions of the credential. Give that credential only the user in The SQL Server user.
- A table with no primary key can be read, but not updated, upserted or watched by a trigger.
What isn't here yet
- Named instances (
SERVER\INSTANCE): give the instance a fixed port. - Windows authentication (Kerberos, NTLM): a SQL login or Microsoft Entra.
- Microsoft Entra with a managed identity or a certificate, with a server outside Azure, with Amazon RDS, or through a tunnel.
- Change Data Capture (CDC): Change Tracking sees new, changed and deleted rows without it.
Microsoft, SQL Server and Microsoft Entra are trademarks of the Microsoft group of companies.