Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does Oracle have a TimeStamp like SQL Server?
Message
General information
Forum:
Oracle
Category:
Other
Miscellaneous
Thread ID:
00405498
Message ID:
00407466
Views:
16
Hi Tim,
Thanks for the input. My Oracle-specific knowledge is tiny, so please bear with me... Sorry, but I'm confused.

1) Where does 'user' come from (get its value)? I assume dual is an Oracle System table, which is what Mark queried.

2) Where is this 'preference' you discussed?
TIA,

>Looks like this thread is going pretty well but I'll add my experiences..
>
>First the Code could be simplified a bit:
>
>CREATE OR REPLACE TRIGGER TABLE_NAME_audit_info "
>BEFORE INSERT OR UPDATE ON "'TABLE_NAME"
>FOR EACH ROW
>BEGIN
>IF INSERTING THEN
> :new.user_name := user;
> :new.lastedit := sysdate;
> ELSIF UPDATING THEN
> :new.user_name := user;
> :new.lastedit := sysdate;
>END IF;
>END;
>
>For some reason howver I am not found of these triggers. They tend to add a lot of database IO.
>It surprised me to find that the top two SQL statements on our databases where:
>select sysdate from dual; and
>select user from dual;
>
>I couldn't figure out why because you would think the dual table when queried would not need any IO.
>But from database statistic it seemed to do so. Oracle said it was because the query needs to create temp space.
>
>Anyways I just added a preference to disable the triggers so that DBA didn't complain about the IO if they did a
>TOP SQL query....
>
>Anways the IO should be negligible in my opinion but I had to take the DBA's experiece into consideration that brought this to my attention.
Bill Armbrecht
VFP MCP
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform