Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

AUDIT DDL trigger / table causing issues

FBP_FLUORNov 23 2020 — edited Nov 23 2020

i have a newly upgraded 19c db from 12c. It has a table, SYSTEM.AUDIT_DDL which is:

CREATE TABLE SYSTEM.AUDIT_DDL
(
D DATE,
OSUSER VARCHAR2(255 BYTE),
CURRENT_USER VARCHAR2(255 BYTE),
HOST VARCHAR2(255 BYTE),
TERMINAL VARCHAR2(255 BYTE),
OWNER VARCHAR2(30 BYTE),
TYPE VARCHAR2(30 BYTE),
NAME VARCHAR2(30 BYTE),
SYSEVENT VARCHAR2(30 BYTE)
)
TABLESPACE TRKP_DDL_MONITOR_TS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 20M
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
)
LOGGING
NOCOMPRESS
NOCACHE;

and a trigger to insert into the AUDIT_DDL table,

CREATE OR REPLACE TRIGGER SYSTEM.AUDIT_DDL_TRG after ddl on database
begin
if (ora_sysevent='TRUNCATE')
then
null; -- I do not care about truncate
elsif ora_dict_obj_owner!='SYS' then
insert into audit_ddl(d, osuser,current_user,host,terminal,owner,type,name,sysevent)
values(
sysdate,
sys_context('USERENV','OS_USER') ,
sys_context('USERENV','CURRENT_USER') ,
sys_context('USERENV','HOST') ,
sys_context('USERENV','TERMINAL') ,
ora_dict_obj_owner,
ora_dict_obj_type,
ora_dict_obj_name,
ora_sysevent
);
end if;
end;
/

problem is on my old db it would insert the name of an object like
NAME: ObjName
and on the new on it inserts the full path like
/some/server/path/ObjName

and the new way is causing things to fail because the new "name" is longer than the allowed 30 Bytes that table will hold for NAME.
i can update the table to make the name column longer, sure, but why is this difference appearing? I feel like i may be missing something simple here. Thanks in advance for your answers! Have a great day!

This post has been answered by Jonathan Lewis on Nov 28 2020
Jump to Answer

Comments

807599
because there was a meeting and it was decided so. you weren't invited. maybe had you been there, you could have made an intelligent and convincing argument for the inclusing of multiple inheritence. feel free to make this statement via the bug report system, and maybe it will be given consideration. you can probably even support an existing bug report/feature request for it.

of course you'd know all this if you bothered to SEARCH.
791266
Hai friends ..iam new to java .. i have doubt ..plz
help me
Why java does not support multiple inheritance ???
That questions is very frequently asked. Can you please search the forum, or google.

Kaj
807599
Hai friends ..iam new to java .. i have doubt ..plz
help me
Why java does not support multiple inheritance ???
http://www.google.co.in/search?q=Why+java+doesnt+support+multiple+inheritance&ie=utf-8&oe=utf-8&rls=org.mozilla:en-US:official&client=firefox-a
807599
well it is logical, how can a child have two father or two mother.

Well for <2006 it is impossible for > 2007 i don't know.
807599
well it is logical, how can a child have two father or two mother.
Inheritance in computer programming means something completely different than in biology.

Many people make the mistake by making this analogy: that a subclass is a "child" and its superclass is a "parent". That is not the case.

Maybe it shouldn't have been called "inheritance", because that word seems to confuse people into thinking that it has anything to do with inheritance in the biological sense.
807599
well it is logical, how can a child have two father
or two mother.

Inheritance in computer programming means something
completely different than in biology.

Many people make the mistake by making this analogy:
that a subclass is a "child" and its superclass is a
"parent". That is not the case.

Maybe it shouldn't have been called "inheritance",
because that word seems to confuse people into
thinking that it has anything to do with inheritance
in the biological sense.
This is what Mr xxx java teacher taught us hehehe

well i know it is different from biology..
807599
well it is logical, how can a child have two father or two mother.
Stretching a tenuous analogy is a bad idea. And it is possible for a child to have to mothers, at least in Canada:

http://www.cbc.ca/cp/national/070103/n010302A.html
quote:
An Ontario boy can legally have two mothers and a father, the province's highest court ruled Tuesday.

The same-sex partner of the child's biological mother went to court seeking to also be declared a mother of the boy...
807599
If you really need multiple inheritance you could try something with interfaces and the implement statement, that's the way you can get something like multiple inheritance in Java.

Ana

Pd something like a father and as many step mothers as you like!!
843785
The reasons for omitting multiple inheritance from the Java language mostly stem from the "simple, object oriented, and familiar" goal.
To understand multiple inheritance, the learner needs some level of expertise like virtual derivations etc in c++. Multiple inheritance will allow method duplication, and throws the learner into confusion which method might be called by the compiler in which scenario at run time.

Even though this answer seems to be funny, this is the actual reason why java omitted multiple inheritance of classes.
But java support multiple inheritance of interfaces. Multiple interface inheritance allows an object to inherit many different method signatures with the caveat that the inheriting object must implement those inherited methods.
796254
thread's over a year and a half old.

did you sign up for a new nic just for this?

%
843785
<3 Abstract & Interface
843785
duffymo wrote:
thread's over a year and a half old.

did you sign up for a new nic just for this?

%
Oh come on. Are you telling me that when there hasn't been a new thread in awhile, you aren't tempted to just search the boards for random topics and post a new answer to every thread that comes up, regardless of whether it was answered or not?
1 - 12

Post Details

Added on Nov 23 2020
2 comments
1,141 views