ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Transaction Naming

Transaction Naming

原创 Linux操作系统 作者:lsq_008 时间:2008-10-10 20:02:23 0 删除 编辑

使用命令set transaction name 可以给事务命名,有如下优点:

  • It is easier to monitor long-running transactions and to resolve in-doubt distributed transactions.
  • You can view transaction names along with transaction IDs in applications. For example, a database administrator can view transaction names in Enterprise Manager when monitoring system activity.
  • Transaction names are written to the transaction auditing redo record, if compatibility is set to Oracle9i or higher.
  • LogMiner can use transaction names to search for a specific transaction from transaction auditing records in the redo log.
  • You can use transaction names to find a specific transaction in data dictionary tables, such as V$TRANSACTION.

测试如下:

SQL> set transaction name 'update emp';
 
Transaction set.
 
SQL> update emp set ename='asdf';
 
16 rows updated.

SQL> l
  1  select addr,status,start_time,noundo,name,log_io,phy_io,
  2  cr_get,USED_UBLK
  3* from v$transaction
SQL> /
 
ADDR     STATUS           START_TIME           NOU NAME                     LOG_IO     PHY_IO     CR_GET  USED_UBLK
-------- ---------------- -------------------- --- -------------------- ---------- ---------- ---------- ----------
5555409C ACTIVE           10/10/08 20:06:51    NO  update emp                  277          0          4          2

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

请登录后发表评论 登录
全部评论
十余年大型金融及电信系统数据库管理经验,曾服务于中国建设银行、中国移动。对oracle,mysql数据库有深入了解。 擅长python开发,独立开发了开源数据库自动化监控运维平台Power Monitor。

注册时间:2008-02-29

  • 博文量
    335
  • 访问量
    1369155