12.2 Data Pump Parallel Import Fails With 'ORA-04021: timeout occurred while waiting to lock object' Error When Creating Foreign Key Constraints on a RAC Database
(Doc ID 2395779.1)
Last updated on OCTOBER 23, 2019
Applies to:
Oracle Database Cloud Schema Service - Version N/A and laterOracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.
NOTE: In the images and/or the document content below, the user information and data used represents fictitious data.
Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.
Symptoms
After upgrade to 12.2, parallel DataPump Import receives 'ORA-4021: timeout occurred while waiting to lock object' errors on RAC when creating foreign key constraints.
For example:
ORA-04021: timeout occurred while waiting to lock object <USER_TEST2>.MD_DATASET
Failing sql is:
ALTER TABLE "<USER_TEST2>"."<MD_DATASET_REFERENCE>" ADD CONSTRAINT "<FK_CONSTRAINT_NAME1>" FOREIGN KEY ("DATASET_ID") REFERENCES "<USER_TEST2>"."<MD_DATASET>" ("ID") ENABLE
ORA-39083: Object type REF_CONSTRAINT:"<USER_TEST2>"."<FK_CONSTRAINT_NAME1>" failed to create with error:
ORA-04021: timeout occurred while waiting to lock object <USER_TEST2>.<MD_VERSION>
Hanganalyze with errorstacks shows, e.g.
short stack: ...ksxpwait_ipclw()+3844<-ksxpwait_int()+22103<-ksxpwait()+845<-ksliwat()+10983<-kslwaitctx()+197<-kjusuc()+9058<-ksipgetctxia()+5359<-ksixpgetia()+167
<-kqlmLock()+3201<-kqlmClusterLock()+209<-kgllkal()+4089 <-kglLock()+1313<-kglget()+290<-kkdlLoadDDL()+2512<-qcdlgbo()+8243<-qcdlgob()+1005<-kkdlcdg2()+781
<-ctcprf1()+780 <-ctcprf()+153<-atbadd()+1068<-atbdrv()+5164<-opiexe()+22778<-opiosq0()+
We clearly see RAC related functions on the stack: kjusuc()+9058<-ksipgetctxia()+5359<-ksixpgetia()+167<-kqlmLock()+3201<-kqlmClusterLock()
This occurs even if CLUSTER=N is used for the import session.
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |