ORACLE SQL总结二:集合操作符合和DML语句(二)

2014-11-24 17:02:14 · 作者: · 浏览: 1
ent, even if the statement results in an error
-After any data definition language (DDL) statement that completes without an error
ORACLE数据库隐式地执行COMMIT在如下情形下:
-在任何DDL语句语法验证之前,甚至这条语句执行结果是错误的。
-在任何DDL语句没有错误地执行完成之后。
4.2 ROLLBACK的疑问,DBA_2PC_PENDING为什么是空的?
ROLLBACK中的FORCE从句
FORCE Clause
www.2cto.com
Specify FORCE to manually roll back an in-doubt distributed transaction. The transaction is identified by the string containing its local or global transaction ID. To find the IDs of such transactions, query the data dictionary view DBA_2PC_PENDING.
A ROLLBACK statement with a FORCE clause rolls back only the specified transaction. Such a statement does not affect your current transaction.
01
SQL> desc dba_2pc_pending;
02
Name Null Type
03
----------------------- -------- ----------------
04
LOCAL_TRAN_ID NOT NULL VARCHAR2(22)
05
GLOBAL_TRAN_ID VARCHAR2(169)
06
STATE NOT NULL VARCHAR2(16)
07
MIXED VARCHAR2(3)
08
ADVICE VARCHAR2(1)
09
TRAN_COMMENT VARCHAR2(255)
10
FAIL_TIME NOT NULL DATE
11
FORCE_TIME DATE
12
RETRY_TIME NOT NULL DATE
13 www.2cto.com
OS_USER VARCHAR2(64)
14
OS_TERMINAL VARCHAR2(255)
15
HOST VARCHAR2(128)
16
DB_USER VARCHAR2(30)
17
COMMIT# VARCHAR2(16)
18
19
SQL> select * from dba_2pc_pending where db_user='OE';
20
21
no rows selected
作者 yeyelei