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: Asif Merchant <asif.merchant_at_gmail.com>
Date: 19 Oct 2004 14:53:59 -0700
Message-ID: <4d907138.0410191353.4b2b5301@posting.google.com>


SQL> create table t2 ( c1 int,c2 varchar2(10), constraint pk_t1 primary key(c1)
 2 deferrable initially immediate )
 3 /

Table created.

SQL> insert into t2 values (1, 'A');

1 row created.

SQL> commit;

Commit complete.

SQL> alter table t2 modify constraint pk_t1 disable validate;

SQL> insert into t2 values (1,'B');
insert into t2 values (1,'B')
*
ERROR at line 1:
ORA-25128: No insert/update/delete on table with constraint (TESTUSER123.PK_T1) disabled and validated

SQL> select * from t2;

       C1 C2
---------- ----------

        1 A

DA Morgan <damorgan_at_x.washington.edu> wrote in message news:<1098158539.523979_at_yasure>...
> Ralf Zwanziger wrote:
>
> > 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
>
> For the table owner ... No!
>
> But if another schema ... just grant SELECT and don't grant any other
> object privilege.
Received on Tue Oct 19 2004 - 16:53:59 CDT

Original text of this message

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