SlideShare uma empresa Scribd logo
1 de 4
Anar Godjaev

Undo Management
optimal undo_retention parameter = actual undo size /
(db_block_size/undo_block_per_sec)
-- **********************
-- manual undo management
-- **********************

create rollback segment r01 tablespacerbs;
create public rollback_segment r01 tablespacerbs;
alter rollback segment r01 offline;
drop rollback segment r01;
-- *************************
-- automatic undo management
-- *************************
alter system set undo_management = auto;
alter system set undo_tablespace = <ts_name>;
alter system set undo_suppress_errors = true|false ;
alter system set undo_retention = 900; --seconds
select name, value from v$parameter where name like
'undo_management'
select name, value from v$parameter where name like
'undo_tablespace'
select name, value from v$parameter where name like
'undo_retention'
-- creating undo tablespace
create undo tablespacets_undodatafile 'C:ts_undo_01.dbf' size
20m;
alter tablespacets_undo add datafile 'C:ts_undo_02.dbf' size
40m;
alter system set undo_tablespace = ts_undo;
drop tablespacets_undo;
alter tablespacets_undo retention guarantee;
select retention, tablespace_name from dba_tablespaces;
Anar Godjaev
select begin_time, end_time, tuned_undoretention from
v$undostat;
-- calculating undo space
select
ceil(((UR * (UPS * DBS)) + (DBS * 24))/1024/1024) as MB
from
(select value as UR from v$parameter where
name='undo_retention'),
(select (sum(undoblks)/sum(((end_time - begin_time) * 84600)))
as UPS
from v$undostat),
(select value as DBS from v$parameter where name =
'db_block_size');
set transaction read only;
set transaction isolation level serializable; -- possible
negative impact on performance
-- Actual Undo Size
SELECT SUM(a.bytes) "UNDO_SIZE"
FROM v$datafile a,
v$tablespace b,
dba_tablespaces c
WHERE c.contents = 'UNDO'
AND c.status = 'ONLINE'
AND b.name = c.tablespace_name
AND a.ts# = b.ts#;
-- Undo Blocks per Second
SELECT MAX(undoblks/((end_time-begin_time)*3600*24))
"UNDO_BLOCK_PER_SEC"
FROM v$undostat;
-- DB Block Size
SELECT TO_NUMBER(value) "DB_BLOCK_SIZE [KByte]"
FROM v$parameter
WHERE name = 'db_block_size';
Anar Godjaev

