What if another DB?
Asadulla, April 09, 2018 - 4:36 pm UTC
You answered: Loopback is a DB link pointing back to the same database.
Beautiful solution, but what if I do not use the same database?
I want to export lob data into mySQL database.
Got this:
ORA-02025: all tables in the SQL statement must be at the remote database.
April 10, 2018 - 1:25 pm UTC
What exactly is your query?
Note that if you're going from Oracle DB -> MySQL there are extra restrictions on what you can do over the link.
A reader, April 29, 2021 - 10:06 am UTC
Hi,
I have a requirement in which I need to insert the same row to a remote table that i insert to the local table. So we are creating a trigger to perform the insert into the remote table via db link. However the remote table contains a CLOB column by which the insert is not successful bit thoring error "ORA-22992: cannot use LOB locators selected from remote tables".
The trigger code is along the line mentioned below. Here table TEST_T exists in both the database and COL_B is of CLOB type.
create or replace trigger TRG_TEST_T
before insert or update or delete on TEST_T
for each row
begin
insert into TEST_T@DBLINK
(COL_A,COL_B)
VALUES(:NEW.COL_A,:NEW.COL_B;
end;
/
Any idea how to achieve this.
Regards;
Gopal
April 29, 2021 - 12:37 pm UTC
Try making it an
after insert trigger:
create table t (
c1 clob
);
create table t2 (
c1 clob
);
create or replace trigger trig
after insert on t
for each row
begin
insert into t2@loopback
values ( :new.c1 );
end;
/
insert into t values ( 'test' );
select * from t;
C1
test
select * from t2@loopback;
C1
test