0

How can I set up a conditional trigger to be fired when a particular condition is met after an update or insert and then insert some of the inserted values into another table located on another SQL Server database on SQL Server 2005?

1 Answer 1

1

Read here about creating triggers. In your case it will be a normal data manipulation language (DML) event trigger.

In order to insert data to a remote server you need to configure a linked server. You have a few tools for that: you can either use SQL via sp_addlinkedserver, or you can use SQL Server Management Studio (SSMS). In latter case you will be able to do it via GUI. See this article for the instructions.

Once you configure the linked server, you can access its tables directly from SQL (In the example below a linked server SRVR002\ACCTG is used):

SELECT name FROM [SRVR002\ACCTG].master.sys.databases
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.