Getting Deadlock Detected While Waiting For Resource Error For Select Query
Nov 4, 2013
i am getting a below error whenever executing the below select query. some times it will show dead lock detected while waiting for resource and terminated...some times it executes and gives result..but all the time it writes an alert to alert log
Env: Linux / Oracle 11.2.0.3.3..Error from alert log:Errors in file /u01/oracle/oracle/diag/rdbms/bdrdb/bdrdb/trace/bdrdb_p017_6076.trc:ORA-00060: deadlock detected while waiting for resourceORA-10387: parallel query server interrupt (normal) Trace file info... bdrdb_p017_6076.trc:Trace file /u01/oracle/oracle/diag/rdbms/bdrdb/bdrdb/trace/bdrdb_p017_6076.trcOracle Database 11g Enterprise Edition Release 11.2.0.3.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsORACLE_HOME = /u01/oracle/oracle/product/11.2.0/dbhome_1System.
[code]....
I keep getting an ora-04020: deadlock detected while trying to lock object XDB. SDNRB..The statement I'm trying to issue is:
REVOKE execute on abc."descript_T" FROM PUBLIC;
I am not able to find a solution for this besides the fact of trying the operation again at a later time.I did, but get the same error every single time.
I am using oracle 10.2.0.3 and i am receiving very slow response time for the below query and sometimes resulting in a deadlock throwing ora-60 error.
DELETE FROM GBC_CORE.SPI_ELEMENT_ID TRGT WHERE (TRGT.URI) NOT IN ( SELECT DISTINCT FROMTOURI.URI FROM ( SELECT SERVICEACCESSNAME AS URI, SUBSTR( SERVICEACCESSNAME,1,INSTR( SERVICEACCESSNAME ,'_')-1) AS FROM_URI, SUBSTR( SERVICEACCESSNAME,INSTR( SERVICEACCESSNAME ,'_')+1,LENGTH(SERVICEACCESSNAME)) AS TO_URI FROM TRPT.V_TRPT_SPI_VIEW@DBLNK_FCE_TRPT ) FROMTOURI, [code]...
[oracle@localhost Desktop]$ netca Oracle Net Services Configuration: # An unexpected error has been detected by HotSpot Virtual Machine: # SIGSEGV (0xb) at pc=0xa23ae762, pid=7422, tid=3075933888 # Java VM: Java HotSpot™ Server VM (1.5.0_17-b02 mixed mode) # Problematic frame: # C [libclntsh.so.11.1+0x429762] snlinGetAddrInfo+0x1b2
An error report file with more information is saved as hs_err_pid7422.log
#If you would like to submit a bug report, {URL}...
A batch job was running for a long time which executes a stored procedure that was doing physical deletes on an oracle table. This job ran for about 3 hrs and is still executing. Meanwhile another job(which was making indexes unusable in another table) has cancelled saying "resource busy and acquire with NOWAIT specified", i think it was ORA-0054! So i killed the first job and reran the second thinking the first one was taking up resources which resulted in the cancel of the second job. Now the second job ran successfully. Both these tables are not related to each other whatsoever...but why was there a cancel?
how do I create a procedure for a SELECT query like the following?
When I create a procedure; I get an error "Error(80,1): PLS-00428: an INTO clause is expected in this SELECT statement" PROCEDURE MyProcISBEGINselect 'Dakota' as ALIAS ,A.StartDate ,B.EndDatefrom Customer A ,Clients bwhere a.cType = b.cTypeand b.Active =0ORDER BY StartDate, EndDateEND MyProc;
I am working on 11g and AIX...We got deadlock recently and we need to investigate why it happen and resolution, so it will not happen in future. When we saw deadlock trace file ,it shows 2 sqls queries on different tables..and lock is exclusive lock.
----- Information for the OTHER waiting sessions ----- SELECT 1 FROM HOS_DTL WHERE ( HOS_LCN_DTL.HOS_LCN_DTL_ID = :1 ) FOR UPDATE WAIT 180
and
----- Current SQL Statement for this session ------ DELETE FROM EI_INV WHERE ( EI_INV.EI_INV_ID = :1 )
But these two tables not related at all 'HOS_DTL' and 'EI_INV' . Can deadlock happen if sqls queries fired on those table are not related at all and deadlock trace file can show those two sqls ..?
I have a problem with a statement that normally execute in few second but after 50h the session is still active and is still waiting for null event.
V$session_wait
EVENT WAIT_TIME SECONDS_IN_WAIT STATE ---------------------------------------------------------------- ---------- --------------- ------------------- null event -1 178737 WAITED KNOWN TIME V$session
SID STATUS PROGRAM LAST_CALL_ET ---------- -------- ------------------------------------------------ ------------ 364 ACTIVE f90runm@CENTRAL1 (TNS V1-V3) 178737
My Oracle version : Oracle9i Enterprise Edition Release 9.2.0.2.0 - 64bit Production System version : HP-UX V1
I tried tracing the session but no trace file is generated it same there is no activity.
While i am trying to execute below mentioned query i am facing "DEADLOCK FOUND WHEN TRYING TO GET LOCK" error.
UPDATE PLAN SET PLAN_PMS_BLOCK_ID ='' WHERE PLAN_PMS_BLOCK_ID<>'' AND PLAN_PMS_BLOCK_ID NOT BETWEEN '0' AND '9' AND PLAN_PMS_BLOCK_ID NOT BETWEEN 'A' AND 'Z' AND PLAN_PMS_BLOCK_ID NOT IN('-') AND LENGTH(PLAN_PMS_BLOCK_ID )=1;
i'm keep on getting below error every morning in my Database.this indicate in Grid control every morning.
Metrics "Database Time Spent Waiting (%)" is at 34.336 for event class "Concurrency" Metrics "Database Time Spent Waiting (%)" is at 100 for event class "Other" Metrics "Database Time Spent Waiting (%)" is at 44.78 for event class "Other"
i need to know, this is something that i should consider as a critical warning and how can i solve this .
Installation Oracle Database 11g Release 2 RAC On Linux Using VMware Server folowing error occured
Software = Grid Infrastructure 11.2.0.1 RAC installation on VMware two node linux machine. Windows 7 Machine 8 GB Ram LInux node 1 and node 2 with 2.5 GB RAM
Node 1: root.sh script run successfully.
NOde 2: root.sh script given following error.
CRS-2672: Attempting to start 'ora.crsd' on 'rac2' CRS-2676: Start of 'ora.crsd' on 'rac2' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'rac2' CRS-2676: Start of 'ora.evmd' on 'rac2' succeeded
Most of my day to day work involves the support of DB2 on AIX and z/OS. I support the database infrastructure for one business system that runs on the Oracle RDBMS. The application is Oracle Transportation Management. The non-production environments don't get much traffic. If I sign into the TEST or DEV Enterprise Manager DB Control screen, the following warning is almost always listed on the main page:
Metrics "Database Time Spent Waiting (%)" is at 44.00384 for event class "Concurrency"
Enterprise Manager reports that this metric is continuously fluctuating above and below the warning threshold of 30% of db time when the environment is idle.To investigate(and I am no oracle expert, far from it), I ran the following:
SELECT * FROM v$session_event WHERE WAIT_CLASS='Concurrency' ORDER BY TOTAL_WAITS DESC;
By far, the top two entries in the result are the following: SIDEVENTTOTAL_WAITSTIME_WAITEDAVERAGE_WAITMAX_WAIT 124os thread startup12041423733.5218 359os thread startup150653433.5521 [code]...
Does this indicate a possible problem with the operating system?
Is there a technique to getting a Top-N query to work as a sub-select in a larger query -or- is there another way to generate Top-N like results that works as a sub-select?
Background:
We have a large query that is being used to build an export from a legacy HR system to a new one. Amount the data needed in the export is the employees primary phone number.
The legacy HR system allows multiple phone numbers to be stored in a simple table structure:
SELECT emp_id, phone_type, phone_number FROM employee_phones
The new HR system does allow for multiple phone numbers, however they need a primary phone number identified and stored with the employee master information. (Subsequent phone numbers get stored in alternate table.)
From a business perspective, we have decided that if they have a HOME phone in the legacy system that should be the primary in the new system, if no HOME phone, then WORK, if no WORK then CELL.
That can be represented as:
SELECT * FROM employee_people_phones WHERE emp_id = '46021' ORDER BY decode(phone_type, 'HOME', 'a', 'WORK', 'b', 'CELL', 'c', 'z')
SELECT * FROM (SELECT * FROM employee_people_phones WHERE emp_id = '46021' ORDER BY decode(phone_type, 'HOME', 'a', 'WORK', 'b', 'CELL', 'c', 'z')) results WHERE ROWNUM = 1
SELECT phone_number FROM (SELECT phone_number FROM employee_people_phones WHERE emp_id = '46021' ORDER BY decode(phone_type, 'HOME', 'a', 'WORK', 'b', 'CELL', 'c', 'z')) results WHERE ROWNUM = 1
phone_number ------------------- 1111111111
However, when the Top-N query is added as a sub-select in a larger query using the employee id from the larger query (WHERE emp_id = export.emp_id), it fails saying that �export.emp_id� is not a valid id.
(SELECT phone_number FROM (SELECT phone_number FROM employee_people_phones WHERE emp_id = export.emp_id ORDER BY decode(phone_type, 'HOME', 'a', 'WORK', 'b', 'CELL', 'c', 'z')) results WHERE ROWNUM = 1)
1.Any way around this? Is it possible to put a Top-N (with a WHERE clause using data from the main query) in a sub-select?
2.Any alternatives (other than Top-N) to delivering a ROWNUM=1 result with a �custom� ORDER BY statement?
Other Notes: Yes, we know we could do two queries in the data conversion first deliver the bulk data to the target table, and then update with the phone numbers. However, for multiple reasons, that is less than desirable.
I have created a Package named pkg_pur_order which consists of a function and a Procedure.I have declared the procedure as Autonmous_ Transaction. But whenever I try to execute this procedure it fails and I get error msg as :
exec pkg_pur_order.prc_orders ORA-06519: active autonomous transaction detected and rolled back ORA-06512: at "DBO.PRC_WRITE_LOG", line 13 ORA-06512: at "DBO.PKG_PUR_ORDER", line 36 ORA-00001: unique constraint (DBO.SYS_C00138632) violated ORA-06512: at line 1 [code]....
I am facing Deadlock issue in my transaction when record is been deleted in the same table in parallel from a PLSQL package. The package is been called from the Java code.The example and the table structure is given below.
Col1 of tab1 is foreign key to col1 of tab2. Commit will not be done until all the below dml scripts are executed in both environment.
1st session:
Delete from tab1 where col1=1001; Delete from tab2 where col1=2001;
Result: Deletion successful
2nd session:
Delete from tab1 where col1=1002; Delete from tab2 where col1=2002;
Result: Deletion successful
1st session:
Delete from tab1 where col1=1003; Delete from tab2 where col1=2003;
Result: Deletion successful
2nd session:
Delete from tab1 where col1=1004; Delete from tab2 where col1=2004;
Result: Query is executing for a longer time.
1st session:
Delete from tab1 where col1=1003; Delete from tab2 where col1=2003;
Result: Query is not executed and throws Deadlock in the back end.
When i try to compile a package, im getting below error.
ERROR at line 1:ORA-04021: timeout occurred while waiting to lock object
i gave below query and found the sid of object.
select * from v$access where object='THINKING_PKG'
From v$session view,i found sid and serial# and at same time i queried dba_jobs and saw one jobs is running at this time.Now how to compile this object.
I am configuring Grid Infrastructure 11g2 on node A, one of two cluster nodes, and getting the following message: [INS-40916] Single-instance versions of Cluster Synchronization Services (CSS) are detected.
I executed runInstaller and installed software-only on both A and B nodes. It apparently the other node has already CSS instance running, and maybe caused by the installation.I remove the software from A first?
How do I stop CSS on the node A, and let the configuratoin to continue on this node B
I have just migrated database to 11.2 ..Migration is successfull and now database is in open mode working fine.BUT i m getting following mesage in alert log file
"Time drift detected. Please check VKTM trace file for more details."I m using windows platform.
I have a deadlock trace file to analyse and i used to be able to see the rowid as a 16 bit hex value in the trace file, which i could then query on to get the actual real world row name.I see in the 11GR2 deadlock trace the formatting is different and for the life of me i am unable to see the rowid. Has Oracle stopped reporting this now, or is their another way to get this value? The deadlock graph shows me
what could be the reason for a LMSn process not heartbeating after a global enqueue service deadlock was detected? The happened in a 3instance RAC and after the LMS1 process stop heartbeating oe of the instances crashed afterwards and another instance crashed some minutes after. reason for the process crash after resolving deadlock?
prepare data: CREATE TABLE a AS SELECT LEVEL ID ,decode(mod(LEVEL,10),1,'CODE'||LEVEL) CODE from dual CONNECT BY LEVEL<20001;
sql1: CREATE TABLE TEST AS SELECT ID, NVL(CODE,LAG(CODE ignore nulls) OVER(ORDER BY ID )) CODE FROM a;
the sql is slow,most of the waits on session is resmgr:cpu quantum and almost all of the cpu resource is occupied
sql2: CREATE TABLE TEST AS SELECT ID, NVL(CODE,last_value(CODE ignore nulls) OVER(ORDER BY ID ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING)) CODE FROM a;
this sql is fast
How lag function is implemented if the offset is not deterministic?
With this plan active PLAN GROUP_OR_SUBPLAN TYPE CPU_P1 CPU_P2 CPU_P3 x_PLAN x_APP_GROUP CONSUMER_GROUP 75 0 0 x_PLAN x_BO_HIGH_GROUP CONSUMER_GROUP 10 0 0 x_PLAN x_BO_LOW_GROUP CONSUMER_GROUP 5 0 0 x_PLAN OTHER_GROUPS CONSUMER_GROUP 10 0 0
if there is only an user of X_APP_GROUP that is working in a specified moment, he will use the 100% of CPU or il will be limited at 75% as specified in the plan?
I am trying to get to where I can add a RAD (Resource Access Descriptor) to allow connection to an oracle database. Right now I have "No Configuration Privilege" when logging onto Oracle Identity Management.
How to I get to the configuration tab? What privilege do I need?
i have one procedure that run at same time for two different partition.In the begin of the processes i do the truncate partition and after that the insert of data in the partition.Since i have two processes running at the same time, i will fill up data in two different partition.
But it occurred one error : "ORA-00054: resource busy and acquire with NOWAIT specified"
The problem is caused by the truncate partition. I'm doing two simultaneous execution of the same process, but when one process is doing the truncate other is insert data.How can i do the truncate of this two partition, or insert in to, without get any error. I think the two simultaneous insert is not a problem.
So how can i lock the table in the first truncate and after that release the table for the next truncate?
I want to change the processes parameter in RAC system.I am using spfile.I have ASM environment and two instances.
I followed the below steps from first server but i m getting error.
1) connected as sys user 2) alter system set cluster_database=false scope=spfile sid='<firstinstanceid>'; 3) exited from oracle 4) stoped second instance from linux. $ srvctl stop instance -d <DBname> -i <secondinstanceid> 5) Again i connected as sys user. 6) create spfile from pfile; 7) shutting down the db and started.
[code]....
But second instance is not starting and it is giving error.
PRKP-1001 : Error starting instance <sencondinstanceid> on node st-habam-db2
CRS-0215: Could not start resource 'ora.<DBname>.<secondInstanceid>.inst'.