oracle: SKIP_UNUSABLE_INDEXES参数(ORA-39326)

  • 第一部分说的是初始化参数
SKIP_UNUSABLE_INDEXES enables or disables the use and reporting of tables with unusable indexes or index partitions. If a SQL statement uses a hint that forces the usage of an unusable index, then this hint takes precedence over initialization parameter settings, including SKIP_UNUSABLE_INDEXES. If the optimizer chooses an unusable index, then an ORA-01502 error will result. (See Oracle Database Administrator's Guide for more information about using hints.)
默认是true,就是在表的索引不可用状态的情况,查询和dml会跳过不可用索引,不会报错。如果加了hints,则优先hints的选择,此时会有false的效果。
false时,如果有不可用索引,会使dml语句失败。
报错 ORA-01502: 索引 'BB30.IDX_TT' 或这类索引的分区处于不可用状态

  • impdp里面也有个其实也有个SKIP_UNUSABLE_INDEXES参数
这个参数的意思:
SKIP_UNUSABLE_INDEXES
Skip indexes that were set to the Index Unusable state.
但实际测试时,在导出的dmp文件里包含UNUSABLE的索引时,下面带这个参数,默认是Y,不论设置为y或者n,都会导入UNUSABLE的索引。
impdp system/oracle directory=expdir dumpfile=BB30.DMP logfile=bb30_imp.log SKIP_UNUSABLE_INDEXES=Y

之前在impdp导入时报了个ora-39326错误,所以才对这个参数关注了下。但是可惜当时的记录找不到了。后来测试时也没重现这个错误。ORA-39326: cannot load data into table due to an unusable index.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值