ORA-14508:specified VALIDATE INTO table not found

执行analyze table t1 validate structure时报如下错误(t1为分区表):

SQL> !oerr ora 14508
14508, 00000, "specified VALIDATE INTO table not found"
// *Cause:  The specified table either does not exist or user does not have
//          the proper privleges.
// *Action: Specify the correct table to use.

官方文档对analyze命令的一段说明:

The ANALYZE Command
• Performs a logical block check
• Does not mark blocks as soft corrupt; only reports them
• Validates index and table entries

Use the ANALYZE command to validate the structure of a table or table partitions, and index or index partitions. The object to be analyzed must be local and it must be in your own schema or you must have the ANALYZE ANY system privilege. The cascade option validates an object, including all related objects. The advantage of this option is that you can run it in a SQL*Plus session on a specific object, to do an integrity check and to determine if an error is persistent, by running the same analyze command a number of times.
For partitioned tables, ANALYZE also verifies that the row belongs to the correct partition. If the row does not collate correctly, the rowid is inserted into the INVALID_ROWS table.

解决方法:

调用$ORACLE_HOME/rdbms/admin/utlvalid.sql脚本,创建invalid_rows表。

utlvalid.sql的内容如下:

$ cat utlvalid.sql
rem 
Rem Copyright (c) 1990, 1995, 1996, 1998 by Oracle Corporation
Rem NAME
REM    UTLVALID.SQL
Rem  FUNCTION
Rem    Creates the default table for storing the output of the
Rem    analyze validate command on a partitioned table
Rem  NOTES
Rem  MODIFIED
Rem     syeung     06/17/98 - add subpartition_name                            
Rem     mmonajje   05/21/96 - Replace timestamp col name with analyze_timestamp
Rem     sbasu      05/07/96 - Remove echo setting
Rem     ssamu      01/09/96 - new file utlvalid.sql
Rem

create table INVALID_ROWS (
  owner_name         varchar2(30),
  table_name         varchar2(30),
  partition_name     varchar2(30),
  subpartition_name  varchar2(30),
  head_rowid         rowid,
  analyze_timestamp  date
);

SQL> @?/rdbms/admin/utlvalid.sql

表已创建。

SQL> analyze table t1 validate structure;

表已分析。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值