Forum Stats

  • 3,770,044 Users
  • 2,253,052 Discussions
  • 7,875,280 Comments

Discussions

dba_audit_trail shows schema owner cannot insert to its own table, why?

PuraVidaOTN
PuraVidaOTN Member Posts: 14
edited Aug 13, 2012 4:32PM in General Database Discussions
DBA_AUDIT_TRAIL shows that a schema owner cannot insert into its own table.
Also shown below, I can manually login as schema owner, and successfully issue an insert statement.

In what situation this error ORA-00942 (table or view does not exist) can happen if
I have the table, and I have permission on the table? The application uses hibernate and JDBC.

SQL> select USERNAME, RETURNCODE, owner, OBJ_NAME, to_char(TIMESTAMP,'yyyy-mm-dd hh24:mi:ss') t, ACTION_NAME, sql_text
2 from dba_audit_trail
3 where returncode in (942,2004,1432)
4 and owner not in ('SYS', 'SYSTEM')
5 order by t ;

USERNAME RETURNCODE OWNER OBJ_NAME T ACTION_NAM SQL_T
--------------- ---------- --------------- ------------------------------ ------------------- ---------- -----
DEMO_MC_CERT 2004 DEMO_MC_CERT SERV_PRD 2012-08-10 19:10:12 INSERT
DEMO_MC_CERT 2004 DEMO_MC_CERT SERV_PRD 2012-08-10 19:10:49 INSERT

USER is "DEMO_MC_CERT"
SQL> insert into SERV_PRD (id) values (99999);
1 row created.
Tagged:

Answers

  • Unknown
    edited Aug 10, 2012 10:35PM
    >
    DBA_AUDIT_TRAIL shows that a schema owner cannot insert into its own table.
    Also shown below, I can manually login as schema owner, and successfully issue an insert statement.
    >
    Please explain what those statements mean. First you say the schema owner cannot insert into its own table but then you say the owner can insert.

    And you failed to mention your 4 digit Oracle version.

    An insert by any user could fail if there is a trigger on the table that tries to access another table that there are no privileges on.
  • PuraVidaOTN
    PuraVidaOTN Member Posts: 14
    I did not say that schema owner cannot insert into its own table,
    dba_audit_trail did.

    This question is like asking when 1 plus 1 does not equal 2.
    The answer is when you made a mistake.

    Here the answer is when there is an Oracle bug, and the bug is
    documented here in this doc ID 1287914.1.

    My Oracle version is 11.2.0.1. The problem exists in 10.2.0.1 to 11.2.0.2.
    It is fixed in 11.2.0.3 according to the document.

    Thanks.
This discussion has been closed.