title: SQL Server 2014 trigger across multiple databases
body: <p>I have 2 databases <code>test1</code> and <code>test2</code>. Let's say that I have a system, that updates specific values in database <code>test1</code>.  </p>
  
  <p>Now I want to create a trigger which is placed in database <code>test2</code> to check if database <code>test1</code> updates the values. </p>
  
  <p>When it is updated, I want to write something to database <code>test2</code>.  </p>
  
  <p>I have tried it with the following trigger:</p>
  
  <pre><code>ALTER TRIGGER [dbo].[testtrigger] 
  ON [test2].[dbo].[naam2]
  AFTER UPDATE ON [test1].[dbo].[naam]
  </code></pre>
  
  <p>However, I get a syntax error at:</p>
  
  <blockquote>
    <p>Incorrect syntax near 'ON'. Expecting ',',AS,NOT_FOR, or WITH</p>
  </blockquote>
  
  <p>Now I wonder why this is happening. I have searched about how to do this, and the all reference to <code>ON</code>.</p>
  
  <p>I'm using Microsoft SQL Server 2014</p>
  
  <p>I will add a image to try and make it more clear if it isn't.
  <a href="https://i.stack.imgur.com/xi8t8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xi8t8.png" alt="Image of the 2 databases"></a></p>