易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle死锁的检测及处理

一. 死锁的检测
   --查死锁的会话。
select  A.sid, b.serial#,
 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',
    'TS', 'Temp Segment',
    'IV', 'Library Cache Invalida-tion',
    'LS', 'Log Start or Switch',
    'RW', 'Row Wait',
    'SQ', 'Sequence Number',
    'TE', 'Extend Table',
    'TT', 'Temp Table',
    'Unknown') LockType,
 c.object_name,
 b.username,
 b.osuser,
 decode(a.lmode,   0, 'None',
            1, 'Null',
            2, 'Row-S',
            3, 'Row-X',
            4, 'Share',
            5, 'S/Row-X',
            6, 'Exclusive', 'Unknown') LockMode,
 B.MACHINE,D.SPID ,b.PROGRAM
 from v$lock a,v$session b,all_objects c,V$PROCESS D
 where a.sid=b.sid and a.type in ('TM','TX')
 and c.object_id=a.id1
 AND B.PADDR=D.ADDR
二. 发生死锁后的处理方法
1. 9i以后的版本,oracle会自动检测死锁,检测到有死锁后会回滚或提交其中一个事务,使死锁消除.
2. ALTER SYSTEM KILL 'SID,SIEREL#' 注意:有可能产生两个会话SID为一样


相关文档:

.net在web.config中连接oracle数据库

1.asp.net连接oracle服务器需要添加Sytem.Data.OracleClient命名空间,将System.Data.OracleClient.dll加入到项目中。
2.连接时需要ConnectionString字符串,出现在web.config文件中,如下所示:
<connectionStrings>
   <add name="ConnectionString" connectionString="Data Source=(DESCRIPTION=( ......

oracle中调用带参数的存储过程

create or replace procedure proc_test
( a in number, b out number )
as
begin
b:=a+1;
end    proc_test;
现在要调用的话就是这样
SQL> c number;
SQL>exec proc_test(1,:c);
千万要注意别忘了写冒号 ......

如何在Oracle中复制表结构和表数据


1. 复制表结构及其数据:
create table table_name_new as select * from table_name_old
2. 只复制表结构:
create table table_name_new as select * from table_name_old where 1=2;
或者:
create table table_name_new like table_name_old
3. 只复制表数据:
如果两个表结构一样:
insert into table_name_ ......

Oracle Schema Objects

Introduction to Schema Objects
A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema. Schema objects can be created and manipulated with SQL and include the following types o ......

Oracle Application Express 的安装

安装前的准备:
      登录系统:sqlplus system/0621
1.   从数据字典v$instance中获取数据库的实例名和版本号:select instance_name,version from v$instance;
2.   从数据字典v$version中获取版本的详细信息:select * from v$version;
3.确认oracle所使用的参数文件 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号