can't insert data to SQL server within an oracle trigger [message #245002] |
Thu, 14 June 2007 19:53 |
HC@ZZF
Messages: 2 Registered: June 2007
|
Junior Member |
|
|
1) my simple trigger in oracle side
create or replace
TRIGGER TESTRI
AFTER INSERT ON TEST1
FOR EACH ROW
BEGIN
insert into test1@sqlserver (city,state) values ('what','nine');
END;
2)invoke trigger in oracel side.
SQL> insert into test1 values ('damn','da');
insert into test1 values ('damn','da')
*
ERROR at line 1:
ORA-02047: cannot join the distributed transaction in progress
ORA-06512: at "GGWEB.TESTRI", line 3
ORA-04088: error during execution of trigger 'GGWEB.TESTRI'
3) if insert date without inside a trigger, it works well
SQL> insert into test1@sqlserver (city,state) values ('what','nine');
1 row created.
SQL> commit;
Commit complete.
SQL> select * from test1@sqlserver;
CITY STATE
------------------------------ ----------
Fremont CA
Hayward CA
San Jose PA
what nine
SQL>
|
|
|
|
|
|