How to resolve a Ora-04021 error when compiling a stored procedure

Source: Internet
Author: User

Compile the stored procedure when the program dies, waiting for a ora-04021 error resolution:

1. May be locked

View V$lockedselect B.sid,b.serial#,b.machine,b.terminal,b.program,b.process,b.status from V$lock A, v$session b

where A.sid = B.sid

sid,serial# with deadlock session see if this is for your own users, and then kill the session

2. May be suspended

View V$session_waitselect b.serial#,a.* from v$session_wait a,v$session bwhere a.sid = b.sid The SID and Serial# of the waiting session

3. View Dba_ddl_locksselect session_id Sid, Owner, name, Type,mode_held held, mode_requested request

From Dba_ddl_locks

where name = ' &your_package_name '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.