Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: saving username and sysdate on insert/update

Re: saving username and sysdate on insert/update

From: Chris Hamilton <ToneCzar_at_erols.com>
Date: Mon, 19 Apr 1999 13:59:19 GMT
Message-ID: <371b366b.6540765@news.erols.com>


On Mon, 19 Apr 1999 21:14:00 +0800, Andrew Babb <andrewb_at_mail.com> wrote:

>Johnny and Chris,
>
>One problem with using the default columns option. They can be over
>written by SQL*Plus. If you use the trigger route, then there is no
> way that the modification can be falsified.

That's a good point!!! I was making the assumption (always a bad idea) that only the app would be inserting.

>i.e. INSERT INTO tab ( ..., addusr ) values (..., 'FRED');
>
>Also, with the Update, you may want to set ":new.addusr := :old.addusr",
>so that the field cannot be changed. Same with adddte.

Good idea.

>Depends on the level of security you want in the solution.
>
>Just a comment,
>Andrew
>
>BTW - Totally agree with making the columns more meaningful, but try and keep
>under 12 characters (some stupid performance issue with Oracle7 means that column
>names less that 12 characters are processed faster than those longer). I was told
>this by Oracle Consulting.

Interesting - I hadn't heard that -- fixed for Oracle 8, I assume?

Chris



Christopher Hamilton
Oracle DBA -- Wall Street Sports
chris_at_wallstreetsports.com
http://www.wallstreetsports.com/ Received on Mon Apr 19 1999 - 08:59:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US