All Oracle Error Codes
Oracle DBA Forum

Frequent Oracle Errors

TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated

Re: Dbms_stats giving OA-06512 error

Wolfgang Breitling


At 05:36 PM 1/5/2007, Mladen Gogala wrote:

>First of all, your method_opt is erroneous. You should specify something like
>favorite option 'FOR ALL INDEXED COLUMNS SIZE <histogram size>'.


Not quite correct. method_opt=>'for all columns' gathers histograms
on all columns with the default size of 75:> create table test as select trunc(dbms_random.value(1,501))
col1 from dual connect by level <= 5000;

Table created.> alter session set events '10046 trace name context forever, level 4'
 2  dbms_stats.gather_table_stats( ownname => 'SCOTT',
 3   tabname => 'TEST',
 4   estimate_percent => dbms_stats.auto_sample_size,
 5   method_opt => 'for all columns',
 6   cascade => true);
 7 END;
 8 /

PL/SQL procedure successfully completed.> alter session set events '10046 trace name context off'
 2> @colstats test

table             column           NDV        density
nulls   lo          hi          av lg bkts
------------------------ --------------------- --------- ------------
--------- ---------------- ---------------- ----- -----
TEST              COL1               500   2.1992E-03
    0 1           500            4   75

1 row selected.>

Note the number of buckets. Although it might be misleading,
especially in pre Oracle 10g, but here it is correct.> select max(ENDPOINT_NUMBER) from dba_histograms where
table_name='TEST' and column_name='COL1';


1 row selected.

and finally from the 10046 trace this statement:
select min(minbkt),maxbkt,substrb(dump(min(val),16,0,32),1,120)
minval,substrb(dump(max(val),16,0,32),1,120) maxval,sum(rep) sumrep,
sum(repsq) sumrepsq, max(rep) maxrep, count(*) bktndv, sum(case when
rep=1 then 1 else 0 end) unqrep from (select val,min(bkt) minbkt,
max(bkt) maxbkt, count(val) rep, count(val)*count(val) repsq from
(select /*+ noparallel(t) noparallel_index(t) cursor_sharing_exact
dynamic_sampling(0) no_monitoring */"COL1" val, ntile(75) over (order
by "COL1") bkt from "SCOTT"."TEST" t where "COL1" is not null)
group by val) group by maxbkt order by maxbkt

showing "clearly" the collection of a 75 bucket HB histogram

I am convinced your error has nothing to do with your change to the
gathering procedure. It has more likely to do with a change to table
"EDRS"."AMENDMENT". Did someone create a function-based index?


Wolfgang Breitling
Centrex Consulting Corporation