ITPub博客

首页 > IT基础架构 > 网络安全 > Overview of Transaction Management (142)

Overview of Transaction Management (142)

原创 网络安全 作者:tsinglee 时间:2007-11-05 11:41:40 0 删除 编辑

A transaction in Oracle begins when the first executable SQL statement is encountered.
An executable SQL statement is a SQL statement that generates calls to an instance,
including DML and DDL statements.
When a transaction begins, Oracle assigns the transaction to an available undo
tablespace to record the rollback entries for the new transaction.
A transaction ends when any of the following occurs:
■ A user issues a COMMIT or ROLLBACK statement without a SAVEPOINT clause.
■ A user runs a DDL statement such as CREATE, DROP, RENAME, or ALTER. If the
current transaction contains any DML statements, Oracle first commits the
transaction, and then runs and commits the DDL statement as a new, single
statement transaction.
■ A user disconnects from Oracle. The current transaction is committed.
■ A user process terminates abnormally. The current transaction is rolled back.
After one transaction ends, the next executable SQL statement automatically starts the
following transaction.

事务管理
1. 事务以第一条可执行的SQL语句(对实例产生calls)开始 , 包括DML和DDL语句 .
2. 当事务开始时 , Oracle分配回滚表空间来记录回滚条目
3. 当碰到以下情况时 , 事务结束
a. 指定commit或rollback语句
b. 运行一个DDL语句
c. 用户断连 , 当前事务被提交
d. 用户进程非正常终止 , 当前事务被回滚

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10599713/viewspace-980850/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    2002932