It is possible to use linked server and a trigger but I have only bad experiences from this.
Why not use triggers?
Two-way sync with triggers is tricky, because the triggers will fire each other. You will have to control this somehow, for example with special values.
Otherwise, you will get strange locking errors.
You will need to set up MSDTC (Distributed Transaction Coordinator) between linked servers
DBMS can't help you very much with linked servers. it is much harder to debug SQL. Bad queries usually just hang and timeout when there is type mismatch etc.
Transactions with multiple writes in the trigger OR in the query launching the trigger cause deadlocks easily. I would use triggers only to very simple updates (one INSERT/UPDATE/DELETE statement) and even then make sure that deadlocks cannot occur. I remember one integration that I had to rewrite completely when a legacy app caused deadlocks with a trigger.
Alternatives
There are at least two questions to answer:
- Is the synch one-way or two-way between tables?
- Do the schemas of the two tables match?
If the schemas match, replication should be ideal for both one-way and two-way synch.
If the schemas are different, like usually is the case with application integration (EAI), you might consider:
- Integration Services (SSIS) or even Import/Export tool -generated dtsx package
- Some other EAI tool, if available (like BizTalk)
- programming a custom integration tool
I don't have much experience with EAI tools but comparing SSIS to custom .NET solutions I can only say that you will save a lot of time if you can get the job done with SSIS.
Only if SSIS does not work or is not available (SQL Express) I would try programming a Windows service, WCF service etc.