Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
 Phone
 800-766-1884
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

Privacy Policy

 

   
 

ss

Oracle Tips by Burleson 

Dropping a Cluster and Declustering Tables

As with the creation of clusters, dropping a cluster is a multistep function. The first step is to drop the tables in the cluster using the DROP TABLE command. Next, the cluster is dropped with the DROP CLUSTER command. An INCLUDING TABLES clause allows the DBA to drop both the cluster and tables at the same time. The format of the command can be found on the documentation website at technet.oracle.com.

Rather than dropping a cluster’s tables completely, it may be desirable to decluster them and then just drop the cluster and cluster index with the DROP CLUSTER command. The procedure to decluster a table follows:

1.    Create a new table that is a mirror of the existing clustered table—except , of course, it isn’t clustered.

CREATE TABLE new table

AS SELECT * FROM cluster table

Tip  

Remember that “new table” is a different name from “cluster table.”

2.    Drop the clustered table.

      DROP TABLE cluster table

3.    Rename the replacement table.

      RENAME new table TO cluster table

4.    Reassign all grants; create required indexes and constraints.

Tip  

In the sample SQL scripts zip file on  the Wiley website there is a dynamic SQL script that will create a grant script for a specified database object. The script must, of course, be run before the object is dropped.

5.    Drop the cluster.

See Code Depot


www.oracle-script.com

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster



Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   

 

   

 Copyright © 1996 -2016 by Burleson. All rights reserved.


Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks