为什么SQL * Plus在退出时提交? [英] Why does SQL*Plus commit on exit?

查看:106
本文介绍了为什么SQL * Plus在退出时提交?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当然这应该与会话终止相同并引起回滚吗?在我看来,这可能是最与Oracle无关的事情.当我发现它做到了这一点时,我真的感到震惊

Surely this should be the same as a termination of a session and cause a rollback? It seems to me to be the most un-Oracle thing possible. I was actually shocked when I found out that it did this

更重要的是-如果Oracle将其更改为在退出时回滚,会有人反对吗?

More importantly - would anyone object if Oracle changed it to rollback on exit?

推荐答案

有趣的是,随着本周(2009-09-03)发行的11gR2,SQL * Plus现在可以选择退出时执行COMMIT或ROLLBACK. Doc 此处

Funnily enough, with the 11gR2 release this week (2009-09-03), SQL*Plus now has an option to COMMIT or ROLLBACK on EXIT. Doc here

我猜在接下来的几周/几个月中,将会有一个11gR2 Instant Client,您可以将其用于当前数据库并获得所需的行为

I'd guess in the next few weeks/months, there'll be an 11gR2 Instant Client which you can use against your current database and get your desired behaviour

要注意的警告.如果您将DISCONNECT或CONNECT 设置为其他会话,它仍然会隐式提交事务(根据文档).

A caution to be aware of. If you DISCONNECT or CONNECT to a different session, it will still implicitly commit the transaction (according to the doc).

这篇关于为什么SQL * Plus在退出时提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