Can someone explain ORA-29861 error in plain english and its possible cause? Can someone explain ORA-29861 error in plain english and its possible cause? oracle oracle

Can someone explain ORA-29861 error in plain english and its possible cause?


To locate broken index use:

select index_name,index_type,status,domidx_status,domidx_opstatus from user_indexes where index_type like '%DOMAIN%' and (domidx_status <> 'VALID' or domidx_opstatus <> 'VALID');

To rebuild the index use:

alter index INDEX_NAME rebuild;


Domain indexes are a special type of index. It is possible to build our own using OCI but the chances are you're using one of the index types offered by Oracle Text. I say this as your table seems to include free text columns.

The most commonly used Text index is the CTXSYS.CONTEXT index type. The point about this index type is that it is not maintained transactionally, so as to minimize the effort involved in indexing large documents. This means when you insert or update a document into your table it is not indexed immediately. Instead is that a background process, such as a database job, which kicks off the index synchronization on a regular basis. The index is unusable while it is being synchronized. If the resync fails for any reason then you will need to drop and recreate the index.

Is this a regular occurrence for you? If so you may need to re-appraise your application. Perhaps a different sort of index (such as CTXSYS.CTXCAT) might be more appropriate. One thing which strikes me about your error message is that your UPDATE statement touches a lot of columns, including what looks like the primary key. This makes me think you have a single generic update statement which sets every column regardless of whether it has actually changed. This is bad practice with normal indexes; it will kill your application if you are using text indexes.


http://ora-29861.ora-code.com/

Cause: An attempt has been made to access a domain index that is being built or is marked failed by an unsuccessful DDL or is marked unusable by a DDL operation.

Action: Wait if the specified index is marked LOADING Drop the specified index if it is marked FAILED Drop or rebuild the specified index if it is marked UNUSABLE.

That should hopefully be enough context. Can you figure out the problem from that?