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 a table read only

Re: Make a table read only

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 21 Jun 2001 07:28:23 -0700
Message-ID: <9gt0a703127@drn.newsguy.com>

In article <6pv3jt4bmbm8nbfg9clphtvn7rsl3qrh5c_at_4ax.com>, Paul says...
>
>How can I make a table read only? We are using a POS system that uses
>one login for all users. I need to be able to toggle the table from
>read only to write and back. I am using 7.3.4 on AIX 4.3.1.
>

some options:

o put the table in its own tablespace. You can then alter the tablespace to be read only/read write.

o Use a view of the table for access instead of the table itself. A view can be created/recreate with and with out the READ ONLY clause.

o put a before insert/update/delete trigger on the table that consists soley of:

  begin
    raise_application_error( -20001, 'Table is read only' );   end;

>Thanks,
>
>Paul
>
>Paul R. Johnson
>IT Manager
>Spa Sydell
>pjcace at yahoo dot com
>

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Thu Jun 21 2001 - 09:28:23 CDT

Original text of this message

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