Row Locking In Production

Jan 10, 2013

I am facing the row lock issue in production. I have been trying to resolve the issue but i coud'nt. I traced out by using different queries which sql query is locking which but everything looks good.

And i also checked for connections open and close everything is in good place but unable to resolve the issue. we are running a batch file which runs in every night some of the records are processing and if any one record is failed it is blocking another records.My oracle version is oracle 10.2.0

View 1 Replies


ADVERTISEMENT

SQL & PL/SQL :: How To Know Who Is Locking Table

Apr 12, 2010

I want to Who is locking the table by an SQL statement

View 32 Replies View Related

SQL & PL/SQL :: Locking And Foreign Key Indexes

Sep 1, 2013

Say we have an employee(id_emp) table with a primary key on id_emp. We have also some history tables emp_stuff with columns say (id_emp, dat_event, some_stuff) with primary key id_emp, dat_event.

This means that we have a unique index on (id_emp,dat_event). We also have a foreign key id_emp that references employee(id_emp). When we update id_emp on employee, we still have a lock on emp_stuff. According to this (end of the page) :

Quote:So, in short, with releases prior to Oracle Database 11g Release 1, you will want an index on the foreign key of the child table if you do any of the following:

Update the parent table primary key
Delete from the parent table
Merge into the parent table

So is id_emp in emp_stuff considered as indexed (through the unique index of the primary key) or do we have to add an explicit index
like this CREATE INDEX emp_stuff ON emp_stuff(id_emp) to avoide child table locks?

View 33 Replies View Related

Forms :: Record Locking?

Oct 21, 2010

I have developed a form, containing 5 tab pages and also referencing to 5 tables.tab page a of table a some fields are required and some or not.when i open form and start entering record, and then i change mine and dont enter and want to navigate to some other page, it simply allows me to leave it blank and move to some other tab page.

tab page b of table bsome fields are required and some or not.when i open this tab page and one i click in the first field and then do not enter anything in it and want to leave it , it does not allow me to leave blank.what could be the reason. why one tab page allow me to leave blank and navigate and why the other does not?first field of both tab pages are required.

View 2 Replies View Related

Way To Resolve Database Locking

Aug 27, 2013

11.2.0.1  I am still resolving the locking issues in our database Often the delete is blocked by some transaction. The operations said that it is intermittent. Last night they were able to delete the 1M transactions without the locking.But the past days lock often occurred, and they have to bounced the database to release the locks.

 I there a way I can compare what happened last night why the batch was able to delete smoothly , and compare it against the other night where the delete was blocked?By using ASH, AWR, ADDM? I also run now this procedure, to identify the blocking sql statement: 

SQL> exec  dbms_workload_repository.add_colored_sql(sql_id => 'fn3qv2dhsu3nb');        

PL/SQL procedure successfully completed.Can I now run AWR,ASH,ADDM, to identify/capture the sql being run?

View 21 Replies View Related

PL/SQL :: Row Locking During Update Statement?

Aug 9, 2013

Using Oracle 11gr2. If I call the following update statement from session A, session A will lock the row until a commit/rollback statement is issued from session A. If session B calls the same update statement and same row, session B will have to wait until the lock is released in session A. However, the application developers are speaking in terms of threads. Could it be possible that the update statement is called within the same session by multiple requests? If yes, could the case statement be evaluated without the row being locked which could lead to false results? Trying to keep this post brief. tableA has columnA (primary key, number) and columnB (number) 

{update tableAset columnB = case when columnB = 3 then   4  when columnB = 4 then   5   else  columnB    endwhere columnA = 6;}

Could 2 requests (almost at the exact same time) in the same session evaluate columnB as 3. The desired result would be the first request sets the column to 4 and the second request sets the column to 5.

View 4 Replies View Related

Locking Users By A Table Field Value

Dec 27, 2006

We have a table with several columns (id, title, description, area).The data in the table looks like this

1 sometitle1 description1 USA
2 sometitle2 description2 Germany
3 sometitle3 description3 Japan
4 sometitle4 description4 Honduras

We have Oracle users with their usernames and password. We would like to lock every single user to a certain area.Example:

user 1 may see only records, where AREA=USA
user 2 may see only records, where AREA=Honduras

How can I do this in Oracle. I am using Oracle Enterprise 9.2

View 1 Replies View Related

Archive Processes Locking In Oracle

Nov 9, 2010

I am having a data guard setup done in oracle 10g(10.2.0.4.0) WINDOWS Platform. some of the archive process are locked in primary db side.

