Cannot insert record in remote database - Linked server I want to insert record into a table in my remote database table.
Ooo, bad news - this means you're using a trigger:

from ZTable Zh
inner join inserted


If you're trying to work in a trigger, that means there are other changes to other tables in your transaction. The "inserted" table you're using means that you're working with inserted records from another table.

This means you're trying to do a distributed transaction: committing multiple changes on different servers at the same time. This is a recipe for slow performance.

Take a step back and consider the business problem you're trying to solve. For example, if you're trying to log inserts, consider logging on the same table rather than trying to coordinate transactions across multiple SQL Servers. Or, consider using a built-in feature like Change Data Capture or Change Tracking.

There's a chance, depending on your SQL Server version, that it's fixed by this SQL Server 2005 issue, but even if it is - I'd recommend a different approach than triggers that call linked servers.