0XC0190038

STATUS_CANT_CROSS_RM_BOUNDARY Fix – Real-World Steps

Database Errors Intermediate 👁 1 views 📅 Jun 8, 2026

This error hits when a transaction tries to cross resource manager boundaries in SQL Server. Here's the fix and why it works.

You're not crazy – this error is a pain

I've seen STATUS_CANT_CROSS_RM_BOUNDARY (0XC0190038) pop up when a transaction tries to do something across SQL Server instances or resource managers. It usually kills your whole operation. Let's fix it fast.

The Quick Fix

This error means you're trying to use a transaction that spans multiple resource managers – like a linked server query inside a local transaction. SQL Server can't handle that without distributed transaction coordinator (MSDTC) being set up right. The fastest way to get past it is to disable the transaction or use SET XACT_ABORT OFF with careful error handling.

Step 1: Rewrite your query or stored procedure

Instead of wrapping everything in one BEGIN TRAN / COMMIT, break the linked server part out. Here's the pattern:

-- Bad: causes 0XC0190038
BEGIN TRAN
UPDATE LocalDB.dbo.Table1 SET Col1 = 1
EXEC LinkedServer.RemoteDB.dbo.StoredProc
COMMIT TRAN

-- Fix: split the remote call
BEGIN TRAN
UPDATE LocalDB.dbo.Table1 SET Col1 = 1
COMMIT TRAN

EXEC LinkedServer.RemoteDB.dbo.StoredProc

If you need the remote call to be part of the same atomic operation, you have to enable MSDTC. But honestly, most environments don't have it configured correctly.

Step 2: Enable and configure MSDTC (if you must keep distributed transactions)

If you can't split the transaction, you need the MSDTC service running on both servers. Open Component Services (dcomcnfg.exe), go to Component Services > Computers > My Computer > Distributed Transaction Coordinator. Right-click Local DTC, select Properties, and under Security, check these:

  • Network DTC Access
  • Allow Remote Clients
  • Allow Inbound
  • Allow Outbound
  • Enable XA Transactions (optional but helps)

Then restart the service. Also check your firewall – ports 135 and 5000-5020 need to be open between the two servers. Had a client last month whose IT team blocked those ports – took me 10 minutes to find it.

Why this happens

SQL Server treats each instance as its own resource manager – basically a mini-transaction coordinator. When you run a transaction that touches two different instances, SQL Server can't coordinate the commit/rollback between them without a higher-level coordinator (MSDTC). The error code 0XC0190038 literally means the operation can't cross that boundary. It's a safety mechanism – without it, you could end up with partial commits and data corruption.

Less common variations of the same issue

I've seen this error in three other scenarios:

  • Linked server queries inside triggers – a trigger fires, runs a linked server query, and that's inside an implicit transaction. Same root cause.
  • Service Broker conversations – if you use Service Broker across instances, you need MSDTC or the conversation fails with this error.
  • Replication publishers with cross-database transactions – rare but happens when a replication agent tries to commit across instances.

In all cases, the fix is the same: either split the transaction or enable MSDTC.

Prevention tips

  • Design your queries to avoid cross-instance transactions – batch the work. Remote calls first, then local updates in a separate transaction.
  • Test MSDTC early – if you know you'll need distributed transactions, configure MSDTC before you start coding. Don't wait for the error.
  • Check linked server options – some quirks happen with SET REMOTE_PROC_TRANSACTIONS or SET XACT_ABORT. Keep them off unless you really need them.
  • Log the error – use TRY...CATCH to catch 0XC0190038 and rollback gracefully. Don't let it kill your app.

Bottom line: this error is your database telling you it can't do what you're asking. Respect the boundary, split the work, or set up MSDTC. You'll be back online in minutes.

Was this solution helpful?