PROCESS STATUS LOG_SEQUENCE STAT
-------- ---------- ------------ ----
0 ACTIVE 0 IDLE
1 ACTIVE 804462 IDLE
2 ACTIVE 0 IDLE
3 ACTIVE 0 IDLE
4 ACTIVE 0 IDLE
5 ACTIVE 800011 BUSY
6 ACTIVE 0 IDLE
7 ACTIVE 800009 BUSY
8 ACTIVE 0 IDLE
9 ACTIVE 802335 BUSY
10 ACTIVE 0 IDLE

Shall we kill the locking archive processes? killing archive processes will cause any problem?

View 4 Replies View Related

Performance Tuning :: Locking Of Two Sessions?

Apr 27, 2012

how to avoid oracle deadlock with two sessions. Here is my example, We use Select query with For Update in order to get the unique number from a table. When one user has accessed this query, while the other user tries, System gives a Performace slow and when checked it is due to locking of this select query with For update.

We don't want to use For update WAIT or FOR UPDATE NOWAIT since these will result in missing of number.

View 3 Replies View Related

11g Child Table Update Locking?

May 26, 2013

I've a table TXN1 transaction and has FKs to 3 different tables Account, customer, country and currency. ALL FKs are indexed (bitmap). I am updating TXN1 of amount column about 10,000 rows. (SID 1) As expected, it has taken lock type 3 SX on TXN1. But it has taken on lock type 4 (share) on Account, customer and country. Committing every 10k rows.

At the same time sid 2 is inserting into another TXN2 table which has FK to the same dimensions account, customer and currency. Only FK on ac_id is bitmap indexed. The inserts have taken SX lock(type 3) on tXN2 table (expected). But it is trying to take SX type 3 lock on account, customer, currency tables. typ3 lock taken on CCY but waiting on CST. But It is blocked by sid 1. It has resulted into Enque-TM contention and resulted into anywhere 60-300 secs wait time..

I understand update/delete in parent table results into locking of SX of child tables and need the FKs to be indexed to avoid etc.

1. Why is SID1 taking shared lock on the parent tables Account,customer,country and currency tables? The update statement is not updating any of those FK columns nor referring them in where clause(if it matters!). Is it to ensure that the parent rows are not deleted?

2. Why is SID2 taking SX lock on the dimension tables? Why is it not taking RS lock type 2 on parent rows? Why is SID1 taking shared lock type 4, but not 2?

View 13 Replies View Related

SQL & PL/SQL :: Locking Views (rows Of Data While Updating)

Nov 10, 2011

I have a set of rows based on a complex view from multiple table.

I will be updating some of its columns from front-end . Is there any possible ways to lock those rows of data while updating and no other users can update it;

View 5 Replies View Related

Get Table RowID Of Session That Is Locking In RAC Database

Jun 11, 2012

I am a developer and not a DBA and I need to find th correct query to find the exact rowid of the record locked on a table. This is for a RAC database and locked record can be from the web form in oracle application server. When I try to get the correct row id, I get the following error:

ORA-01410 - Invalid row id For the criteria, the output is Dbms_Rowid.rowid_create(1, -1, 36, 7845, 0), why I get a -1 for the ROW_WAIT_OBJ#?

Additional Information: The lock type is DML and the lock mode is: Row Exclusive, the table is locked and the program is web oracle forms executing.

I am executing the query in Oracle Database 11g Enterprise Edition Release 11.1.0.7.0

How to accomplish getting the correct rowid? Below is the selection criteria I have:

select vs.inst_id,
vs.audsid audsid,
locks.sid sid,

[Code]....

View 1 Replies View Related

Server Administration :: Sessions And LGWR Locking?

Jul 13, 2010

We had an issue last week were we had a session with a very basic SQL query lock up the database, spiking the CPU at 100%. When you would kill the session, the lock would just jump to another session and so on. We finally had to restart the database since our clients were being kicked out. After the restart of the database, the LGWR ended up locking and held the CPU between 85-95%. The archive logs were switching every 5 minutes, when normally it would be every 45min. We spoke with Oracle Support, but they just ended up brushing the issue off and saying it was a hardware issue and were not able to provide any kind of backing to that.

View 4 Replies View Related

Performance Tuning :: One Procedure Is Blocking And Another Is Locking It

Jan 25, 2011

I am new to performance tuning. One procedure is blocking and another is locking it.

SQL> @glockers
Oracle OS

INSTANCE SID TY Usernam SERIAL# SPID Process LMODE REQUEST
---------- ------ -- ------- ---------- ------------ ------- ------------------------------------ ------------------------------------
[code]...

View 1 Replies View Related

SQL & PL/SQL :: Automate Locking / Unlocking Of User Accounts

Nov 1, 2011

I have been plagued by people logging into my database and making changes when a clone is in process.. Having said that ,I am looking to lock accounts and unlock them when I am done.

I envision my code looking something like this:

