Oracle table is locked collection solution

2011-01-18  来源:本站原创  分类:Database  人气:73 

1 The following statement is used to check which objects are locked:

select object_name, machine, s.sid, s.serial #
from v $ locked_object l, dba_objects o, v $ session s
where l.object_id = o.object_id and l.session_id = s.sid

2 The following statement is used to kill a process:

alter system kill session '24, 111 '; (of which 24,111 were above check out sid, serial #)

[Note] above two steps, through the implementation of Oracle's management console. The user must have the appropriate permissions.

3 If you use the above command to kill a process, the process state is set to "killed", but the resources locked for a long time has not been released, you can then kill the os a corresponding process (thread), the first Execute the following statement to obtain the process (thread) number:

select spid, osuser, s.program

from v $ session s, v $ process p

where s.paddr = p.addr and s.sid = 24 (24 is above sid)

4 on the OS to kill the process (thread):

1) on unix, execute commands as root:

# Kill -9 12345 (that is, Step 3 check out the spid)

2) windows (unix also applies to) use orakill kill threads, orakill is the oracle provides an executable command, the syntax is:

orakill sid thread

Of which:

sid: to kill a process that belongs to the instance name

thread: to kill the thread number, that is Step 3 check out the spid.

Example: c:> orakill orcl 12345

相关文章
  • Oracle table is locked collection solution 2011-01-18

    1 The following statement is used to check which objects are locked: select object_name, machine, s.sid, s.serial # from v $ locked_object l, dba_objects o, v $ session s where l.object_id = o.object_id and l.session_id = s.sid 2 The following statem

  • oracle table analysis - the collection of statistical information 2011-05-24

    1. Analysis of the statistics table updated information, it may lead to the implementation plan to change .. 2. To the analyze table abc compute statistics; this example, the statistics generated will be present in the user_tables this view, look at

  • Oracle table is locked, unlock method 2011-05-10

    1. The following statement is used to check which objects are locked: select object_name, machine, s.sid, s.serial # from v $ locked_object l, dba_objects o, v $ session s where l.object_id = o.object_id and l.session_id = s.sid; 2. The following sta

  • Oracle table lock lift 2010-03-23

    --================ First look for a blocked user ==================== SELECT /*+ rule */ s.username, decode(l.type,'TM','TABLE LOCK', 'TX','ROW LOCK', NULL) LOCK_LEVEL, o.owner,o.object_name,o.object_type, s.sid,s.serial#,s.terminal,s.machine,s.progr

  • oracle table partition Xiangjie 2010-05-28

    Article from the following aspects to organize the partition table on the concept and operation: 1. Table space and the concept of partition table 2. Form the specific role of district 3. Table advantages and disadvantages of partition 4. Table parti

  • Oracle data dictionary concept collection 2010-09-02

    Oracle data dictionary concept collection oracle database system is a complex software system. If you do not understand the principles of its internal structure and relationships, we can not design and write high-quality application software system,

  • Oracle table partitions Xiangjie 2010-09-26

    Article from the following aspects to organize the partition table on the concept and operation: 1. Table space and the concept of partition table 2. Form the specific role of district 3. Table advantages and disadvantages of partition 4. Table parti

  • Detailed turn == oracle table partition 2010-10-18

    Heard before the partition table, but has not been used, and he is seen, but have not experimented with, Now the company uses table partitioning, and finally realized its power capability. The following is a very good article written, Thanks! Reprodu

  • Detailed oracle table partition 2010-11-03

    heard before the partition table, but has not been used, and he is seen, but have not experimented with, Now the company uses table partitioning, and finally realized its power capability. The following is a very good article written, Thanks! Reprodu

  • Oracle table to unlock 2010-12-07

    Reprinted: Oracle table to unlock http://toyota2006.javaeye.com/blog/599255 Other information: ORACLE locks on the table and unlock Summary http://linux.net527.cn/fuwuqiyingyong/Oracle/2010/1103/30162.html Table 1 to obtain the information locked SEL

  • Oracle table space recovery so you will not worry about the database error 2011-01-06

    Learning Oracle, you may encounter oracle table space recovery, here describes the Oracle table space recovery solution to the problem, out here and share with you. Oracle table space recovery program One. User Table space error: When starting the da

  • Oracle table partitioning Detailed 2010-09-26

    This article from the following aspects to organize the partition table on the concept and operation: 1 table space and the concept of partition table (2) the specific role of the partition table 3 advantages and disadvantages of the table partition

  • oracle table to build a serious problem 2010-10-18

    http://space.itpub.net/16566331/viewspace-672158 oracle table to build a serious problem in this write, draw attention to: To briefly write about the wrong content, such as you have discovered and are known to approach this problem, please ignore thi

  • Unlock an Oracle table 2010-12-07

    Reproduced: Oracle table to unlock http://toyota2006.iteye.com/blog/599255 Other information: ORACLE locks on the table and unlock Summary http://linux.net527.cn/fuwuqiyingyong/Oracle/2010/1103/30162.html 1 to obtain the information locked table SELE

  • oracle table space operation / user rights / Import Export 2011-04-06

    About oracle tablespace Oracle table space is the basic method of data management, all the objects to be stored in the user table space, that is, users have the right to use space to create a user object. Otherwise it is not permitted to create an ob

  • Advanced space-DBA Oracle table 2011-08-10

    First, the basic concept: Oracle table space is a special invention. Physically, the database data stored in the data file; Logically, the database is stored in one or more table space. Logical structure, including tablespaces, segments, areas and bl

  • (R) ORACLE table connections and common usage analysis 2011-09-14

    Abstract: In the data warehouse environment, due to large amount of data generated by the processing efficiency, this in-depth analysis of the ORACLE table Of the several connections, characteristics, scope, and how to use and optimized for a detaile

  • ORACLE table connection analysis and common usage <switch> 2011-09-14

    Abstract: In the data warehouse environment, due to large amount of data generated by the processing efficiency, this in-depth analysis of the ORACLE table Of the several connections, characteristics, scope, and how to use and optimized for a detaile

  • oracle table partition explain (rpm) 2011-10-10

    This article from the following aspects to organize the partition table on the concept and operation: 1 table space and the concept of partition table (2) the specific role of the partition table 3 advantages and disadvantages of the table partition

  • 5.oracle table queries (1) 2010-03-05

     oracle table describes the basic query we explain the process, we use the existence of several forms scott user (emp, dept) as we demonstrate how to use the select statement, select statement is very useful in software programming, hope Be kind to