11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 3 ■ DATABASE ADMINISTRATION 133SQL> select index_name, visibility from dba_indexeswhere index_name like '%NAME_IDX%';INDEX_NAME VISIBILITY------------ -----------NAME_IDX2INVISIBLENAME_IDX1INVISIBLESQL>By default, all indexes are visible, unless you explicitly create them as invisible indexes.Read-Only TablesIn earlier releases of the <strong>Oracle</strong> database, you could have read-only tablespaces but not readonlytables. One of the more useful but simple to implement new features in <strong>Oracle</strong> <strong>Database</strong><strong>11</strong>g is the read-only table feature. Simply specify the clause read only in the alter table statementas shown in the following example, where we first create a normal read-write table andthen convert that into a read-only table:SQL> create table test1 (name varchar2(30));Table created.SQL> alter table test1 read only;Table altered.SQL>The new column READ_ONLY in the DBA_TABLES view shows whether a column has readonlystatus. You can return a read-only table to a read-write status by using the read writeclause in the alter table statement, as shown in the following example:SQL> alter table test1 read write;Table altered.SQL>Once you put a table in a read-only mode, you can’t issue any DML statements such asupdate, insert, or delete. You also can’t issue a select for update statement involving a readonlytable. You can issue DDL statements such as drop table and alter table on a read-onlytable, however. You can use the read-only feature to prevent changes to a table’s data duringmaintenance operations. You can perform maintenance operations on any of the indexes thatyou have defined on the read-only table, prior to changing their status to read-only. You can,of course, use this feature for security reasons, where you want to grant users the ability to readbut not modify table data.Temporary Tablespace ManagementThere are several improvements in the management of temporary tablespaces in <strong>Oracle</strong><strong>Database</strong> <strong>11</strong>g. Chief among these are the new capabilities to shrink temporary tablespaces and

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!