当前位置:首页 > Oracle > 正文内容

Oracle 错误信息原文解释

canca18年前 (2007-09-22)Oracle391

1. Dropping Clustered Tables
To drop a cluster, your schema must contain the cluster or you must have the DROP ANY CLUSTER system privilege. You do not have to have additional privileges to drop a cluster that contains tables, even if the clustered tables are not owned by the owner of the cluster.

Clustered tables can be dropped individually without affecting the table's cluster, other clustered tables, or the cluster index. A clustered table is dropped just as a non-clustered table is dropped--with the DROP TABLE statement.


--------------------------------------------------------------------------------
Note:
When you drop a single table from a cluster, Oracle deletes each row of the table individually. To maximize efficiency when you intend to drop an entire cluster, drop the cluster including all tables by using the DROP CLUSTER statement with the INCLUDING TABLES option. Drop an individual table from a cluster (using the DROP TABLE statement) only if you want the rest of the cluster to remain.  


Dropping Cluster Indexes
A cluster index can be dropped without affecting the cluster or its clustered tables. However, clustered tables cannot be used if there is no cluster index; you must re-create the cluster index to allow access to the cluster. Cluster indexes are sometimes dropped as part of the procedure to rebuild a fragmented cluster index.

To drop a cluster that contains no tables, and its cluster index, use the SQL DROP CLUSTER statement. For example, the following statement drops the empty cluster named EMP_DEPT:

2.DROP CLUSTER emp_dept;


If the cluster contains one or more clustered tables and you intend to drop the tables as well, add the INCLUDING TABLES option of the DROP CLUSTER statement, as follows:

DROP CLUSTER emp_dept INCLUDING TABLES;


If the INCLUDING TABLES option is not included and the cluster contains tables, an error is returned.

If one or more tables in a cluster contain primary or unique keys that are referenced by FOREIGN KEY constraints of tables outside the cluster, the cluster cannot be dropped unless the dependent FOREIGN KEY constraints are also dropped. This can be easily done using the CASCADE CONSTRAINTS option of the DROP CLUSTER statement, as shown in the following example:

DROP CLUSTER emp_dept INCLUDING TABLES CASCADE CONSTRAINTS;


Oracle returns an error if you do not use the CASCADE CONSTRAINTS option and constraints exist.


2. drop TYPE typename;

3.
ORA-02303 cannot drop or replace a type with type or table dependent(s)

Cause An attempt was made to drop or replace a type that has dependents.
Action Drop all type(s) and table(s) depending on the type, then retry the operation or use the FORCE option.

扫描二维码推送至手机访问。

版权声明:本文由Ant.Master's Blog发布,如需转载请注明出处。

本文链接:https://iant.work/post/545.html

标签: Oracle
分享给朋友:
返回列表

没有更早的文章了...

下一篇:用java 操作 oracle 日期类型字段

“Oracle 错误信息原文解释” 的相关文章

用java 操作 oracle 日期类型字段

在java对oracle的操作中,日期字段是很头疼的事情,其实仔细研究一下也并不难掌握。 举个例子来说明: 表 book    中有name varchar2(20)//书籍名称,buydate Date //购买日期 两个字段。 已经创建了数据库连接Connect...

oracle中的NVL,NVL2,NULLIF,COALESCE几个通用函数

Oracle中函数以前介绍的字符串处理,日期函数,数学函数,以及转换函数等等,还有一类函数是通用函数。主要有:NVL,NVL2,NULLIF,COALESCE,这几个函数用在各个类型上都可以。 下面简单介绍一下几个函数的用法。 在介绍这个之前你必须明白什么是oracle中的空值null 1.NVL函...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。