sqlplus -s / <<END
SET PAGESIZE 0
SET FEEDBACK OFF
SET VERIFY OFF;
set heading off;
spool /tmp/lockusers.sql
select 'alter user ' || username || ' account lock;' from dba_users where username not in (....) and not locked?;
spool off;
END;

sqlplus -s / <<END
@/tmp/lockusers.sql
END;

When it comes time to unlock the accounts I want to be able to unlock those accounts I previously locked and not all of them. Is there a query, I can use that can tell me when the accounts were locked or some other way about going about this so I dont unlock accounts that were locked prior to my lock script running?

View 9 Replies View Related

Table Locking When Many Users Retrieve Data

Sep 2, 2009

I have a "select ... into" in my PL/SQL and it doesn't retreive any data(I suppose just certain columns because if it doesn't retreive a row then the PL/SQL should throw an error) when there are many users accessing this table. It shouldn't be some table locking right? Because if it is, it should wait until the table is available then it will retreive data. Currently it just proceeds with the PL/SQL and selecting nothing in that query. what details should I look at to trace the cause of this problem.

View 4 Replies View Related

PL/SQL :: How Database Handles Record Locking When Aggregate Function Called

Jul 17, 2012

how the DB handles record locking when an aggregate function is called? For instance:

...
select count(*)
into   v_count
from   x;

...Is there a lock maintained on table x for the duration of the transaction so no rows can be inserted or deleted?

View 4 Replies View Related

Hibernate Optimistic Locking Versus Database Isolation Levels

Jan 26, 2013

Among Hibernate optimistic locking & Database Isolation levels, which one to use? Which gives the better consistency, concurrency and scalability. I read in couple of links that Isolation level will suffer if there is a huge load on the application with multiple users access the appliation at the same time, moreover in islation levels normally we need to look for READ_COMITTED and NON_REPEATABLE_READ to get a better performance? Whether these are true? Whether we can use both Hibernate optimistic locking(version & timestamp) & Database Isolation levels in the same application? What are the implications using these? Which one will be preferred over the other and when?

View 2 Replies View Related

SQL & PL/SQL :: Incorporate Parallel Loading To Load Data Into Database - Oracle Locking Not Working?

Aug 3, 2011

At the moment, we were loading the file in our system serially. This is a very old and established system.We would like to incorporate parallel loading for our loaders to load data into the database.

Most of the issues would be due to multiple inserts happening due to the files being loaded in parallel. For some reasons, we cannot give regular commits untill the entire batch of items is processed in case the process needs to rollback. A file can contain different set of batch of items clubbed together for loading.

The issue here is untill the first file finishes loading and commits, the second file would just hang. In fact, mulitiple files might hang for the first file to finish. what can I do to overcome this?I tried to used "lock table t1 in SHARE ROW EXCLUSIVE mode nowait". When the leading process is doing inserts, the failing process will fail with a resource busy and acquire with NOWAIT specified. We would catch this exception and redirect that batch to an error file to be reloaded at a later date.

View 15 Replies View Related

SQL & PL/SQL :: Create Table From Production DB?

Mar 22, 2012

i want to create table from other database table by using dblink.but while creating the new table i am getting a error of temp space.

the data is the source table have around 2 millions of records.

i am using below syntax to craete table:

CREATE TABLE UDT_Fcst_arch_72 PARALLEL (DEGREE 4)
AS SELECT * FROM UDT_Fcst_arch@PRD

View 9 Replies View Related

Partitioning A Table In Production?

Nov 2, 2012

Oracle 10.2.0.4

I partitioned a source table of around 100 million rows (62GB) in DEV server. The target database was created new. It was range partioned on a date column as follows:

PARTITION BY RANGE (ENTRY_DATE_TIME)
(
PARTITION ppre2012 values less than (TO_DATE('01/01/2012','DD/MM/YYYY')) TABLESPACE WST_LRG_D,
PARTITION p2012 values less than (TO_DATE('01/01/2013','DD/MM/YYYY')) TABLESPACE WST_LRG_D,
PARTITION p2013 values less than (TO_DATE('01/01/2014','DD/MM/YYYY')) TABLESPACE WST_LRG_D,
PARTITION p2014 values less than (MAXVALUE) TABLESPACE WST_LRG_D
)

That is yearly basis. Anything before 2012 went to ppre2012, then p2012, p2013 and so forth. There is 20 million rows in p2012. and around 75 million rows in ppre2012. We needed both the source (un-partitioned) and target (partitioned) tables in DEv for comparision. The queries are normally on the current year partition. Just to state taht I am a developer and don't have full visibility to the production instance.

Now that our tests are complete, we would like to promote this in production. Obviously in production we would not not need both source and target tables. In all probability this will be performed over a weekend window. Therefore I would like to suggest the following .

