Using a trace file to reveal the name of the missing table
create table T0 (a number);
create table T1 (b number);
create table T2 (c number);
create table T3 (d number);
The following statement selects from t-ell instaed of t-one:
select
t0.a, t1.b, t2.c, t3.d
from
t0 cross join tl cross join t2 cross join t3;
…
4 t0 cross join tl cross join t2 cross join t3;
t0 cross join tl cross join t2 cross join t3
*
ERROR at line 4:
ORA-00942: table or view does not exist
Set event 942 to write name of table into a
trace files …
alter session set events '942 incident(table_missing)';
… and execute the statement again (so that the relevant information is found in the trace file.
Find name (path) of trace file:
select
value trace_file
from
v$diag_info
where
name = 'Default Trace File';
Open trace file. It reveals name
ORA-00700: soft internal error, arguments: [EVENT_CREATED_INCIDENT], [0], [TABLE_MISSING], [], [], [], [], [], [], [], [], []
about to signal 942
Name: TL
Encountered exception while getting args for function:0x00007FF7DCCA087B
2021-01-31T16:53:01.939238+01:00
Sequences on which the necessary privileges are missing
If a column has a
defaul clause which refers a
sequence that the schema in which the table is created does not have rights, the error message is also an ORA-00942:
create table tq84_ora_942 (
id integer default other_schema.sequence_name.nextval,
txt varchar2(10)
);
Of course, this is also the case if the sequence is selected like so:
select other_schema.sequence_name.nextval from dual;