After enabling the tablespace history (to see the space evolution) in one of my database (Oracle Database 11.2.0.3), I am getting the following error every week in the RDBMS alert log:
286509 : Wed Oct 15 00:00:01 2014
286510 : Errors in file /oracle/app/oracle/diag/rdbms/strm/strm/trace/strm_j000_4456698.trc:
286511 : ORA-12012: error on auto execute of job 106
286512 : ORA-00001: unique constraint (SYS.TOAD_TABLESPACES_PK) violated
286513 : ORA-06512: at “SYS.TOAD_SPACEMAN”, line 66
286514 : ORA-06512: at line 2
I understand that the problem comes from the line 66 of the package TOAD_SPACEMAN which corresponds to the following code:
/* INSERT NEW TABLESPACES FOUND */
INSERT INTO TOAD_TABLESPACES
SELECT TABLESPACE_NAME, V_MON_DATE
FROM DBA_TABLESPACES;
COMMIT;
I compared the results of the SELECT part of the SQL above with what we have. We have the same number of rows every week.
Moreover the results always have unique values so I do not understand why the unique constraint will detect non-unique values.
I didn’t installed this option (have mine own tool for same purpose) but could you please check what is primary key in “TOAD_TABLESPACES” table and definition of before insert trigger on same table (is it enabled and valid).
Brg
Damir
There were 2 same jobs running at the same time : one under the user SYS and one under the user TOAD. I dropped the job under the user TOAD. That should fix it.