drop table dest_testlog
ORA-00942: table or view does not existMore Details: https://docs.oracle.com/error-help/db/ora-00942
create table dest_testlog (c1 number, c2 varchar2(20))
Table created.
insert into dest_testlog
select level , 'DEST' from dual connect by level <= 5
5 row(s) inserted.
drop table src_testlog2
ORA-00942: table or view does not existMore Details: https://docs.oracle.com/error-help/db/ora-00942
create table src_testlog2(c1 number, c2 varchar2(20))
Table created.
insert into src_testlog2
select level c1, 'SOURCE' as c2 from dual connect by level <= 5
5 row(s) inserted.
update src_testlog2 set c1 = 1, c2 = '????'
where c1 = 2
1 row(s) updated.
select * from src_testlog2
C1 | C2 | 1 | SOURCE | 1 | ???? | 3 | SOURCE | 4 | SOURCE | 5 | SOURCE |
---|
merge into dest_testlog l
using src_testlog2 ll
on (l.c1 = ll.c1)
when matched then update set
l.c2 = ll.c2
ORA-30926: unable to get a stable set of rows in the source tables ORA-06512: at "SYS.DBMS_SQL", line 1721More Details: https://docs.oracle.com/error-help/db/ora-30926
drop table err$_dest_testlog
ORA-00942: table or view does not existMore Details: https://docs.oracle.com/error-help/db/ora-00942
begin
dbms_errlog.create_error_log(dml_table_name => 'dest_testlog');
end;
select * from err$_dest_testlog;
-- retry merge with log errors into clause....
-- merge is now successful,
merge into dest_testlog l
using src_testlog2 ll
on (l.c1 = ll.c1)
when matched then update set
l.c2 = ll.c2
log errors into err$_dest_testlog ('have a look!!!') reject limit unlimited;
-- controlla log riga in errore
select * from err$_dest_testlog;
select * from dest_testlog where rowid in (select elog.ora_err_rowid$ from err$_dest_testlog elog);
select * from dest_testlog;
--- WOW!! update has been done even for row with unstable source dataset
--drop table dest_testlog;
--drop table src_testlog2;
---drop table err$_dest_testlog;
ORA-06550: line 6, column 1: PLS-00103: Encountered the symbol "SELECT"More Details: https://docs.oracle.com/error-help/db/ora-06550
drop table dest_testlog
Table dropped.
create table dest_testlog (c1 number, c2 varchar2(20))
Table created.
insert into dest_testlog
select level , 'DEST' from dual connect by level <= 5
5 row(s) inserted.
drop table src_testlog2
Table dropped.
create table src_testlog2(c1 number, c2 varchar2(20))
Table created.
insert into src_testlog2
select level c1, 'SOURCE' as c2 from dual connect by level <= 5
5 row(s) inserted.
update src_testlog2 set c1 = 1, c2 = '????'
where c1 = 2
1 row(s) updated.
select * from src_testlog2
C1 | C2 | 1 | SOURCE | 1 | ???? | 3 | SOURCE | 4 | SOURCE | 5 | SOURCE |
---|
merge into dest_testlog l
using src_testlog2 ll
on (l.c1 = ll.c1)
when matched then update set
l.c2 = ll.c2
ORA-30926: unable to get a stable set of rows in the source tables ORA-06512: at "SYS.DBMS_SQL", line 1721More Details: https://docs.oracle.com/error-help/db/ora-30926
drop table err$_dest_testlog
ORA-00942: table or view does not existMore Details: https://docs.oracle.com/error-help/db/ora-00942
begin
dbms_errlog.create_error_log(dml_table_name => 'dest_testlog');
end;
Statement processed.
select * from err$_dest_testlog
no data found
merge into dest_testlog l
using src_testlog2 ll
on (l.c1 = ll.c1)
when matched then update set
l.c2 = ll.c2
log errors into err$_dest_testlog ('have a look!!!') reject limit unlimited
4 row(s) updated.
select * from err$_dest_testlog
ORA_ERR_NUMBER$ | ORA_ERR_MESG$ | ORA_ERR_ROWID$ | ORA_ERR_OPTYP$ | ORA_ERR_TAG$ | C1 | C2 | 30926 | ORA-30926: unable to get a stable set of rows in the source tables | AAGsUCAAPAAAAFWAAA | U | have a look!!! | 1 | ???? |
---|
select * from dest_testlog where rowid in (select elog.ora_err_rowid$ from err$_dest_testlog elog)
C1 | C2 | 1 | SOURCE |
---|
select * from dest_testlog
C1 | C2 | 1 | SOURCE | 2 | DEST | 3 | SOURCE | 4 | SOURCE | 5 | SOURCE |
---|
drop table dest_testlog
Table dropped.
create table dest_testlog (c1 number, c2 varchar2(20))
Table created.
insert into dest_testlog
select level , 'DEST' from dual connect by level <= 5
5 row(s) inserted.
drop table src_testlog2
Table dropped.
create table src_testlog2(c1 number, c2 varchar2(20))
Table created.
insert into src_testlog2
select level c1, 'SOURCE' as c2 from dual connect by level <= 5
5 row(s) inserted.
update src_testlog2 set c1 = 1, c2 = '????'
where c1 = 2
1 row(s) updated.
select * from src_testlog2
C1 | C2 | 1 | SOURCE | 1 | ???? | 3 | SOURCE | 4 | SOURCE | 5 | SOURCE |
---|
merge into dest_testlog l
using src_testlog2 ll
on (l.c1 = ll.c1)
when matched then update set
l.c2 = ll.c2
ORA-30926: unable to get a stable set of rows in the source tables ORA-06512: at "SYS.DBMS_SQL", line 1721More Details: https://docs.oracle.com/error-help/db/ora-30926
drop table err$_dest_testlog
Table dropped.
begin
dbms_errlog.create_error_log(dml_table_name => 'dest_testlog');
end;
Statement processed.
select * from err$_dest_testlog
no data found
merge into dest_testlog l
using src_testlog2 ll
on (l.c1 = ll.c1)
when matched then update set
l.c2 = ll.c2
log errors into err$_dest_testlog ('have a look!!!') reject limit unlimited
4 row(s) updated.
select * from err$_dest_testlog
ORA_ERR_NUMBER$ | ORA_ERR_MESG$ | ORA_ERR_ROWID$ | ORA_ERR_OPTYP$ | ORA_ERR_TAG$ | C1 | C2 | 30926 | ORA-30926: unable to get a stable set of rows in the source tables | AAGsVTAAPAAAAE+AAA | U | have a look!!! | 1 | ???? |
---|
select * from dest_testlog where rowid in (select elog.ora_err_rowid$ from err$_dest_testlog elog)
C1 | C2 | 1 | SOURCE |
---|
select * from dest_testlog
C1 | C2 | 1 | SOURCE | 2 | DEST | 3 | SOURCE | 4 | SOURCE | 5 | SOURCE |
---|