One of the transactions took a longer time than normal, so the user terminated the session (ctrl+alt+del). Now the table has a ROW-X lock. The following are the details of the lock:
OS User : rosemarie OS PID : 396:482 Oracle User : ROSEM Oracle ID : 27 Lock Type : DML Lock Held : Row-X (SX) Lock Requested : None Status : Not Blocking Object Owner : TOTALPLANT Object Name : CUS_PRODUCTS
We get the following errors on rebuilding an index on this table:
alter index CUS_PRODUCT_IDX1 rebuild tablespace TBSIDX_001 * ERROR at line 1: ORA-00054: resource busy and acquire with NOWAIT specified
I thank you in advance for any help on this.
When the transaction was cancelled, the work that the transaction had done up to that point needed to be rolled back. The longer your transaction ran before cancelling, the longer it will most likely take to roll back completely. Until the transaction has rolled back, a DDL command like ALTER INDEX REBUILD will not be able to obtain the lock that it needs to complete. And this type of command won't wait for the lock to be released either. This is what the ORA-54 error message is telling you. By the time you get this response, your long running transaction should have rolled back. So your ALTER INDEX REBUILD statement should work just fine.
Dozens more answers to tough Oracle questions from Brian Peasland are available.
The Best Oracle Web Links: tips, tutorials, scripts, and more.
Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.