免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4855 | 回复: 2
打印 上一主题 下一主题

请教latch sleep状态问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-09-30 15:20 |只看该作者 |倒序浏览
今天数据库突然出现锁进程,导致数据库无法使用,使用kill命令也不能将进程杀掉,在不停的执行kill的过程中发现数据库中进程状态出现了:latch sleep,在之前的使用中,从未发现过这种状态,想请教一下到底因为什么原因导致的出现这种状态。

论坛徽章:
0
2 [报告]
发表于 2006-10-03 07:39 |只看该作者
写物理盘等待,检查是不是阵列/盘有问题

论坛徽章:
0
3 [报告]
发表于 2006-10-03 23:16 |只看该作者
It means that the corresponding spid was waiting to acquire a latch on a particular datapage and is being blocked by another spid. A latch is similar to a lock. But, latches are of extremely short duration.


Information on Latches:
===================

Latches are nontransactional synchronization mechanisms used to guarantee the physical consistency of a page. While rows are being inserted, updated or deleted, only one Adaptive Server process can have access to the page at the same time. Otherwise, changes could overwrite each other. Latches are used for both datapages and datarows locking. They are not used for changes to tables using the allpages locking scheme.

The most important distinction between a lock and a latch is the duration:
A lock can persist for a long period of time: while a page is being scanned, for the duration of a statement, or for the duration of a transaction.
A latch is held only for the time required to insert or move a few bytes on a data page, to copy pointers, columns or rows, or to acquire a latch on another index page.
In datarows locking, row-level locks are acquired on individual rows on data pages. Index rows and pages are not locked. When a row needs to be changed on a data page, a nontransactional latch is acquired on the page. The latch is held while the physical change is made to the data page, and then the latch is released. The lock on the data row is held until the end of the transaction. The index rows are updated, using latches on the page, but are not locked. Index entries are implicitly locked by acquiring a lock on the data row.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP