Locked Resources By Distributed Transaction?
Jun 15, 2012db 10.2.0.4
select * from DBA_2PC_PENDING shows pending transactions in prepared state.
How can I know the resources (e.g. tables) locked by these transactions?
db 10.2.0.4
select * from DBA_2PC_PENDING shows pending transactions in prepared state.
How can I know the resources (e.g. tables) locked by these transactions?
Query in format Query@DB_Link is sometimes dropping transactions. Move it to a package on target dababase "B" called from DATABASE "A" via package.procedure(varaibles);
Is that all I need to do to get the transaction to always go? I tried a commit in the package body, with repeated attempts if it fails. Btu when I use commit, the package doesn't work. (Compiles fine) Why would the commit fail?
My goal is to make that the transaction succeeds.Code for what I tried below. the COMMIT is commented out - if I uncomment it, the transaction fails. I have done this before calling an oracle SP from SQLServer and it worked
Comments:
The loop is to avoid an endless cycle..The concept is to perform the update, commit it, if the commit fails, rollback and try again.I'm not sure if I even need a loop, but I don't know if the unresolved transaction would get fixed by the remote DB, or dropped.
PROCEDURE BTC_UpdatePart
(
vPart_ID varchar2,
vEngineering_Mstr varchar2,
vCommodity_code varchar2,
vDef_orig_country varchar2,
vDescription varchar2,
[code]...
I am getting ORA-02049: timeout: distributed transaction waiting for lock , how to resolve this type error
View 3 Replies View RelatedI am on Oracle 11.2.0.3 on Linux. In my production database, I am getting this alert, in the alert log:
--the below two lines are from alert log.
Error 604
trapped in 2PC on transaction 50.73.546578. Cleaning up.
--query from a data dictionary view
SQL> select count(*) from DBA_2PC_PENDING;
COUNT(*)
----------
1
When I query the production database I see that there is one row in the DBA_2PC_PENDING view. But I dont' know how to identify which are the databases that are involved in this distributed transaction. That is my first issue - how to identify which are the two databases that are involved in the distributed transaction?
My transaction of 1 day Jan7,2009 cannot be manipulated by any DML..What shud i do to unlock those records...??
View 10 Replies View RelatedI have read almost all docs about distributed transaction on tahihi.oracle.com website,But I can find a statment about this:
Can Oracle always guarrantee the data consistent in a distributed transaction?
For example,there is a distributed transaction on node a,node b and nod c.node b and node c informed node a they were prepared,so node a committed,and inform node b and node c commit.then node b committed and feedback,but network on node c broken at this point,So node a can't not get feedback from node c,but node a and node b has been committed, so what will Oracle do in this condition?
If node c rollback the data on local node, consistent in this distributed transaction was failed ,yes?
We're using UTL_SMTP to send emails from Oracle, and about 2 weeks ago (2 days prior to daylight savings) we start seeing an intermittent "SMTP transient error: 452 4.3.1 Insufficient system resources".
When there's an issue, emails fail from all 3 of our database environments (on separate servers), which leads me to believe that it isn't Oracle's error. But, our Exchange server isn't showing anything in it's Application Event Log, nor it's Protocol Log (although we just changed settings to log more information).
I'm just trying to rule out Oracle at this point, so we can focus our efforts. I've been looking on Google for the past hour and a half, and I can't find anything which points to anything other than the mail server being the culprit in an error situation like this. But, how to determine if the database should stay on the list of items to look into.
version : 11.2.0.2 on RHEL 5.4
In our 2-node RAC , Node1 was hung for a while. So, I wanted to restart that Instance. But I had some 50 services running in Instance 1(Preferred Instance) which has to relocated before I bounce the instance.
Question 1.
Instead of using srvctl relocate for each service, Is there any way to quickly relocate all services to the Node2 (Available Instance) ?
Question2.
When a service is relocated , are DMLs running from sessions using that service be 'moved' to the available instance ? Or, is it just the SELECTs that can be failed over ?
My application consists of Oracle RAC and Oracle Enterprise Manage (OEM) on same two nodes. I am exploring the idea of utilizing Oracle Clusterware (which is already installed with Oracle RAC) to support OEM in active passive mode.
Here is the scenario.
Node A running Solaris 10.9 on SPARC and Node B running Solaris 10.9 on SPARC.
Node A and Node B are both Oracle RAC Nodes ( Active Active ) which use Shared Storage for Oracle using ASM.
Node A and Node B will run Oracle Enterprise Manager (OEM) Application in active passive scenario which will be using Oracle RAC for its database. So, both Oracle RAC and OEM are sharing same server A and B for its clusters.
Now, OEM application need a third party clusterware to fail it over. It needs clusterware to provide floating VIP and shared folder of the size of 20GB which will keep software libraries. If node A goes down, node B have access to same libraries and will come up as active.
Do you know if oracle clusterware which comes with Oracle RAC can support OEM for failing over i.e. it can provide floating VIP and shared file system?
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 am using the dblink to merge the data. I am using the following merge statement.
merge into APP_USER.USR_NEW_RIGHTS@NEW_RIGHTS t
Using (select 'test' GRANTEE,'TESTxxx'ROLE from dual ) s
on (t.GRANTEE = s.GRANTEE and t.ROLE = s.ROLE)
when not matched then
insert (ID,GRANTEE,ROLE,XRIGHT,COMPANY,OWNER,TABLENAME)
values ('','test','TESTxxx',null, null, null, null);
I know that I have to set a commit and it's working when I insert information's with a normal insert statement via database link, but it seems that merging doesn't work.
We found out an error from alert log of our Oracle 10.2.0.5 DB :
====================================
..
Wed Jan 30 16:45:01 EAT 2013
DISTRIB TRAN bea1.67AA54355C4A74ECDEE0
is local tran 6.42.332492 (hex=06.2a.512cc)
insert pending prepared tran, scn=8151148567799 (hex=769.d6509cf7)
Wed Jan 30 16:45:02 EAT 2013
Errors in file /oradata/sfapdb/bdump/sfapdb_reco_2739.trc:
ORA-24756: transaction does not exist
Wed Jan 30 16:45:02 EAT 2013
Errors in file /oradata/sfapdb/bdump/sfapdb_reco_2739.trc:
ORA-24756: transaction does not exist
..
====================================
There is no useful information from the trace log as shown below:
====================================
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options
ORACLE_HOME = /ap/oracle10
System name:HP-UX
Node name:scvap2
Release:B.11.23
Version:U
Machine:9000/800
Instance name: sfapdb
Redo thread mounted by this instance: 1
Oracle process number: 18
Unix process pid: 2739, image: oracle@scvap2 (RECO)
*** SERVICE NAME:(SYS$BACKGROUND) 2013-01-30 16:45:01.941
*** SESSION ID:(1749.1) 2013-01-30 16:45:01.941
*** 2013-01-30 16:45:01.940
ERROR, tran=6.42.332492, ose=0:
ORA-24756: transaction does not exist
*** 2013-01-30 16:45:02.059
ERROR, tran=6.42.332492, session#=1, ose=0:
ORA-24756: transaction does not exist
====================================
I also found out there are some records (trans_id = "6.42.332492") in SYS.PENDING_TRANS$/ SYS.PENDING_SESSION$/dba_2pc_pending with "prepare" status.
This transaction is launched from a Weblogic Server via JDBC. Since it is abnormal so I have no choice to force commit/purge this transaction. Is that a bug of Oracle DB ? or Weblogic coding problem ?
here
[URL].......
you wrote that
"The serialize transaction isolation level is not supported with distributed transactions."
what is not supported (or example on what is not working properly)?
When I try to call a database procedure written in Oracle 8.1.7.4.0 with OUT parameter and COMMIT statement from my Oracle 10g environment, I am getting error like "ORA-02064: distributed operation not supported".
I cannot omit OUT/COMMIT statement from the procedure because it is also updating another table from called procedure. I have tried some solutions from my end, but it is not working and same error generating. Like:
1) Moved the update statement with COMMIT statement to another procedure and calling that procedure from main called procedure
2) Creating a job to run the newly created procedure and submit the job from called procedureetc.
I found this thread, and recently i want to embedded oci in pro*c for distributed transaction reason.
can pro*c deal with distributed transaction? i want to use mts in pro*c .
I have a scenario In which I have say 4 AQ in which I will post the message.Also i have say 2 database.I am planning to create an MDB which will poll on these AQ's, so whenever I post message the MDB will read it and perform a specific action.I believe I can create only one MDB per queue, if it is so then I have to create 8 MDB.
As there 2 datasource and 4 MDB. Is there any other way to handle this I mean without creating 8 MDB as the Data sources can increase to 10 to 20 so the number of MDB will be 20 to 40.I guess this will affect the application performance. Can I make some changes in application so that only few MDB's are required?
getting the yearly qty distributed evenly across 12 months. I can do this in PL/SQL but want to know is it possible in SQL.
Database version 10g
create table test_tbl( qty number(22),
yr number,
key_val varchar(10)
);
insert into test_tbl values( 500000, 2013, '1');
insert into test_tbl values (56789, 2014, '2');
commit;
This is the output I need to get from a SQL select query
Key Month Year qty
--------------------------------------------------------------
1 1 2013 41667
1 2 2013 41667
1 3 2013 41667
1 4 2013 41667
1 5 2013 41667
1 6 2013 41667
1 7 2013 41667
[code]....
session from user U1
C:Documents and Settingsuser>sqlplus u1/u123456@orcl
SQL*Plus: Release 10.2.0.1.0 - Production on Pn Wrz 12 12:56:14 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Po│╣czono z:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
SQL> update u1.tab1 set u1.tab1.col1=3 where u1.tab1.col1=1;
1 wiersz zosta│ zmodyfikowany.
SQL>
and now i can check which table is locked
SQL> SELECT lo.session_id, lo.OBJECT_ID, obj.object_name FROM v$locked_object lo
2 INNER JOIN Dba_Objects obj ON obj.object_id = lo.OBJECT_ID;
SESSION_ID OBJECT_ID OBJECT_NAME
---------- ---------- --------------------------------------------------
34 13197 TAB1
but the question is why can i check row id of locked row?
I want to make sure I am describing correctly what happens in a query where there is distributed database access and it is participating in a NESTED LOOPS JOIN. Below is an example query, the query plan output, and the remote SQL information for such a case. Of particular note are line#4 (NESTED LOOPS) and line#11 (REMOTE TABLE_0002).
What I want to know is more detail on how this NESTED LOOPS JOIN handles the remote operation. For example, for each row that comes out of line#5 and is thus going into the NESTED LOOPS JOIN operation @line#4, does the database jump across the network to do the remote loopkup? Thus if there are 1 million rows, does that mean 1 million network hops? Does batchsize play a role? For example, if the database batches in groups of 100 then does that mean 10 thousand network hops?
I think each row that comes out of line#5 means a network hop to the remote database. But I do not know for a fact.I have done some abbreviating in the plan in an attempt to make it fit on the page (line#7 TA = TABLE ACCESS).
SELECT A.POLICY ,
F.MIN_MEMBER_ID,
MIN(A.EFF_DATE) EFF_DATE,
A.EXP_DATE ,
G.DESCRIPTION PROGRAM_NAME,
[code]...
Is it possible to find the locked objects in hierarchical order. Consider the below example
--Connect to scott schema
create table block_session(a NUMBER, b VARCHAR2(100))
/
insert into block_session select rownum,rownum*10 from dual connect by level<=10
/
COMMIT
/
GRANT ALL ON block_session to HR
/
update scott.block_session
SET a=10
where b=10
[code]......
Is it possible to get all locked table details in hierarchical order?
"ALTER PROFILE profile_name LIMITPASSWORD_LOCK_TIME 1"means the user account will be locked in a period of one day after FAILED_LOGIN_ATTEMPTS has gone over limit.How to set PASSWORD_LOCK_TIME less or more than one day (like not full days)?
View 2 Replies View RelatedIf the user has locked some row in the database how to find out the row id or the row which is locked by that particular USER.
View 2 Replies View RelatedHow we know a user account locked time in HH:MM:SS format ?
View 1 Replies View RelatedAn Oracle user account got locked, how do I check, which program or session was the cause for it? how to fetch this details along with details like timestamp, ip address, program name.
Wanted to know for Oracle 11 version running on Solaris machine.
we have a prod application which use oracle database 11g as backend and .NET technology as front end . There is a user TESTUSER in database.
Issue is that we can login in to the application, but when we try to login in database through toad or Db visualizer then it gives an error of 'user account locked'.
My Oracle 10G Expression Edition Account locked gets locked, where to raise the request to unlocking my account.as my user name:system
View 4 Replies View RelatedWe are using Redhat Linux OS with ASM on 11.2.0.3 RAC Clusterware and DB is running on 11.2.0.3.1
I would like to know whether the CRS/GRID home is locked or unlocked...? How can we know that ?
Also with out root how can we find the Disk Size with out logging into ASM /ASMCMD ?
I am getting Oracle odbc ora-28000 account locked error
View 1 Replies View RelatedI am trying to login to the web version of application express [URL]... and get a message that my login is incorrect. I have verified that the ID and workspace are correct, but I do not remember what i set my password to the first time i logged in (account was created by my instructor). There is no "forgot password" or "reset password" link that shows on the page.
View 0 Replies View RelatedI am on database 10.2.0.5, windows x64.
A developer calls me and tells me there are locks on 3 tables, and the locks are not released. So I run this to see which objects are locked by which session
select vlo.object_id, vlo.session_id, vlo.oracle_username, vlo.process
, DECODE(vlo.LOCKED_MODE, 0,'NONE', 1,'NULL', 2,'ROW SHARE', 3,'ROW EXCLUSIVE', 4,'SHARE', 5,'SHARE ROW EXCLUSIVE', 6,'EXCLUSIVE', NULL) LOCK_MODE
, do.owner, do.object_name, do.object_type
[code]...
When I run the query later, I sometimes get another session, but the lock stays. It seems here, that I am catching the same SID on new sessions, but it is probably a different serial # than the original session locking the table rows.
I get nothing from
select * from dba_waiters;
select * from dba_blockers;
Now why are those 3 tables row locked on some rows and I can't find the session responsible? The developer tells me his application crashed and the rows are locked since. So far ( keep in mind I am not a locking expert) the only way I found to release the locks is a DB bounce, its a test DB so no biggy.