I found thit inifo in SQL 2000 books online
now i want to understand is it applicable to use trigger between two
different databases .... may be on different servers or not ?
if yes then how ? (can i use the regular syntax)
like:
USE database1
GO
CREATE TRIGGER TEST
ON database1.table1
FOR INSERT as
insert into database2.table2(column in table 2 )
values ('any data value')
GO
if no ? then how to send any inserted or updated data from table in
database1 to another table in database2 ........... may be on different
servers
(can i use DTS in SQL 2000 or SSIS in SQL 2005)
if any one catch my point i will be eager to hear from him
thanks
-------------------------------------------
Best Regards,
Mahmoud A.Shaban
The easiest thing for you to do would be to simply try. :)
You cannot, however, *create* or *alter* triggers on remote objects.
E.g.: this is not allowed:
use db1
create trigger dbo.trigger
on db2.dbo.table
...
ML
your answer is to try but the syntax which i'm using
is not allowed ??
--
Best Regards,
Mahmoud A.Shaban
I hope you realize that such triggers give you only limited
protection. For instance, you can restore one of your databases from
an earlier backup.
This action does not fire triggers and it can violate your business
rules.
insert into database2.dbo.table2(column in table 2 )...
RLF
"Mahmoud Shaban" <Mahmou...@discussions.microsoft.com> wrote in message
news:A412ADEC-2A36-460A...@microsoft.com...
>> use db1
>>
>> create trigger dbo.trigger
>> on db2.dbo.table
Say:
use db2;
create trigger dbo.trigger
on dbo.table
...
--
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006