From oracle-l-bounce@freelists.org  Thu Mar  3 12:16:04 2005
Return-Path: <oracle-l-bounce@freelists.org>
Received: from air891.startdedicated.com (root@localhost)
 by orafaq.com (8.12.10/8.12.10) with ESMTP id j23IG2np007359
 for <oracle-l@orafaq.com>; Thu, 3 Mar 2005 12:16:02 -0600
X-ClientAddr: 206.53.239.180
Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180])
 by air891.startdedicated.com (8.12.10/8.12.10) with ESMTP id j23IFwem007342
 for <oracle-l@orafaq.com>; Thu, 3 Mar 2005 12:15:58 -0600
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0FE8A7DB5A;
 Thu,  3 Mar 2005 12:03:18 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 00633-01; Thu, 3 Mar 2005 12:03:17 -0500 (EST)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 87A567DB43;
 Thu,  3 Mar 2005 12:03:17 -0500 (EST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references;
        b=SD29E0zFuzvV3x9V+eEO1Y4CL9tmTeZPsJDGEo2rgsDh0sJ0NQZChNqLZp65JP1jk9z0ZMipXN4lPkIM7QGsg17vVKyCOoqxLT+4JCrwyUTiI8668gluTWDLSgjtr8ogTb9xQqLe5pPS74aGQrqlZXz8QTOmQXAhy3I0NJt98T8=
Message-ID: <7765c89705030309017e45c42@mail.gmail.com>
Date: Thu, 3 Mar 2005 17:01:08 +0000
From: Niall Litchfield <niall.litchfield@gmail.com>
To: juancarlosreyesp@gmail.com
Subject: Re: how can you protect read-only indexes?
Cc: carmen.rusu@rrc.state.tx.us, oracle-l@freelists.org
In-Reply-To: <cd4305c10503030849224e1d72@mail.gmail.com>
Mime-Version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
References: <s226e0d8.073@gwgate.rrc.state.tx.us>
	 <cd4305c10503030849224e1d72@mail.gmail.com>
X-archive-position: 16886
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-To: oracle-l-bounce@freelists.org
X-original-sender: niall.litchfield@gmail.com
Precedence: normal
Reply-To: niall.litchfield@gmail.com
X-list: oracle-l
X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at avenirtech.net
X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on 
 air891.startdedicated.com
X-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,LINES_OF_YELLING,
 LINES_OF_YELLING_2,UPPERCASE_25_50 autolearn=no version=2.60
X-Spam-Level: 

On Thu, 3 Mar 2005 12:49:24 -0400, Juan Carlos Reyes Pacheco
<juancarlosreyesp@gmail.com> wrote:
> Hi carmen, move to a tablespace, and make it read only.

what like this? read only doesn't necessarily mean what you think.  

SQL>drop tablespace test including contents and datafiles;

Tablespace dropped.

SQL>create tablespace test
  2  datafile 'c:\oracle\product\10.1.0\oradata\test.dbf' size 10m ;

Tablespace created.

SQL>CREATE TABLE T1(C1 NUMBER)
  2  TABLESPACE TEST;

Table created.

SQL>CREATE INDEX IDX1 ON T1(C1) TABLESPACE TEST;

Index created.

SQL>BEGIN
  2  FOR I IN 1..1000
  3  loop
  4  EXECUTE IMMEDIATE ' INSERT INTO T1 VALUES (:1)' USING I;
  5  END loop;
  6  end;
  7  /

PL/SQL procedure successfully completed.

SQL>commit;

Commit complete.

SQL>ALTER TABLESPACE TEST READ ONLY;

Tablespace altered.

SQL>insert into test values (3);
insert into test values (3)
            *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL>insert into t1 values (3);
insert into t1 values (3)
            *
ERROR at line 1:
ORA-00372: file 7 cannot be modified at this time
ORA-01110: data file 7: 'C:\ORACLE\PRODUCT\10.1.0\ORADATA\TEST.DBF'


SQL>DROP INDEX IDX1;

Index dropped.

SQL>DROP TABLE T1;

Table dropped.

SQL>



-- 
Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com
--
http://www.freelists.org/webpage/oracle-l

