Oracle:DDL和事务回滚 [英] Oracle: DDL and transaction rollback

查看:275
本文介绍了Oracle:DDL和事务回滚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Oracle DDL(创建/更改)中是否可以像在MS SQL(从2005年开始)中那样进行事务处理?

Could in Oracle DDL (create/alter) be transactional like they are in MS SQL (started from 2005)?

推荐答案

否.在Oracle DDL语句中,它们本身不是事务性的.

No. In Oracle DDL statements themselves are not transactional.

运行DDL语句将隐式提交该会话的所有未完成的事务,然后再开始实际工作.

Running a DDL statement will implicitly commit any open transaction for that session before starting the actual work.

此外,如果另一个会话在正在修改的对象或其依赖项之一上具有打开的事务,则某些语句(如alter table语句)可能会失败.您可以设置 ddl_lock_timeout 来指定您希望Oracle等待对象变为可用的时间.

In addition some statements, like an alter table statement, may fail if another session has an open transaction on the object being modified or one of its dependencies. You can set a ddl_lock_timeout to specify how long you want Oracle to wait for the object to become available.

请参见 DDL语句 DDL语句类型的摘要以及有关它们在锁和事务中的行为的信息.

See DDL Statements for a summary of types of DDL statements and information about their behaviour regarding locks and transactions.

这篇关于Oracle:DDL和事务回滚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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