0

我有一个带有唯一索引的表,我需要将 800,000 行加载到其中。

我更改了索引并使其无法使用。我在我的控制文件中添加了 'options( rows=4000, bindsize=512000, skip_unusable_indexes=TRUE )'。

我仍然收到以下形式的错误:

ORA-01502: index 'x_Unique' or partition of such index is in unusable state

欢迎提出建议

4

2 回答 2

0

You cannot do it with unique indexes. See SKIP_UNUSABLE_INDEXES:

However, indexes that are unique and marked IU are not allowed to skip index maintenance. This rule is enforced by DML operations, and enforced by the direct path load to be consistent with DML.

You probably should drop your index and recreate it after.

于 2009-12-02T15:48:47.773 回答
0

我认为您可以用非唯一索引替换唯一索引,然后在同一列上放置唯一约束。然后可以在加载之前禁用约束并使索引不可用,然后重建索引并在之后重新启用约束。

于 2009-12-02T16:35:20.733 回答