Home > Ask the Oracle Database / Applications Experts > Oracle database design and architecture Questions & Answers > ORA-00054 error with shell scripts
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

ORA-00054 error with shell scripts

Brian Peasland EXPERT RESPONSE FROM: Brian Peasland

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Oracle tips, scripts, and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 14 September 2005
I have written a shell script that calls a SQL. This SQL in turn truncates a temp that belongs only to that program. These shell scripts run in batches that are scheduled. At times I get the error "ORA-00054: resource busy and acquire with NOWAIT specified." I get this error when I try to truncate the temp table. Since the temp belongs only to this particular program there is no chance of some other program locking this table. Since these are scheduled jobs, I am not able to check in the V$SESSION table also. This error does not occur every day but occurs quite often. Can you please tell me the actual reason for this problem?

>
The TRUNCATE TABLE command is a DDL command. Unlike DML commands (INSERT, UPDATE, DELETE), a DDL command will not wait for a lock to be released. Instead, the DDL command will fail and the ORA-00054 error will be raised.

Temporary tables do not belong to a program. If your TRUNCATE TABLE command is resulting in the ORA-00054 error, then some lock, even a shared lock, is causing this problem. It could be that a previous execution of your code has not released the locks, or that some other program or code has the lock. The only way to know for sure is to query V$LOCK at the time this happens. Querying V$LOCK, and subsequently V$SESSION, will show you who has locked your object. On my web site, I have a white paper titled "Solving User Problems." This paper shows you how to query V$LOCK for the information you seek.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Oracle database design and architecture
Why am I receiving Oracle memory allocation errors?
How to join two tables with unique keys in Oracle
How does the Oracle LGWR write to online redo log files?
Can I check an Oracle instance without logging into the Oracle server?
How to use V$SEGMENT_STATISTICS to find the most accessed Oracle table
Can I install an Oracle client on Windows 7?
How to use the Oracle Database Upgrade Assistant (DBUA)
Can I specify Oracle column order in my database table?
Can I have a single Oracle 11g RAC instance across multiple databases?
How to use the Oracle export utility to duplicate database structure

Oracle database design and architecture
Why am I receiving Oracle memory allocation errors?
How to join two tables with unique keys in Oracle
Can I check an Oracle instance without logging into the Oracle server?
How does the Oracle LGWR write to online redo log files?
How to determine your SQL database through needs analysis
Breaking down the contenders in the SQL database market
The MySQL open source database in the enterprise
Diving deeper into the SQL database features
What managers should consider when starting a database scaling project
How to use V$SEGMENT_STATISTICS to find the most accessed Oracle table

Oracle error messages
Why am I receiving Oracle memory allocation errors?
Oracle tutorial library: SearchOracle.com's learning guides
Oracle error 6550 may mean incorrect Oracle export version
Why does the archive log in Oracle give me the ORA-16032 error?
Are we getting the ORA-00382 error because we're at maximum block size?
How do I solve the ORA-00257 error in Oracle?
Solving common Oracle errors guide
Error during RMAN backup
ORA-12560 error with Oracle 10g Instant Client
Unable to view Oracle tables in NetBeans

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
E. F. Codd  (SearchOracle.com)
extent  (SearchOracle.com)
flexfield  (SearchOracle.com)
foreign key  (SearchOracle.com)
multidimensional database  (SearchOracle.com)
object-oriented database management system  (SearchOracle.com)
quad tree  (SearchOracle.com)
relational online analytical processing  (SearchOracle.com)
row  (SearchOracle.com)
splay tree  (SearchOracle.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts