Chinaunix首页 | 论坛 | 博客
  • 博客访问: 970106
  • 博文数量: 358
  • 博客积分: 8185
  • 博客等级: 中将
  • 技术积分: 3751
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 16:27
个人简介

The views and opinions expressed all for my own,only for study and test, not reflect the views of Any Company and its affiliates.

文章分类

全部博文(358)

文章存档

2012年(8)

2011年(18)

2010年(50)

2009年(218)

2008年(64)

我的朋友

分类:

2009-08-31 17:39:14

※※
--used for undo information
/******
sqlplus
set timing on
set pagesize 400
set linesize 7000
col USERNAME format a10
col OSUSER format a20
col MACHINE format a20
col PROGRAM format a20
col SEGMENT_NAME format a20
*/
SELECT s.username,
       s.sid,
       pr.PID,
       s.OSUSER,
       s.MACHINE,
       s.PROGRAM,
       rs.segment_id,
       r.usn,
       rs.segment_name,
       r.rssize / 1024 / 1024 as rssize_M,
       sq.sql_text
  FROM v$transaction     t,
       v$session         s,
       v$rollstat        r,
       dba_rollback_segs rs,
       v$sqltext         sq,
       v$process         pr
 WHERE s.saddr = t.ses_addr
   AND t.xidusn = r.usn
   AND rs.segment_id = t.xidusn
   AND s.sql_address = sq.address
   AND s.sql_hash_value = sq.hash_value
   AND s.PADDR = pr.ADDR
 ORDER BY t.used_ublk DESC, sq.PIECE;
 
***********************************************
■Parameters for Undo Management and Retention Guarantee
・UNDO_MANAGEMENT    auto/manual  This parameter is static
・UNDO_TABLESPACE                The other parameters are dynamic
・UNDO_RETENTION                 The other parameters are dynamic
Retention Guarantee clause.
all queries will complete successfully, provided they finish within the undo retention time; you will never have “snapshot too old” errors again. The downside is that transactions may fail for lack of undo space because Oracle cannot overwrite committed undo data until the retention time has passed

sql:
・CREATE UNDO TABLESPACE GAU01R DATAFILE 'gau01r0d1.dbf' SIZE 50M AUTOEXTEND OFF
・alter tablespace GAU01R retention guarantee;
・alter tablespace GAU01R retention noguarantee;
・alter system set undo_tablespace=GAU01R; 

・It is possible for one undo segment to protect many transactions,though Oracle will try to prevent it. 
・Oracle will create undo segments as needed for concurrent transactions
in an attempt to ensure that it is never necessary for transactions to share an undo segment.


阅读(452) | 评论(0) | 转发(0) |
0

上一篇:Tips2_Monitoring Oracle

下一篇:Temp Management

给主人留下些什么吧!~~