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: Make table read-only

Re: Make table read-only

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Mon, 18 Oct 2004 21:56:55 +0200
Message-ID: <41741f3a$0$29857$626a14ce@news.free.fr>

"Howard J. Rogers" <hjr_at_dizwell.com> a écrit dans le message de news:41741292$0$20129$afc38c87_at_news.optusnet.com.au...
> "Michel Cadot" <micadot{at}altern{dot}org> wrote:
>
> >
> > "Ralf Zwanziger" <ralf_on_duty_at_gmx.de> a crit dans le message de
> > news:7n57n0t979rtkrvpcploqj7u37fqk9k6gu_at_4ax.com...
> >> Is ist possible to make an oracle table read-only?
> >> (without moving it to a read-only tablespace).
> >> I haven't found any command like "alter table xxx read only" in the
> >> docs.
> >>
> >> Bye,
> >> Ralf
> >>
> >
> > You can add a trigger before insert, update or delete that raise an error,
> > something like:
> >
> > create or replace my_trigger
> > before insert or update or delete on my_table
> > begin
> > raise_application_error (-20001,'Updating the table is not allowed');
> > end;
> > /
> >
> > This will work for all including the owner of the table.
>
> Except of course thatinsert triggers don't fire if you are doing a direct
> load insert or a direct path SQL Loader load.

You're perfectly right!

>
> So yes, it's a good point, but it doesn't *necessarily* achieve what the
> user wanted.
>
> Regards
> HJR
>
>
Received on Mon Oct 18 2004 - 14:56:55 CDT

Original text of this message

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