« 《Oracle数据库性能优化》一书即将出版 | Blog首页 | Oracle10g的UNDO_RETENTION自动化管理增强 »
使用SET TRANSACTION给事务命名
作者:eygle | 【转载请注出处】|【云和恩墨 领先的zData数据库一体机 | zCloud PaaS云管平台 | SQM SQL审核平台 | ZDBM 数据库备份一体机】
链接:https://www.eygle.com/archives/2005/03/eoaset_transact.html
以前没有注意的命令,可以使用SET TRANSACTION给事务命名。链接:https://www.eygle.com/archives/2005/03/eoaset_transact.html
v$transaction中的name字段代表的正是:Name of a named transaction。
[oracle@jumper bdump]$ sqlplus "/ as sysdba" SQL*Plus: Release 9.2.0.4.0 - Production on Mon Mar 14 23:17:21 2005 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production With the Partitioning option JServer Release 9.2.0.4.0 - Production SQL> set transaction name 'Update Dept Table'; Transaction set. SQL> select * from scott.dept; DEPTNO DNAME LOC ---------- -------------- ------------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON 33 ORACLE Beijing 35 Oracle Beijing 36 Oracle Beijing 37 Oracle Beijing 8 rows selected. SQL> update scott.dept set LOC='Home' where deptno=35; 1 row updated. SQL> select xidusn,xidslot,xidsqn,used_ublk,used_urec,name from v$transaction; XIDUSN XIDSLOT XIDSQN USED_UBLK USED_UREC NAME ---------- ---------- ---------- ---------- ---------- -------------------- 3 17 9120 1 1 Update Dept Table |
历史上的今天...
>> 2018-03-14文章:
>> 2012-03-14文章:
>> 2011-03-14文章:
>> 2010-03-14文章:
>> 2009-03-14文章:
>> 2008-03-14文章:
By eygle on 2005-03-14 23:34 | Comments (0) | FAQ | 203 |