1) use expdp to export source table
2) drop the source table
3) create a new source table "partitioned" with no indexes
4) use impdp to get data back into table
5) create global index (it is a unique index to enforce uniquness) and the rest of indexes as local
6) perform dbms_stats.gather_table_stats(user,'SOURCE', cascade=>true). This takes around 2 hours in dev

My point is that whether importing 100 million rows will not cause issues with undo segments. Can we import data say first to the current partition p2012 (20 million rows) first.

View 18 Replies View Related

Listener In Production Environment

Feb 6, 2013

I faced a problem in our production primary DB like the listener was running but it was not connecting through the remote system, when i accessed the primary database.

But when i restarted the listener it started connecting. I want to know the reason for this crash/freeze.

Oracle version: Oracle Database 11g release 11.2.0.1.0 SE1 64 - bit production

View 3 Replies View Related

Copy Database From Production To Test?

Feb 22, 2011

Would like to know if I can replicate Production database (10.2.0.2) to Test (10.2.0.4).

tell me the process to do that on windows environment.

I wonder if I can do it with two different oracle versions?

View 4 Replies View Related

Replication Of Production Data To Staging

Aug 30, 2011

We have Development, Staging/UAT ( installed on XX.XX.XX.10 ) and Production ( installed on XX.XX.XX.20) Environment respectively. I have queries regarding getting the data from Production environment into Staging environment. The overall PROD database size is around 250 GB.

STAGING DATABASE DETAILS

SID : STG_DB
Staging Schema Name :schema_UAT
Replication Schema Name :schema_PrdReplica ( This is the schema where the production data gets loaded daily)

PROD DATABASE DETAILS

SID : PROD_DB
Prod Schema Name : schema_PROD

What is happening now:
----------------------------
There is a script (Stored Proc) written on staging ( STG_DB.schema_PrdReplica ) environment which executes daily in NIGHT and does replication. Currently we use DBMS_DATAPUMP to get the ENTIRE data/Meta Data (Everything) from Production to Staging. It is ta king significantly more time. It takes approx 8 Hours to replicate the everything from PROD_DB.schema_PROD to STG_DB.schema_PrdReplica

What I am expecting :
-----------------------------
I want to reduce the replication time.

I have heard about Level 0 (Full BackUp ) and Level 1 ( Incremental Cumulative ) Backups in RMAN. I am planning to take PROD_DB.schema_PROD Full Backup (Level 0) on Sunday and will restore that on STG_DB.schema_PrdReplica immediately. And on weekdays ( Mon - Fri ) I will take Level 1 ( Incremental Cumulative ) and will restore that on STG_DB.schema_PrdReplica

I am assuming by doing so, the overall replication time will be reduced. How can I implement this with script assuming that two different servers are on different machines.

View 1 Replies View Related

Replication :: Golden Gate For Production Cut Over

Feb 4, 2012

I was planning to a production cut over from Aix to linux .I thought GG as an option so that i can have two DBs run parallel and replicate and do a cutover to linux during the change window.

Now the problem i see is that only half the tables have primary key.. so I THINK golden gate cannot be used an an option.

View 2 Replies View Related

Windows :: Changing JDK From Production Client?

Oct 20, 2011

I have been asked to create a new instance of an application server. As part of this, my management has asked me to replace any old JREs or JDKs.

We run 10g, so I installed the 10203_vista_w2k8_x86_production_client on my new server. I would like to replace the 1.4.2 JDK that is bundled with the Oracle Production Client with 1.6.0.

View 1 Replies View Related

SQL & PL/SQL :: Mask A Column Value Present In Production

Nov 27, 2012

How we can mask a column value present in the production which is very sesitive like bank a/c no,Credit card nos etc while replicating to the test/development envirnoments in PL/SQL.Things that need to be considered is referential integrity,data types,length of the column and performace while execuing the code.

View 2 Replies View Related

Application Express :: Oracle XE In Production

Jan 1, 2013

I am trying to use the APEX (as a substitute for my PHP forms base application) for a new client. Can I use the APEX and Oracle XE in production, without spending any money for a license from Oracle - i.e. for listener, Web server, etc,?

I already have setup the APEX that works fine on my laptop, able to see and work with the form on the browser, so can I take the same to a server as a production?

View 4 Replies View Related

Production Database Server Process

Apr 27, 2013

Oracle 11g default server process is dedicated select distinct server from v$session; dedicated

Which server process is used in the oracle 11g Production? if the database is connect to an online application?

View 19 Replies View Related

Patching Strategy For Production Environment

Jun 25, 2013

Need patch strategy specially for production environment?? We have production environment and we are planning to patch our databases using PSU pacthes with no downtime. Our production environment has standby. We have one option that we can make standby to primary. Is there any other options that we can use?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved