How to see lock in oracle 10g
hi,
i m working on an application made in oracle 10g developer, & database is oracle 10g on aix ,
some times i get some problem when user save any data through forms it gets hanged ,
so tell me how to get rid of it , when i try to do it from sql navigator i see massges session is busy .
so y this eror i m getting & how to resolve it.
thxs
Here you have some scripts:
rem
rem FUNCTION: Report all DB locks
rem
column osuser format a15 heading 'User'
column session_id heading 'SID'
column mode_held format a20 heading 'Mode|Held'
column mode_requested format a20 heading 'Mode|Requested'
column lock_id1 format a10 heading 'Lock|ID1'
column lock_id2 format a10 heading 'Lock|ID2'
column type heading 'Type|Lock'
set feedback off echo off pages 59 lines 131
start title132 'Report on All Locks'
spool rep_out\&db\locks
select nvl(a.osuser,'SYS') osuser,b.session_id,type,
mode_held,mode_requested,
lock_id1,lock_id2
from sys.v_$session a, sys.dba_locks b
where
a.sid=b.session_id
order by 2
spool off
pause press enter/return to continue
clear columns
set feedback on echo on pages 22 lines 80
set headingsep ='|'
set lines 160
set pagesize 20
ttitle 'Database Locking Conflict Report'
btitle 'Mode Held = indicates the user holding the lock|Mode Request = indicates the user waiting on the later to finish to establish lock||** End of Locking Conflict Report **'
column username format a10 heading 'User'
column terminal format a15 heading 'Application|PC'
column object format a15 heading 'Table'
column sql format a15 heading 'SQL'
column sid format 999 heading 'SID'
column lock_type format a15 heading 'Lock|Type'
column mode_held format a11 heading 'Mode|Held'
column mode_requested format a10 heading 'Mode|Request'
column lock_id1 format a8 heading 'Lock ID1'
column lock_id2 format a8 heading 'Lock ID2'
column first_load_time format a19 heading 'Requested'
break on lock_id1
select a.sid,
username,
terminal,
decode(a.type,'MR', 'Media Recovery',
'RT', 'Redo Thread',
'UN', 'User Name',
'TX', 'Transaction',
'TM', 'DML',
'UL', 'PL/SQL User Lock',
'DX', 'Distributed Xaction',
'CF', 'Control File',
'IS', 'Instance State',
'FS', 'File Set',
'IR', 'Instance Recovery',
'ST', 'Disk Space Transaction',
'IR', 'Instance Recovery',
'ST', 'Disk Space Transaction',
'TS', 'Temp Segment',
'IV', 'Library Cache Invalidation',
'LS', 'Log Start or Switch',
'RW', 'Row Wait',
'SQ', 'Sequence Number',
'TE', 'Extend Table',
'TT', 'Temp Table', a.type) lock_type,
decode(a.lmode,0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
5, 'S/Row-X (SSX)', /* C */
6, 'Exclusive', /* X */
to_char(a.lmode)) mode_held,
decode(a.request,
0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
5, 'S/Row-X (SSX)', /* C */
6, 'Exclusive', /* X */
to_char(a.request)) mode_requested,
to_char(a.id1) lock_id1, to_char(a.id2) lock_id2,
c.object object,
d.sql_text sql,
e.first_load_time
from v$lock a, v$session, v$access c, v$sqltext d, v$sqlarea e
where (id1,id2) in
(select b.id1, b.id2 from v$lock b where b.id1=a.id1 and
b.id2=a.id2 and b.request>0) and
a.sid = v$session.sid and
a.sid = c.sid and
d.address = v$session.sql_address and
d.hash_value = v$session.sql_hash_value and
d.address = e.address
order by a.id1, a.lmode desc
set headingsep ='|'
set lines 160
set pagesize 20
ttitle 'Database Locking Conflict Report'
btitle 'Mode Held = indicates the user holding the lock|Mode Request = indicates the user waiting on the later to finish to establish lock||** End of Locking Conflict Report **'
column username format a10 heading 'User'
column terminal format a15 heading 'Application|PC'
column object format a15 heading 'Table'
column sql format a15 heading 'SQL'
column sid format 999 heading 'SID'
column lock_type format a15 heading 'Lock|Type'
column mode_held format a11 heading 'Mode|Held'
column mode_requested format a10 heading 'Mode|Request'
column lock_id1 format a8 heading 'Lock ID1'
column lock_id2 format a8 heading 'Lock ID2'
column first_load_time format a19 heading 'Requested'
break on lock_id1
select a.sid,
username,
terminal,
decode(a.type,'MR', 'Media Recovery',
'RT', 'Redo Thread',
'UN', 'User Name',
'TX', 'Transaction',
'TM', 'DML',
'UL', 'PL/SQL User Lock',
'DX', 'Distributed Xaction',
'CF', 'Control File',
'IS', 'Instance State',
'FS', 'File Set',
'IR', 'Instance Recovery',
'ST', 'Disk Space Transaction',
'IR', 'Instance Recovery',
'ST', 'Disk Space Transaction',
'TS', 'Temp Segment',
'IV', 'Library Cache Invalidation',
'LS', 'Log Start or Switch',
'RW', 'Row Wait',
'SQ', 'Sequence Number',
'TE', 'Extend Table',
'TT', 'Temp Table', a.type) lock_type,
decode(a.lmode,0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
5, 'S/Row-X (SSX)', /* C */
6, 'Exclusive', /* X */
to_char(a.lmode)) mode_held,
decode(a.request,
0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3, 'Row-X (SX)', /* R */
4, 'Share', /* S */
5, 'S/Row-X (SSX)', /* C */
6, 'Exclusive', /* X */
to_char(a.request)) mode_requested,
to_char(a.id1) lock_id1, to_char(a.id2) lock_id2,
c.object object,
d.sql_text sql,
e.first_load_time
from v$lock a, v$session, v$access c, v$sqltext d, v$sqlarea e
where (id1,id2) in
(select b.id1, b.id2 from v$lock b where b.id1=a.id1 and
b.id2=a.id2 and b.request>0) and
a.sid = v$session.sid and
a.sid = c.sid and
d.address = v$session.sql_address and
d.hash_value = v$session.sql_hash_value and
d.address = e.address
order by a.id1, a.lmode descCheers,
Francisco Munoz Alvarez
http://www.oraclenz.com
Similar Messages
-
How to delete client from oracle 10g ASM
Hi,
I would like to know how to delete client from oracle 10g ASM, while configuring Dataguard in same windows os i have by mistake created the standby in ASM.
However later i have corrected the datafile destination. My Primary database is in ASM and the standby in disk.
Could anyone please tell me how do i delete the client from ASM. On view from asmcmd it shows db_unknown and from v$asm_client
GROUP_NUMBER INSTANCE_NAME
DB_NAME STATUS
SOFTWARE_VERSION
COMPATIBLE_VERSION
1 stby
stby CONNECTED
10.2.0.1.0
10.2.0.1.0
Thanks and regards,
shaanHi Deepak,
Pls see the result from the view, i wanted to delete stby
SQL> select * from v$asm_client;
GROUP_NUMBER INSTANCE_NAME
DB_NAME STATUS
SOFTWARE_VERSION
COMPATIBLE_VERSION
1 prim
prim CONNECTED
10.2.0.1.0
10.2.0.1.0
2 prim
prim CONNECTED
10.2.0.1.0
10.2.0.1.0
1 stby
stby CONNECTED
10.2.0.1.0
10.2.0.1.0
regards,
shaan -
How to Send mail in oracle 10g
I am new in oracle developer.....we are using oracle 10g developer...how to send mail through oracle 10g on a button click.pease help me.
Thanks in advanceThis question have been asked many times on this forum, see if you get help from following:
https://forums.oracle.com/message/5395438#5395438
Search results: https://forums.oracle.com/thread/search.jspa?peopleEnabled=true&userID=&containerType=&container=&q=form+email
Check this out as well:
http://nzchaudhry.wordpress.com/2013/05/31/send-report-via-email-attachment-in-oracle-forms-10g/
You can find init.ora or initSID.ora file under $ORACLE_HOME/dbs on linux and on Windows under $ORACLE_HOME/database. Otherwise you can create it using "create pfile from spfile" command
Aneel -
How to see dbms_output on oracle sql developer
ned immediate help
how to see dbms_output on oracle sql developerHi,
In sql developer u have a tab named DBMS Output in your result sheet. In that the first Icon is Enable DBMS Output. turn it on (After on it will give the message set serveroutput on in the sheet) and then run your code.
In the code u have to use the dbms_output.put_line package.after running the code u have to see the result in DBMS Output tab.
Regards,
NTR -
How to see history in Oracle SQL
how to see history in Oracle SQL
i.e
create table.....
select * from tablename....
delete tablename;
Now i want to see how many command run after login.......please tell me the command...user12261139 wrote:
how to see history in Oracle SQL
i.e
create table.....
select * from tablename....
delete tablename;
Now i want to see how many command run after login.......please tell me the command...I'm not aware of an easy way to see how many commands were run after logging on. Different tools have different capabilities, though.
The ms-dos version of SQL*PLUS offers a Doskey option to use the up and down arrows to recover recently executed commands.
The SQL Workshop in Apex has a command history. Some of the GUI tools might offer similar functionality. -
How to export AWM in Oracle 10g
Hi All,
Im doing export of my Analytical Workspace with option tables=AW$TEST, this command failed and thrown EXP-00055: CALLDETAIL_TEST.AW$TEST is marked not exportable, i checked NOEXP$ table and i can find my AW name in it, according to table definition i cann't perform export of those objects listed in NOEXP$ table right, I want to know from you pals how can i export AW and then import it ?
Need your feedback asap.
Thanking you pals in advance
Hassan khanAbhii wrote:
How to store image in Oracle 10g?
any example ?http://www.google.co.in/search?rlz=1C1GGLS_enIN321IN321&sourceid=chrome&ie=UTF-8&q=How+to+store+image+in+Oracle
HTH
Aman.... -
How to use iframes in oracle 10g
I have to load two jsp pages in a single html . I have done that thru iframes. But i have to dynamically load the second jsp page in the frame 2 , when the user clicks upon certain details in the frame 1 jsp page. I have wriiten the code of document.iframe in format trigger attribute. It doesn't work. Is there any other way to achieve this. I want to load the frame 2 jsp page dynamically , according to the input i get from frame 1 jsp page.
Hi,
>>Anybody know how to use profiler in oracle 10g
What do you mean "profiler". About Resource Limits/Create Profiles ?
>>i couldn't able to install the enterprise manager console.
What OS ?
>>because i need to trace the execution of a stored procedure.waiting the reply.
Debug ? You can use SQL Developer, TOAD, PLSQL Developer for this purpose.
Cheers -
How to Use Profiler in ORACLE 10g
Hi all,
Anybody know how to use profiler in oracle 10g and also i couldn't able to install the enterprise manager console.is there any tools available for that.because i need to trace the execution of a stored procedure.waiting the reply.
SathishHi,
>>Anybody know how to use profiler in oracle 10g
What do you mean "profiler". About Resource Limits/Create Profiles ?
>>i couldn't able to install the enterprise manager console.
What OS ?
>>because i need to trace the execution of a stored procedure.waiting the reply.
Debug ? You can use SQL Developer, TOAD, PLSQL Developer for this purpose.
Cheers -
How to recreate datafile in oracle 10g.
pls tell me how to recreate datafile in oracle 10g...
what are situation to recreate datafile
Edited by: 898085 on Nov 18, 2011 9:16 PM898085 wrote:
pls tell me how to recreate datafile in oracle 10g...
what are situation to recreate datafile
Edited by: 898085 on Nov 18, 2011 9:16 PMDid u mean create or recreate?
if datafie is deleted then you may add it into existing tablespace.
Try this : -
1.)sqlplus sys/xx as sysdba
2.)alter tablespace <tablespace_name> add datafile <datafile_name> size <give size>;
HTH:-) -
How to Configure Webutil in Oracle 10g Developer Suit
Dear All,
How to Configure Webutil in Oracle 10g Developer Suit.
Please give me the step by step solution.
Thanks and Regards,
FazilThis is a very frequently asked question. Searching the Forum or the Forms Help system would have given you your answer! Search Forms Help on "Configure WebUtil" and read the configuration guide and checklist articles.
Craig... -
How to activate OEM in oracle 10G
Hi, I want to know how to activate oracle enterprise manager, not grid control. This is and old database in oracle 10g,
running in IBM server with OS AIX 5.3. It was unused, but now we need to execute some process in it, and I need a tool
to help with this process.
I got other databases in other server, but they are in clusters (RAC), with these DBs I don't have any problems,
when I go to ORACLE_HOME/bin I see emctl, but in the old db when I go to ORACLE_HOME/bin
I don't see emctl. My doubt is, how can I activate OEM in this DB? Do I need to download something?
Thanks for your help.
ANGHi mnazim;
I executed the command and I got this:
INFO: Repository successfully created
Oct 28, 2009 11:27:58 AM oracle.sysman.emcp.EMReposConfig updateReposVars
SEVERE: File/directory /home/oracle/product/10.2.0/sysman/emdrep/config/repository.variables does not exist
Oct 28, 2009 11:27:58 AM oracle.sysman.emcp.EMReposConfig invoke
SEVERE: Failed to unlock all EM-related accounts
Oct 28, 2009 11:27:58 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Failed to unlock all EM-related accounts
Refer to the log file at /home/oracle/product/10.2.0/cfgtoollogs/emca/MDBLAV/emca_2009-10-28_11-26-52-AM.log for more details.
Could not complete the configuration. Refer to the log file at /home/oracle/product/10.2.0/cfgtoollogs/emca/MDBLAV/emca_2009-10-28_11-26-52-AM.log
for more details.
I verified the aforementioned log and these are the last lines:
Oct 28, 2009 11:27:58 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Error executing /home/oracle/product/10.2.0/sysman/admin/scripts/emca/emcaDbUtil
/home/oracle/product/10.2.0/perl/lib:/home/oracle/product/10.2.0/perl/lib/site_perl:/home/oracle/product/10.2.0/sysman/admin/scripts:/home/oracle/product/10.2.0/bin:
%s_perlBin%/perl /home/oracle/product/10.2.0/sysman/admin/scripts/emca/emcaDbUtil.pl /home/oracle/product/10.2.0 IPTVLAB SYS SYSDBA declare repos_pwd varchar2(30);
view_user varchar2(30); view_user_pwd varchar2(30); view_user_acc_status varchar2(30); begin repos_pwd := ?; sysman.mgmt_view_priv.get_view_user(view_user);
select account_status into view_user_acc_status from sys.dba_users where upper(username) = upper ( view_user ); IF view_user_acc_status like '%LOCKED%' THEN
execute immediate 'alter user ' || view_user || ' account unlock'; END IF; IF view_user_acc_status like '%EXPIRED%' THEN sysman.mgmt_view_priv.set_view_user_creds ( repos_pwd ); sysman.mgmt_view_priv.GET_VIEW_USER_CREDS ( view_user, view_user_pwd ); execute immediate 'alter user ' || view_user || ' identified by ' || view_user_pwd || ''; END IF; end; 1 SYSMAN_PWD
Oct 28, 2009 11:27:58 AM oracle.sysman.emcp.EMReposConfig unlockAccounts
CONFIG: Failed to unlock mgmt_view account
Oct 28, 2009 11:27:58 AM oracle.sysman.emcp.EMReposConfig invoke
SEVERE: Failed to unlock all EM-related accounts
Oct 28, 2009 11:27:58 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Failed to unlock all EM-related accounts
Refer to the log file at /home/oracle/product/10.2.0/cfgtoollogs/emca/MDBLAV/emca_2009-10-28_11-26-52-AM.log for more details.
Oct 28, 2009 11:27:58 AM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Failed to unlock all EM-related accounts
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:253)
at oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:133)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:142)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:485)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1141)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:469)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:418)
This is the line in emca_2009-10-28_11-26-52-AM.log (another log) in same dir as previous.
SP2-0310: unable to open file "/home/oracle/product/10.2.0/sysman/admin/emdrep/sql/emreposcre.sql"
Thanks for your help. -
How to install and configure Oracle 10g Express Edition on Fedora 11?
Hi everyone!
I have recently installed Oracle 10g XE on my Laptop Gateway T-1625, which has Fedora 11.
I followed the install instructions on [http://st-curriculum.oracle.com/tutorial/DBXETutorial/index.htm] , and configured the server as explained, but something is wrong... When I try to go to the database home page http://127.0.0.1:8080/apex, I get "Failed to Connect" on Firefox 3.5b4... I don't think it's because of the Firefox version because it's proved to be very stable (for a beta).
I've search for similar issues on GNU/Linux and I found this thread in these forums: [ http://forums.oracle.com/forums/thread.jspa?threadID=915218&tstart=0] , but the solution is for Ubuntu 9.04, and if it's possible I would like to know a specific solution for Fedora 11.
I also tried to see the oracle server status with:
# /etc/init.d/oracle-xe status
And I got this....
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 25-JUN-2009 22:10:31
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=talos)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
I hope someone can help me out and guide me on the right direction. Thanks a lot!Hi again!
After your last post I realized that the dba group and the oracle user already existed.
#groupadd dba
groupadd: group dba exists
#useradd oracle -d /home/oracle -s /bin/bash -g dba
useradd: user oracle existsHowever, I finally assigned a password for that account and changed the ownership of the /usr/lib/oracle/xe
with the commands you suggested:
passwd oracle
chown -R oracle:dba /usr/lib/oracle/xeAfter this, I can log in as the oracle user but the SELinux showed a warning and the /usr/lib/oracle/xe
is treated as the oracle home, and no .bashrc file is located on this home. This is the SELinux warning:
SELinux is preventing gdm-session-wor (xdm_t) "write" to /usr/lib/oracle/xe (lib_t).
Details:
SELinux denied access requested by gdm-session-wor. /usr/lib/oracle/xe may
be a mislabeled. /usr/lib/oracle/xe default SELinux type is user_home_dir_t, but its
current type is lib_t. Changing this file back to the default type, may fix your problem.
File contexts can be assigned to a file in the following ways.
* Files created in a directory receive the file context of the parent
directory by default.
* The SELinux policy might override the default label inherited from the parent directory
by specifying a process running in context A which creates a file in a directory
labeled B will instead create the file with label C.
An example of this would be the dhcp client running with the dhclient_t type and
creates a file in the directory /etc. This file would normally receive the etc_t type due
to parental inheritance but instead the file is labeled with the net_conf_t type
because the SELinux policy specifies this.
* Users can change the file context on a file using tools such as chcon, or restorecon.
This file could have been mislabeled either by user error, or if an normally confined
application was run under the wrong domain.
However, this might also indicate a bug in SELinux because the file should not have
been labeled with this type.
If you believe this is a bug, please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against this package.
Allowing Acces:
You can restore the default system context to this file by executing the restorecon command.
restorecon '/usr/lib/oracle/xe', if this file is a directory, you can recursively restore using
restorecon -R '/usr/lib/oracle/xe'.
Fix command:
restorecon '/usr/lib/oracle/xe'I suppose the command #useradd oracle -d /home/oracle -s /bin/bash -g dba is where I can define the user's home, but if this user already exists how can I modify its settings?
is SELinux preventing the .bashrc file to be created? or what could be causing this?.
I hope you know how much I appreciate your help and want to thank you for your time. -
How to use help in oracle 10g XE
Hello,
I just wanted to know how to use help in sql command line in oracle 10g XE
regards,
Sreekanth.Hi thankyou very much for the answer, that web-page is very good but....
I was hoping for answer that would walk me through the help command used in the SQL PLUS like: "help create"
after i have read few manuals i came to know we can use @hlpbld.sql for building help tables it asks me for entering value 1 and 2, after that it exits the prompt and when i re-login i dont see "help command" working...
any comments ot procedure to do this... -
How to access MYSQL from Oracle 10g and vice versa
I will like to know how do I create a database link between Oracle 10g and MYSQL database on windows. I have been saddled with responsibility of ensuring the communications between the 2 databases and I have searched everywhere on google, I could not find anywhere where this is explain explicitly and made work.
THank youIn general Oracle offers 2 different products to connect from an Oracle database to a MS SQL Server. The first product is for free and it is called
As DG4ODBC is a generic connectivity based on ODBC it allows you to connect to many foreign databases as long as you have a suitable ODBC driver.It for example allows you to read from text files but also connect to foreign databases like MS SQL Server or IBM DB2. Due to this wide variety of foreign data sources tha capabilities of DG4ODBC are very limited. It only supports a few Oracle functions that it can directly map to foreign database equivalents. All other functions will be post processed. Post processing means that ALL records from the foreign table(s) will be fetched into the Oracle database and the result is then processed locally - so depending on the amount of data stored in the foreign database it might take a while.
To be complete here some notes to follow up:
This Oracle support note describes possible options you have to connect to a foreign database:
Document 233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases - For example - DB2, SQL*Server, Sybase, Informix, Teradata, MySQL
So you see, to connect from Oracle to MySQL you need to use the Database gateway for ODBC release 11.2 (HSODBC which was shipped with 10g was desupported in march 2008).
The Database Gateway for ODBC 11.2 (=DG4ODBC) license is included in the Oracle database license and it allows you to connect with a suitable 3rd party ODBC driver to a foreign database.
For your MySQL connection you only need to download and configure the MySQL ODBC driver from the MySQL web site. Once you can connect with the ODBC driver you could then download and configure DG4ODBC.
As you didn't post on which platform your Oracle database is installed, here 2 notes for common platforms:
How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle (Doc ID 561033.1)
How to Configure DG4ODBC (Oracle Database Gateway for ODBC) on 64bit Windows Operating Systems to Connect to Non-Oracle Databases Post Install (Doc ID 1266572.1)
- Klaus -
How to see lock on table and query?
Hi All,
How do we see lock on table and query?
Thanks,
RafiYes Rafi,
It is working fine at my end. See below:
Opened Session 1 with scott/tiger and:
update emp set ename='xx' where empno=7499;
Opened Session 2 with scott/tiger and:
update emp set ename='xx' where empno=7499;
<<Its lock here>> This session is locked by above one.
Opened Session 3 with sys/pw as sysdba and:
SQL> set serveroutput on
SQL> BEGIN
2 dbms_output.enable(1000000);
3 for do_loop in (select session_id, a.object_id, xidsqn, oracle_username, b.owner owner,
4 b.object_name object_name, b.object_type object_type
5 FROM v$locked_object a, dba_objects b
6 WHERE xidsqn != 0
7 and b.object_id = a.object_id)
8 loop
9 dbms_output.put_line('.');
10 dbms_output.put_line('Blocking Session : '||do_loop.session_id);
11 dbms_output.put_line('Object (Owner/Name): '||do_loop.owner||'.'||do_loop.object_name);
12 dbms_output.put_line('Object Type : '||do_loop.object_type);
13 for next_loop in (select sid from v$lock
14 where id2 = do_loop.xidsqn
15 and sid != do_loop.session_id)
16 LOOP
17 dbms_output.put_line('Sessions being blocked : '||next_loop.sid);
18 end loop;
19 end loop;
20 END;
21 /
Blocking Session : 139
Object (Owner/Name): SCOTT.EMP
Object Type : TABLE
Sessions being blocked : 134
PL/SQL procedure successfully completed.HTH
Girish Sharma
Maybe you are looking for
-
HT1373 One of my albums will no longer play in iTunes. How can I fix this?
It appears in iTunes, but the songs will not show up. I can listen to it via iTunes on a different computer.
-
Business System and Logical system
Hi Experts, in SAP if we want to exchange the Data between the systems we use Logical Syestem. Why we need Logical systems basically? and Why need Business system in XI? Thanks, Manoj.
-
How can I do to install a domain like wndows service in JCAPS 6.0?
I'm using JCAPS 6.0 and to start the domain I have to invoke eveytime: $ asadmin start-domain --user admin domain1 Is possible create a windows service that permit to call this procedure directly?
-
Process Context changes (.XSD) are not refreshed in the Task Mapping
Hello, I'm adding new attributes to the .XSD but the changes are not refreshed in the mapping section of the tasks. How can I refreshed these changes? Best Regards SU
-
Application exe file cannot get FieldPoint data
I built an application exe file from my development notebook computer (Win XP) that have LV7.1 and Max 3.1. The stand alone exe file runs well in the same notebook. But it could not get any FP data when it is running from a target computer (Win 2000)