表锁定在Oracle数据库中
我知道一些会话(例如插入或删除查询)锁定表,我们应该等到该会话结束直到表上运行另一个Alter查询。 此时,我们通常会面临“资源繁忙”错误。 但是有时,即使会话已经结束并且状态已更改为“无活动”,该会话仍保留并锁定表,我们的解决方案将是杀死它并免费设置桌子以进行进一步的操作。 我的问题是为什么会发生这种情况?我的意思是,为什么正常的改变会话成为锁定,直到我们杀死它? 无论如何,我们是否有防止这个问题? 我希望解释很清楚。 感谢您提前的帮助!
I understand that some sessions like insert or delete queries lock the table and we should wait until that session ends to run another alter query on the table.
We usually face 'resource busy' error at this times.
But sometimes even though the session has been ended and it's status has been changed to 'INACTIVE', this session remains and locks the table and our solution will be to just kill it and set the table free for further actions.
My question is why this happens? I mean why does a normal altering session becomes a lock and remains until we kill it?
Is there anyway for us to prevent this problem?
I hope the explanation was clear.
Thank you for your help in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论