RE: Making a table readonly?

  • From: "Gogala, Mladen" <MGogala@xxxxxxxxxxxxxxxxxxxx>
  • To: "'rjamya@xxxxxxxxx'" <rjamya@xxxxxxxxx>
  • Date: Mon, 19 Sep 2005 14:57:03 -0400

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@xxxxxxxxx] 
Sent: Monday, September 19, 2005 2:12 PM
To: Muru.Balakrishnan@xxxxxxxxxxxx
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@xxxxxxxxxxxx
<mailto:Muru.Balakrishnan@xxxxxxxxxxxx> > 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!

Other related posts: