SQL & PL/SQL :: Resource Busy While Creating Constraint
Apr 6, 2012
i am working in scott's schema and i want to create foreign key on new table that is "test" table ,structure is----
create table test(id number, name varchar2(20),dno number,pno number);
and now create a foreign key on id column of "test" table reffering the empno of "emp" table which has pk already. but it shows an error-------"ora-ORA-00054-resource busy and acquire with NOWAIT specified or timeout expired"
while i have create the "test" table just 1 min ago.
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?
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?
and i get ORA-00054 resource busy and acquire with NOWAIT specified or timed expired
This table is of 600 Gb in size and no more used and not involved in any logical and physical backup and do not referenced by application but still i am getting this error.i search for this error and found which is to "Wait and retry" but i waited and then apply but still no progress.
I have a table where I want user to fill in unique values for a field which is easy to do.
Problem is sometimes the values can be null so an ordinary unique constraint does not work because multiple null records. Is there a way of validating only non null values to ensure all data entered that is non null is unique?
i want to get table name, constraint name, constraint type with join processes in string type. this is what i want: alter table tablename add constraint constraintname constrainttype(columnname)
I noticed oracle background process ora_fbda_padwsdpr is suffering from buffer busy wait. When i further finding the object, it was on SYS_FBA_FA tables.
what is this is causing BUFFER BUSY WAIT. Also to add we have disabled flashback database.
Is there any relationship b/w tuning BUFFER CACHE and BUFFER BUSY WAITS?
1) Buffer Busy Waits are happening as the User process found the same Datablock is being used by another user in the BUFFER CACHE. 2) And also happens, when the server process found the same Datablock are being used in the Datafile.
I have one form in which I need to change cursor style to busy while doing some process and after completing that process cursor should get to default.I have done changing cursor style but during its busy state it is allowing me to change values or click buttons.It should not allow user to change anything or click any button.
I am trying to create the Physical StandBy Database in the same server. Till last 2 Final steps, everything went on well. In the final steps, when I try to open the StandBy Database, it throws the following Error:
******************************************************* SQL...> alter database open; alter database open * ERROR at line 1: ORA-01154: database busy. Open, close, mount, and dismount not allowed now *******************************************************
I tried creating the Physical Standby with the following Steps.
Environment: Oracle Release 10.2.0.1.0 / Windows 2003 Server Enterprise Edition SP2 Primary DB = 'PrimDB' StandBy DB to be created ='StBy1DB'
In the same Server, location for
PrimDB datafiles='F:oracleproduct10.2.0oradataPrimDBData', StandBy Datafiles='E:StandBy_DBData' PrimDB Control Files='F:oracleproduct10.2.0oradataPrimDBControl' StandBy Control Files= 'E:StandBy_DBControl'
[code]....
Step 1 Create the Oracle Service for StandBy DB "StBy1DB' and Create the Standy DB Password file.
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 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'.
am trying to load java resource in oracle llgr2 using load java. It shows resource loaded but I am not able find it in database dictionary. I configured JVM also on database and gave all the neccessary grants. whenever I am trying to encrpt it give me
SQL> select banner from v$version 2 ; Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production PL/SQL Release 11.2.0.1.0 - Production CORE 11.2.0.1.0 Production TNS for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production NLSRTL Version 11.2.0.1.0 - Production
I am database developer and suddenly i have been given a DBA work. I have to monitor database for resource intensive queries , whether i/o is more , process memory and many other stuffs.
Provide me some sql queries or scripts which shows that process are over loaded and memory needs to be allocated, queries are taking long time , i/o operation are more instead of memory.
I have a requirement where I need to group sessions which takes time as given below when ran individually .There are a total of 32 sesions.I want to divide them into 7 groups.I want to submit each one of the 7 groups in a job.So there will be seven jobs on the whole.Execution flow will be group 1 completes ,then group 2 starts like that.Actually I don't want to bombard the database at a time with 32 jobs ,hence the idea of grouping 32 jobs among 7 groups.grouping the sessions so that on the whole ,resources are equally allocated among sessions in a group and which in turn makes the process complete faster. I want to achieve parallelism but at the same time database should not be loaded too much.I just want to know is there any good practice from oracle side while doing this type of grouping. I am planning to group the most time taking one with least time taking jobs.
I am using dbms_sqltune package to tune some resource intensive queries. In this I am looking to know how Sql profile works
I created task for one sql using dbms_sqltune, then in Report it was recommended to accept its sql profile (which will potentially benefits 65%) then accepted that sql profile with
and re-executed same query but NO difference in time. Then, what that mentioned potentially benefit 65% is about.
1) Originally query is taking 10 sec to execute, with this 65% i thought that it will execute within 3-4 sec. Is it right? 2)Also, the query for which i have created tuning task has some hardcoded input values, what if i change input values next time, will that profile works with new input values?
FINDINGS SECTION (1 finding) ------------------------------------------------------------------------------- 1- SQL Profile Finding (see explain plans section below) -------------------------------------------------------- A potentially better execution plan was found for this statement.
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]....
Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ SQL*Net message to client 13 0.00 0.00 SQL*Net more data to client 24 0.00 0.00 SQL*Net message from client 13 5.33 5.47
Misses in library cache during parse: 1 Optimizer mode: ALL_ROWS Parsing user id: 3139
No Row Source Operation information here Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ SQL*Net message to client 1 0.00 0.00 db file sequential read 73062 0.25 692.23 db file scattered read 16099 0.18 76.65 latch: shared pool 4 0.02 0.03 latch: cache buffers chains 3 0.04 0.04 latch free 16 0.00 0.00
I am using Release 11.2.0.3.0 - 64bit Production version of oracle. Now we are having 3-tier architecture, (firewal/web/app/DB).Now i saw , some of the 'sql' queries, running till ~10hrs in my database and those are part of application(module JDBC THIN CLIENT). After had a talk java guys, they ask to kill the sessions specific to those queries. They are part of search TO, in which user put some large values for the date range and went to other TAB, but these queries gets running infinitely in the database, and user is not interested in the result set.
So how to avoid these things, as because in past, our database has suffered resource contention leading to application slowness. So i was planing to set different timeouts using 'database resource consumer group' for online user request and batch request depending on the app server(that is by machine names) request.
So i have done below set up in my local to test one scenario, in which i will try give a database call from difference machine, and it should get timeout after the specified duration. But its not working , as expected. The calls from the specified machine are not getting assigned to the created 'Consumer group'.
Begin -- create the pending area dbms_resource_manager.create_pending_area(); END; / BEGIN -- Create the consumer group
[code]....
After this when i am verifying calls from machine, 'LR9XY7T8' they are belongs to the consumer group 'OTHER_GROUPS' and sql query not getting timed out within 60 seconds as mentioned.
How can I find out the particular oracle session which was consuming high memory in the past?
I can't get the data in v$sessstat Unable to get the information in AWR
dba_hist_active_session_history do not have field which indicate memory related information Shall I concetrate on EVENT in dba_hist_active_session_history which continuosly had sort, direct path read Or Locate sql_id from dba_hist_sqlstat with high SORTS_DELTA for snapshots belonging to problematic time period and then using the sql_id query dba_hist_active_session_history
which approach I shall take to find out the session which consumed most memory in the past?
We are in 11gR2 in windows 2008. Our database is 2 nodes rac. I got alert message below.
Host=xxxx.xxxx.xxxx.xx.xxTarget type=Cluster Target name=ora-scan Message=ora.registry.acfs has 1 instances in INTERMEDIATE State Severity=Warning Event reported time=Oct 17, 2013 6:40:45 AM EDT Operating System=Windows Platform=x64 Associated Incident Id=xxxx Associated Incident Status= New Associated Incident Owner=SYSMAN Associated Incident Acknowledged By Owner=No Associated Incident Priority=Low Associated Incident Escalation Level=0 Event Type=Metric Alert Event name=resource_status:crs_event_composite_status Metric Group=Resource StateMetric= State ChangeMetric value=PARTIALLY_INTERMEDIATEKey Value=resource_ora.registry.acfs.type_ora.registry.acfsKey Column 1=KeyRule Name=EDC - Metric Alert,Warning Rule Owner=SYSMAN Update Details:ora.registry.acfs has 1 instances in INTERMEDIATE State Incident created by rule (Name = EDC - Metric Alert, Warning; Owner = SYSMAN).
I did check the cluster resources by srvctl status resource -t and all of resources are in online and none of them i saw in intermediate state. Is there any other command and option to investigate this error?
I have found the below information in alert log of 2 nodes.
Version 10.2.0.5.0 OS :AIX
Suddenly instances were shutdown and restarted again.
Reconfiguration started (old inc 0, new inc 64) List of nodes: 0 1 Global Resource Directory frozen * allocate domain 0, invalid = TRUE Communication channels reestablished * domain 0 valid = 1 according to instance 0 Fri Dec 28 04:19:18 GMT 2012 [code]....
Does cache buffer chain latch and buffer busy wait event are related to one any another.
Latch definition from Google says : Latches are simple, low-level serialization mechanisms to protect shared data structures in the system global area (SGA).
what does it mean my protect. Does this mean protects from aging as per LRU algorithm and getting removed from SGA or protect from other processes ,say from example from simultaneously DML operations. or both
Does buffer busy wait event occurs , because of the cache buffer chain latch ?
Statspack has been configured for Active Dataguard on Primary database.We got an spike of Buffer busy waits for about 5 min in Active Dataguard, this was causing worse Application SQL's response time during this 5 min window.Below is what i got from statspack report for one hour
Snapshot Snap Id Snap Time Sessions Curs/Sess Comment ~~~~~~~~ ---------- ------------------ -------- --------- ------------------- Begin Snap: 18611 21-Feb-13 22:00:02 236 2.2 End Snap: 18613 21-Feb-13 23:00:02 237 2.1 Elapsed: 60.00 (mins) [code]...
Why there could sudden spike of demand on UNDO data in Active Data Guard ?
I'd like to call an existing function/procedure from a resource template. For example, I have a procedure called 'rest' with an out parameter of 'p_out' - how do I use this within a resource template?
At the moment I have defined the template as type 'PL/SQL Block' and with the 'GET' defined as:
begin myschema.rest(:p_out); end;
APEX_PUBLIC_USER has been granted 'all' on the procedure. The p_out is populated with a piece of text.
When I call this resource, I get a '500 Internal Error' returned. I've tried adding p_out as an X-APEX-FORWARD parameter, but nothing seems to work.