Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hii All,

I want to write a trigger for SQL SERVER 2000 To SQL SERVER 2005.

Problem is that Client having two system on which one system they use SQL2000 and other SQL 2005 but for same software I want to update both servers on one entry.

If the entry made in sql 2000 server then throught trigger it should be insert in to SQL 2005.

Is it possible to write trigger for SQL SERVRE2000 TO SQL SERVER2005, and if not then any solution on these problems?
Posted
Updated 19-Mar-11 1:30am
v2
Comments
Dalek Dave 19-Mar-11 7:30am    
Edited for Grammar and Spelling.

1 solution

You could use Linked Server to create a connection from SQL Server 2000 to the SQL Server 2005. For description see: http://msdn.microsoft.com/en-us/library/aa213778(v=sql.80).aspx[^]

Now you can use the linked server inside your trigger to make modifications to the SQL Server 2005 database. Just an opionion. Personnally I would create stored procedures on both ends to handle the logic for informing (from SQL Server 2000) and making modifications (in SQL Server 2005). Then the trigger in SQL Server 2000 would only call the local procedure.
 
Share this answer
 
Comments
Dalek Dave 19-Mar-11 7:30am    
Good Call.
Wendelius 19-Mar-11 12:31pm    
Thanks
Nilesh More 23-Mar-11 6:48am    
Thanks
Wendelius 23-Mar-11 6:49am    
No problem :) If this solved your question, consider marking it answered.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900