oracle query the table and release the locked session

2010-06-10  来源:本站原创  分类:Database  人气:188 

In development projects often find someone to lock the table without letting go

We can pass alter system kill session 'sid, serial #' command to solve!

By the following sql to find the sid, serial # and related information

SELECT A.OWNER,
A.OBJECT_NAME,
B.XIDUSN,
B.XIDSLOT,
B.XIDSQN,
B.SESSION_ID,
B.ORACLE_USERNAME,
B.OS_USER_NAME,
B.PROCESS,
B.LOCKED_MODE,
C.MACHINE,
C.STATUS,
C.SERVER,
C.SID,
C.SERIAL#,
C.PROGRAM
FROM ALL_OBJECTS A,
V$LOCKED_OBJECT B,
SYS.GV_$SESSION C
WHERE A.OBJECT_ID = B.OBJECT_ID
AND B.PROCESS = C.PROCESS  and C.STATUS='ACTIVE'
ORDER BY 1,2 
相关文章
  • oracle query the table and release the locked session 2010-06-10

    In development projects often find someone to lock the table without letting go We can pass alter system kill session 'sid, serial #' command to solve! By the following sql to find the sid, serial # and related information SELECT A.OWNER, A.OBJECT_NA

  • Oracle query a table adopted after the traverse and then insert another table in two ways for writing 2011-05-24

    The first is: Block by using the Oracle declare cursor cur_test is select widgetid from t_widget; begin for c in cur_test loop insert into t_tag (tagid, widgetid, userid, tagname, tagdate) values ​​(s_tag_tagid.nextval, c.widgetid, '15895829126 ',' n

  • Oracle query a table and then later by walking into another table, two kinds of writing 2011-05-24

    The first: Block by using the Oracle declare cursor cur_test is select widgetid from t_widget; begin for c in cur_test loop insert into t_tag (tagid, widgetid, userid, tagname, tagdate) values ​​(s_tag_tagid.nextval, c.widgetid, '15895829126 ',' nanj

  • Oracle query the table and locked the process approach 2011-05-09

    View lock table processes SQL statements 1: select sess.sid, sess.serial#, lo.oracle_username, lo.os_user_name, ao.object_name, lo.locked_mode from v$locked_object lo, dba_objects ao, v$session sess where ao.object_id = lo.object_id and lo.session_id

  • ORACLE query partition table 2011-04-12

    If [the partition table] in the field [createdate] on the partition, a partition for the month: June 2009 for the partition P200906 July 2009 for the partition P200907 August 2009 for the partition P200908 . . . Partition key used to execute SQL to r

  • How to kill locked Session.sql 2010-11-30

    - How to quickly kill the Oracle's Session /*================================================ ============================== The data collected by the network have been verified, but data on the use and impact of the consequences is not responsible f

  • How to kill the locked Session.sql 2010-11-30

    - How quickly kill the Oracle Session /*================================================ ============================== The data collected by the network, has been verified, but the consequences of using information and assumes no responsibility for

  • Oracle query table space usage (transfer) 2010-03-27

    - Query the table space usage SELECT UPPER (F. TABLESPACE_NAME) "table space name", D. TOT_GROOTTE_MB "table space (M)", D. TOT_GROOTTE_MB - F. TOTAL_BYTES "has been the use of space (M)", TO_CHAR (ROUND ((D. TOT_GROOTTE_MB -

  • oracle query table information (tables, fields, constraints, index) 2010-08-04

    Query oracle table information (tables, fields, constraints, index) (change) Explored by searching, summed up what oracle query table information, including table names, field names, field types, primary keys, foreign key unique constraint informatio

  • Oracle query all the columns in a table name, then the column name, classification. 2010-08-08

    Oracle query all the columns in a table name, then the column names, the classification of different data types together. select column_name,data_type from user_tab_columns where table_name = 'SZKB' order by data_type SELECT COLUMN_NAME ,data_type FR

  • oracle query to insert a new table record 2010-10-15

    oracle query to insert a new table record 1. create table copyTable1 as select * from table1 2. insert into table select ****

  • [Zhuantie] Oracle query table space usage 2010-12-03

    - Query the table space usage SELECT UPPER (F. TABLESPACE_NAME) "table space name", D. TOT_GROOTTE_MB "table space size (M)", D. TOT_GROOTTE_MB - F. TOTAL_BYTES "has been the use of space (M)", TO_CHAR (ROUND ((D. TOT_GROOTTE

  • Oracle query the user table statements for all 2011-07-29

    select * from user_tab_privs query of the current user privileges. The following statement is used to introduce you to achieve all of the Oracle query the user table, if you are interested in oracle query, then, worth a look. select * from all_tab_co

  • oracle query basic information table 2010-12-16

    Check all the tables a prefix; select * from tab where upper(tname) like 'RP%' Because some of the Oracle Project module data structure design is not strictly in accordance with a standard design , We can only query data from the database structure,

  • oracle query the user table 2011-04-27

    ◆ Oracle query the user table space: select * from user_all_tables ◆ Oracle query all the functions and storage: select * from user_source ◆ Oracle query for all users: select * from all_users.select * from dba_users ◆ Oracle view current user connec

  • oracle query foreign key corresponding to the master table 2011-05-19

    oracle query foreign key corresponding to the master table: select pk.table_name, fk.table_name, fk.constraint_name from (Select * from user_constraints where constraint_type = 'R') fk, (Select * from user_constraints where constraint_type = 'P') pk

  • What query ORACLE EBS interface table 2010-10-30

    Oracle EBS interface table: SELECT * FROM dba_objects db WHERE db.object_type = 'TABLE' AND db.object_name LIKE '%INTERFACE%'; SELECT * FROM dba_objects db WHERE db.object_type = 'TABLE' AND db.object_name LIKE '%INTERFACE%' AND owner LIKE 'PO';

  • oracle query table name and column name comments comments 2010-11-30

    Query the table name and comments select a.table_name, b.comments from user_tables a, ALL_TAB_COMMENTS b where a.table_name = b.table_name Check the name and comments field select distinct a.COLUMN_NAME, b.comments from user_tab_columns a, user_col_c

  • oracle 9i temporary table space 2010-03-04

    Taken from: http://hi.baidu.com/zzztou/blog/item/f8733707008383c87b8947b3.html Normally, the complete Select statement, create index using the TEMP table space and some sort is done, Oracle will automatically release the temporary section of a swap o

  • Oracle Create User Table space import and export command (turn) 2011-06-21

    / / Create a temporary table space create temporary tablespace test_temp tempfile 'E: \ oracle \ product \ 10.2.0 \ oradata \ testserver \ test_temp01.dbf' size 32m autoextend on next 32m maxsize 2048m extent management local; / / Create a data table