Hi All,
I need help/suggestion on creating trigger on federated server.
Issue:
I have 2 databases in different servers(db2). I need a trigger whenever TABLE1 in DB1 is inserted I need the same to be inserted in TABLE2 in DB2. I have created nickname for the TABLE2 of DB2 in DB1 but I couldn't create a trigger for inserting record through nickname.
My trigger is kinda:
CREATE TRIGGER test_insert AFTER INSERT ON TABLE1 REFERENCING NEW AS insertrow FOR EACH ROW MODE DB2SQL BEGIN ATOMIC INSERT INTO nickname.TABLE2 (name1) VALUES (insertrow.name); END
while creating trigger it is showing error as : Operation not allowed for the federated environment reason code 21 , 22.
Please help me in making it out by trigger or through any other way.
Regards
Michael