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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Making a table readonly?

RE: Making a table readonly?

From: Gogala, Mladen <MGogala_at_allegientsystems.com>
Date: Mon, 19 Sep 2005 14:57:03 -0400
Message-ID: <A2C7821363A0544987988F6BCCE941B5060827@pegasus.lawaudit.com>


Trigger would look something like this:

  1 create trigger rd_only

  2 before insert or delete or update

  3 on emp

  4 begin

  5 raise program_error;

  6* end;

SQL> /   Trigger created.  

SQL> delete from emp where empno > 6500;

delete from emp where empno > 6500

            *

ERROR at line 1:

ORA-06501: PL/SQL: program error

ORA-06512: at "SCOTT.RD_ONLY", line 2

ORA-04088: error during execution of trigger 'SCOTT.RD_ONLY'  

--

Mladen Gogala

Ext. 121


From: rjamya [mailto:rjamya_at_gmail.com]
Sent: Monday, September 19, 2005 2:12 PM To: Muru.Balakrishnan_at_echostar.com
Cc: Oracle Discussion List
Subject: Re: Making a table readonly?  

create a trigger on the table in question from sys account. In this trigger disallow insert/update/delete. Since the trigger will be owned by non-owner, it would be difficult to circumvent in normal circumstances.

Raj

On 9/19/05, Balakrishnan, Muru <Muru.Balakrishnan_at_echostar.com <mailto:Muru.Balakrishnan_at_echostar.com> > wrote:

The system is already in production, the options below are remote. I was trying to find out if there was another way that I was not aware of. Thanks to all of you for your time!

--

http://www.freelists.org/webpage/oracle-l Received on Mon Sep 19 2005 - 13:57:41 CDT

Original text of this message

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