-- optimal undo retention
SELECT d.undo_size/(1024*1024) "ACTUAL UNDO SIZE [MByte]",
SUBSTR(e.value,1,25) "UNDO RETENTION [Sec]",
ROUND((d.undo_size / (to_number(f.value) *
g.undo_block_per_sec)))
"OPTIMAL UNDO RETENTION [Sec]"
FROM (
SELECT SUM(a.bytes) undo_size
FROM v$datafile a,
v$tablespace b,
dba_tablespaces c
WHERE c.contents = 'UNDO'
AND c.status = 'ONLINE'
AND b.name = c.tablespace_name
AND a.ts# = b.ts#
) d,
v$parameter e,
v$parameter f,
( SELECT MAX(undoblks/((end_time-begin_time)*3600*24))
undo_block_per_sec FROM v$undostat ) g
WHERE e.name = 'undo_retention'
AND f.name = 'db_block_size';
-- optimal undo size
SELECT d.undo_size/(1024*1024) "ACTUAL UNDO SIZE [MByte]",
SUBSTR(e.value,1,25) "UNDO RETENTION [Sec]",
(TO_NUMBER(e.value) * TO_NUMBER(f.value) *
g.undo_block_per_sec) / (1024*1024)
"NEEDED UNDO SIZE [MByte]"
FROM (
SELECT SUM(a.bytes) undo_size
FROM v$datafile a,
v$tablespace b,
dba_tablespaces c
WHERE c.contents = 'UNDO'
AND c.status = 'ONLINE'
AND b.name = c.tablespace_name
AND a.ts# = b.ts#
Anar Godjaev
) d,
v$parameter e,
v$parameter f,
(
SELECT MAX(undoblks/((end_time-begin_time)*3600*24))
undo_block_per_sec
FROM v$undostat
) g
WHERE e.name = 'undo_retention'
AND f.name = 'db_block_size';
-- undo consumer sessions
SELECT
TO_CHAR (s.SID) || ',' || TO_CHAR (s.serial#) sid_serial,
NVL (s.username, 'None') orauser,
s.program,
r.NAME undoseg,
t.used_ublk * TO_NUMBER (x.VALUE) / 1024 || 'K' "Undo",
t1.tablespace_name
FROM
SYS.v_$rollname r,
SYS.v_$session s,
SYS.v_$transaction t,
SYS.v_$parameter x,
dba_rollback_segs t1
WHERE
s.taddr = t.addr
AND r.usn = t.xidusn(+)
AND x.NAME = 'db_block_size'
AND t1.segment_id = r.usn
AND t1.tablespace_name = 'UNDOTBS1';

Mais conteúdo relacionado

Mais procurados

Pymongo for the Clueless
Pymongo for the CluelessPymongo for the Clueless
Pymongo for the CluelessChee Leong Chow
 
Atm machine using c++
Atm machine using c++Atm machine using c++
Atm machine using c++Aqib Memon
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLMark Wong
 
Atm machine using c++
Atm machine using c++Atm machine using c++
Atm machine using c++Aqib Memon
 
Applying Real-time SQL Changes in your Hazelcast Data Grid
Applying Real-time SQL Changes in your Hazelcast Data GridApplying Real-time SQL Changes in your Hazelcast Data Grid
Applying Real-time SQL Changes in your Hazelcast Data GridHazelcast
 
Atm machine using c++
Atm machine using c++Atm machine using c++
Atm machine using c++Aqib Memon
 
Atm machine using c++
Atm machine using c++Atm machine using c++
Atm machine using c++Aqib Memon
 
Pm 4.0 permission_storage
Pm 4.0 permission_storagePm 4.0 permission_storage
Pm 4.0 permission_storageOleg K
 
Python queue solution with asyncio and kafka
Python queue solution with asyncio and kafkaPython queue solution with asyncio and kafka
Python queue solution with asyncio and kafkaOndřej Veselý
 
Профилирование и оптимизация производительности Ruby-кода
Профилирование и оптимизация производительности Ruby-кодаПрофилирование и оптимизация производительности Ruby-кода
Профилирование и оптимизация производительности Ruby-кодаsamsolutionsby
 
ヘルパ・オブジェクト
ヘルパ・オブジェクトヘルパ・オブジェクト
ヘルパ・オブジェクト幸雄 村上
 
Afte DDL on Database PL/SQL Code
Afte DDL on Database PL/SQL CodeAfte DDL on Database PL/SQL Code
Afte DDL on Database PL/SQL CodeAnar Godjaev
 
STACK IMPLEMENTATION USING SINGLY LINKED LIST
STACK IMPLEMENTATION USING SINGLY LINKED LISTSTACK IMPLEMENTATION USING SINGLY LINKED LIST
STACK IMPLEMENTATION USING SINGLY LINKED LISTEr. Ganesh Ram Suwal
 
MongoUK - PHP Development
MongoUK - PHP DevelopmentMongoUK - PHP Development
MongoUK - PHP DevelopmentBoxed Ice
 

Mais procurados (19)

Pymongo for the Clueless
Pymongo for the CluelessPymongo for the Clueless
Pymongo for the Clueless
 
Atm machine using c++
Atm machine using c++Atm machine using c++
Atm machine using c++
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
Atm machine using c++
Atm machine using c++Atm machine using c++
Atm machine using c++
 
Applying Real-time SQL Changes in your Hazelcast Data Grid
Applying Real-time SQL Changes in your Hazelcast Data GridApplying Real-time SQL Changes in your Hazelcast Data Grid
Applying Real-time SQL Changes in your Hazelcast Data Grid
 
Python sqlite3
Python sqlite3Python sqlite3
Python sqlite3
 
Atm machine using c++
Atm machine using c++Atm machine using c++
Atm machine using c++
 
Atm machine using c++
Atm machine using c++Atm machine using c++
Atm machine using c++
 
Pm 4.0 permission_storage
Pm 4.0 permission_storagePm 4.0 permission_storage
Pm 4.0 permission_storage
 
Linear queue
Linear queueLinear queue
Linear queue
 
Doubly Linked List
Doubly Linked ListDoubly Linked List
Doubly Linked List
 
Python queue solution with asyncio and kafka
Python queue solution with asyncio and kafkaPython queue solution with asyncio and kafka
Python queue solution with asyncio and kafka
 
Профилирование и оптимизация производительности Ruby-кода
Профилирование и оптимизация производительности Ruby-кодаПрофилирование и оптимизация производительности Ruby-кода
Профилирование и оптимизация производительности Ruby-кода
 
ヘルパ・オブジェクト
ヘルパ・オブジェクトヘルパ・オブジェクト
ヘルパ・オブジェクト
 
PowerCMS X
PowerCMS XPowerCMS X
PowerCMS X
 
Afte DDL on Database PL/SQL Code
Afte DDL on Database PL/SQL CodeAfte DDL on Database PL/SQL Code
Afte DDL on Database PL/SQL Code
 
STACK IMPLEMENTATION USING SINGLY LINKED LIST
STACK IMPLEMENTATION USING SINGLY LINKED LISTSTACK IMPLEMENTATION USING SINGLY LINKED LIST
STACK IMPLEMENTATION USING SINGLY LINKED LIST
 
Db2
Db2Db2
Db2
 
MongoUK - PHP Development
MongoUK - PHP DevelopmentMongoUK - PHP Development
MongoUK - PHP Development
 

Semelhante a Undo Management

How to calculate the optimal undo retention in Oracle
How to calculate the optimal undo retention in OracleHow to calculate the optimal undo retention in Oracle
How to calculate the optimal undo retention in OracleJorge Batista
 
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스PgDay.Seoul
 
Drizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free MigrationDrizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free MigrationAndrew Hutchings
 
DNN Database Tips & Tricks
DNN Database Tips & TricksDNN Database Tips & Tricks
DNN Database Tips & TricksWill Strohl
 
New Tuning Features in Oracle 11g - How to make your database as boring as po...
New Tuning Features in Oracle 11g - How to make your database as boring as po...New Tuning Features in Oracle 11g - How to make your database as boring as po...
New Tuning Features in Oracle 11g - How to make your database as boring as po...Sage Computing Services
 
Oracle 12c Automatic Data Optimization (ADO) - ILM
Oracle 12c Automatic Data Optimization (ADO) - ILMOracle 12c Automatic Data Optimization (ADO) - ILM
Oracle 12c Automatic Data Optimization (ADO) - ILMMonowar Mukul
 
Network Automation: Ansible 102
Network Automation: Ansible 102Network Automation: Ansible 102
Network Automation: Ansible 102APNIC
 
Cycle.js: Functional and Reactive
Cycle.js: Functional and ReactiveCycle.js: Functional and Reactive
Cycle.js: Functional and ReactiveEugene Zharkov
 
Scripts related to temp tablespace
Scripts related to temp tablespaceScripts related to temp tablespace
Scripts related to temp tablespaceSoumya Das
 
First Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentFirst Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentNuvole
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLCommand Prompt., Inc
 
Designing a database like an archaeologist
Designing a database like an archaeologistDesigning a database like an archaeologist
Designing a database like an archaeologistyoavrubin
 

Semelhante a Undo Management (20)

How to calculate the optimal undo retention in Oracle
How to calculate the optimal undo retention in OracleHow to calculate the optimal undo retention in Oracle
How to calculate the optimal undo retention in Oracle
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
 
Hadoop on aws amazon
Hadoop on aws amazonHadoop on aws amazon
Hadoop on aws amazon
 
Hadoop on aws amazon
Hadoop on aws amazonHadoop on aws amazon
Hadoop on aws amazon
 
Drizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free MigrationDrizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free Migration
 
DNN Database Tips & Tricks
DNN Database Tips & TricksDNN Database Tips & Tricks
DNN Database Tips & Tricks
 
New Tuning Features in Oracle 11g - How to make your database as boring as po...
New Tuning Features in Oracle 11g - How to make your database as boring as po...New Tuning Features in Oracle 11g - How to make your database as boring as po...
New Tuning Features in Oracle 11g - How to make your database as boring as po...
 
Oracle 12c Automatic Data Optimization (ADO) - ILM
Oracle 12c Automatic Data Optimization (ADO) - ILMOracle 12c Automatic Data Optimization (ADO) - ILM
Oracle 12c Automatic Data Optimization (ADO) - ILM
 
Network Automation: Ansible 102
Network Automation: Ansible 102Network Automation: Ansible 102
Network Automation: Ansible 102
 
Cycle.js: Functional and Reactive
Cycle.js: Functional and ReactiveCycle.js: Functional and Reactive
Cycle.js: Functional and Reactive
 
Tuning SGA
Tuning SGATuning SGA
Tuning SGA
 
Operation outbreak
Operation outbreakOperation outbreak
Operation outbreak
 
Scripts related to temp tablespace
Scripts related to temp tablespaceScripts related to temp tablespace
Scripts related to temp tablespace
 
Undrop for InnoDB
Undrop for InnoDBUndrop for InnoDB
Undrop for InnoDB
 
First Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentFirst Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven Development
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
Oracle training in hyderabad
Oracle training in hyderabadOracle training in hyderabad
Oracle training in hyderabad
 
Code
CodeCode
Code
 
Designing a database like an archaeologist
Designing a database like an archaeologistDesigning a database like an archaeologist
Designing a database like an archaeologist
 

Mais de Anar Godjaev

Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from Anar Godjaev
 
How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...Anar Godjaev
 
how to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaulthow to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaultAnar Godjaev
 
Database Vault / Verinin Güvenliği
Database Vault /  Verinin GüvenliğiDatabase Vault /  Verinin Güvenliği
Database Vault / Verinin GüvenliğiAnar Godjaev
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden GateAnar Godjaev
 
Oracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumOracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumAnar Godjaev
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon ExportAnar Godjaev
 
Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Anar Godjaev
 
Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Anar Godjaev
 
Instance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeInstance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeAnar Godjaev
 
Conditional Control
Conditional ControlConditional Control
Conditional ControlAnar Godjaev
 
Audit Mekani̇zmasi
Audit Mekani̇zmasiAudit Mekani̇zmasi
Audit Mekani̇zmasiAnar Godjaev
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and RecoveryAnar Godjaev
 

Mais de Anar Godjaev (20)

Oracle GoldenGate
Oracle GoldenGateOracle GoldenGate
Oracle GoldenGate
 
Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from
 
How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...
 
how to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaulthow to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vault
 
Database Vault / Verinin Güvenliği
Database Vault /  Verinin GüvenliğiDatabase Vault /  Verinin Güvenliği
Database Vault / Verinin Güvenliği
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden Gate
 
Oracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumOracle 10g Database Server Kurulum
Oracle 10g Database Server Kurulum
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon Export
 
Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇
 
Contraints
ContraintsContraints
Contraints
 
Oracle SQL
Oracle SQLOracle SQL
Oracle SQL
 
Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇
 
Instance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeInstance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını Inceleme
 
Conditional Control
Conditional ControlConditional Control
Conditional Control
 
PL/SQL Blocks
PL/SQL BlocksPL/SQL Blocks
PL/SQL Blocks
 
Wait Interface
Wait InterfaceWait Interface
Wait Interface
 
Audit Mekani̇zmasi
Audit Mekani̇zmasiAudit Mekani̇zmasi
Audit Mekani̇zmasi
 
Table Partitions
Table PartitionsTable Partitions
Table Partitions
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and Recovery
 
LogMiner
LogMinerLogMiner
LogMiner
 

Undo Management

  • 1. Anar Godjaev Undo Management optimal undo_retention parameter = actual undo size / (db_block_size/undo_block_per_sec) -- ********************** -- manual undo management -- ********************** create rollback segment r01 tablespacerbs; create public rollback_segment r01 tablespacerbs; alter rollback segment r01 offline; drop rollback segment r01; -- ************************* -- automatic undo management -- ************************* alter system set undo_management = auto; alter system set undo_tablespace = <ts_name>; alter system set undo_suppress_errors = true|false ; alter system set undo_retention = 900; --seconds select name, value from v$parameter where name like 'undo_management' select name, value from v$parameter where name like 'undo_tablespace' select name, value from v$parameter where name like 'undo_retention' -- creating undo tablespace create undo tablespacets_undodatafile 'C:ts_undo_01.dbf' size 20m; alter tablespacets_undo add datafile 'C:ts_undo_02.dbf' size 40m; alter system set undo_tablespace = ts_undo; drop tablespacets_undo; alter tablespacets_undo retention guarantee; select retention, tablespace_name from dba_tablespaces;
  • 2. Anar Godjaev select begin_time, end_time, tuned_undoretention from v$undostat; -- calculating undo space select ceil(((UR * (UPS * DBS)) + (DBS * 24))/1024/1024) as MB from (select value as UR from v$parameter where name='undo_retention'), (select (sum(undoblks)/sum(((end_time - begin_time) * 84600))) as UPS from v$undostat), (select value as DBS from v$parameter where name = 'db_block_size'); set transaction read only; set transaction isolation level serializable; -- possible negative impact on performance -- Actual Undo Size SELECT SUM(a.bytes) "UNDO_SIZE" FROM v$datafile a, v$tablespace b, dba_tablespaces c WHERE c.contents = 'UNDO' AND c.status = 'ONLINE' AND b.name = c.tablespace_name AND a.ts# = b.ts#; -- Undo Blocks per Second SELECT MAX(undoblks/((end_time-begin_time)*3600*24)) "UNDO_BLOCK_PER_SEC" FROM v$undostat; -- DB Block Size SELECT TO_NUMBER(value) "DB_BLOCK_SIZE [KByte]" FROM v$parameter WHERE name = 'db_block_size';
  • 3. Anar Godjaev -- optimal undo retention SELECT d.undo_size/(1024*1024) "ACTUAL UNDO SIZE [MByte]", SUBSTR(e.value,1,25) "UNDO RETENTION [Sec]", ROUND((d.undo_size / (to_number(f.value) * g.undo_block_per_sec))) "OPTIMAL UNDO RETENTION [Sec]" FROM ( SELECT SUM(a.bytes) undo_size FROM v$datafile a, v$tablespace b, dba_tablespaces c WHERE c.contents = 'UNDO' AND c.status = 'ONLINE' AND b.name = c.tablespace_name AND a.ts# = b.ts# ) d, v$parameter e, v$parameter f, ( SELECT MAX(undoblks/((end_time-begin_time)*3600*24)) undo_block_per_sec FROM v$undostat ) g WHERE e.name = 'undo_retention' AND f.name = 'db_block_size'; -- optimal undo size SELECT d.undo_size/(1024*1024) "ACTUAL UNDO SIZE [MByte]", SUBSTR(e.value,1,25) "UNDO RETENTION [Sec]", (TO_NUMBER(e.value) * TO_NUMBER(f.value) * g.undo_block_per_sec) / (1024*1024) "NEEDED UNDO SIZE [MByte]" FROM ( SELECT SUM(a.bytes) undo_size FROM v$datafile a, v$tablespace b, dba_tablespaces c WHERE c.contents = 'UNDO' AND c.status = 'ONLINE' AND b.name = c.tablespace_name AND a.ts# = b.ts#
  • 4. Anar Godjaev ) d, v$parameter e, v$parameter f, ( SELECT MAX(undoblks/((end_time-begin_time)*3600*24)) undo_block_per_sec FROM v$undostat ) g WHERE e.name = 'undo_retention' AND f.name = 'db_block_size'; -- undo consumer sessions SELECT TO_CHAR (s.SID) || ',' || TO_CHAR (s.serial#) sid_serial, NVL (s.username, 'None') orauser, s.program, r.NAME undoseg, t.used_ublk * TO_NUMBER (x.VALUE) / 1024 || 'K' "Undo", t1.tablespace_name FROM SYS.v_$rollname r, SYS.v_$session s, SYS.v_$transaction t, SYS.v_$parameter x, dba_rollback_segs t1 WHERE s.taddr = t.addr AND r.usn = t.xidusn(+) AND x.NAME = 'db_block_size' AND t1.segment_id = r.usn AND t1.tablespace_name = 'UNDOTBS1';