SQL Server和Oracle中的锁和死锁
2008-09-02 12:46:27 来源:WEB开发网update HR.JOBS
SET JOB_title = ’S.President’
where job_id = ’AD_PRES’;
步骤三:
重新ORACLE SQL *plus 之一窗口,执行
update HR.JOBS
SET JOB_title = ’S.President’
where job_id = ’AD_PRES’;
发现已经无法完成,因为在等待资源释放。
步骤四:
登陆ORACLE SQL *plus 之二窗口,执行:
update HR.JOBS
SET JOB_title = ’S.Finance Manager’
where job_id = ’FI_MGR’
此时出现ORA-00060错误,如下图所示:
发现报出错误,系统检测到死锁,此时打开C:oracleadminORADBudump的oradb_ora_5528文件会发现已经记录了死锁deadlock日志,文字如下:
*** 2008-07-05 16:46:43.000
*** SESSION ID:(17.16) 2008-07-05 16:46:43.000
DEADLOCK DETECTED
Current SQL statement for this session:
update HR.JOBS
SET JOB_title = ’S.President’
where job_id = ’AD_PRES’
The following deadlock is not an ORACLE error. It is a
deadlock due to user error in the design of an application
or from issuing incorrect ad-hoc SQL. The following
infromation may aid in determining the deadlock:
Deadlock graph:
---------Blocker(s)-------- ---------Waiter(s)---------
Resource Name process session holds waits process session holds waits
TX-000a0002-00001904 16 17 X 17 18 X
TX-00010010-00001917 17 18 X 16 17 X
session 17: DID 0001-0010-00000003session 18: DID 0001-0011-00000003
session 18: DID 0001-0011-00000003session 17: DID 0001-0010-00000003
Rows waited on:
Session 18: obj - rowid = 00007339 - AAAHM5AAFAAAABGAAD
(dictionary objn - 29497,file- 5, block - 70, slot - 3)
Session 17: obj - rowid = 00007339 - AAAHM5AAFAAAABGAAA
(dictionary objn - 29497, file - 5, block - 70, slot - 0)
Information on the OTHER waiting sessions:
Session 18:
pid=17 serial=20 audsid=0 user: 0/SYS
O/S info: user: WANGTMwangtm, term: WANGTM, ospid: 5200:4876, machine: WORKGROUPWANGTM
prigram: sqlplusw.exe
Current SQL Statement:
update HR.JOBS
SET JOB_title = ’S.Finance Manager’
where job_id = ’FI_MGR’
End of information on OTHER waiting sessions.
- ››sql server自动生成批量执行SQL脚本的批处理
- ››sql server 2008亿万数据性能优化
- ››SQL Server 2008清空数据库日志方法
- ››oracle 中 UPDATE nowait 的使用方法
- ››Oracle ORA-12560解决方法
- ››Oracle 10g RAC 常用维护命令
- ››Oracle如何在ASM中定位文件的分布
- ››sqlserver安装和简单的使用
- ››SQL Sever 2008 R2 数据库管理
- ››SQL SERVER无法安装成功,sqlstp.log文件提示[未发...
- ››Oracle的DBMS_RANDOM.STRING 的用法
- ››oracle 外部表导入时间日期类型数据,多字段导入
赞助商链接