Undo Tablespace Full.
Hello,
The size of my UNDOTS is 6 GB and undo_retention=21600.
After last application upgrade, we the size of UNDOTS are full and we can't fixit and it create a problem, I open a TAR within Oracle and after two days they don't propose any solution.
Is there any possibility (an Oracle view) that we can see all transaction inside the UDOTS?
For you information, even I increase the size to 9 GB and I reduce the undo_retention=14400, the result are the same full UNDOTS.
Thanks for your suggestion and proposition, it's in production
Regards,
Message was edited by:
user579652
Message was edited by:
user579652
The following query/report will help you estimate the amount of undo you require, based on your undo_retention, largest transaction, and block size. If the report shows you need more undo space than you have allocated, then you probably need to increase the amount of undo space or reduce the undo_retention. Pay special attention to the occurances of snapshot too old (ora-01555) and no space.
== =====================================
set linesize 120
set pagesize 60
alter session set nls_date_format = "dd-Mon-yyyy hh24:mi:ss";
COL TXNCOUNT FOR 99,999,999 HEAD 'Txn. Cnt.'
COL MAXQUERYLEN FOR 99,999,999 HEAD 'Max|Query|Sec'
COL MAXCONCURRENCY FOR 9,999 HEAD 'Max|Concr|Txn'
COL bks_per_sec FOR 99,999,999 HEAD 'Blks per|Second'
COL kb_per_second FOR 99,999,999 HEAD 'KB per|Second'
COL undo_mb_required FOR 999,999 HEAD 'MB undo|Needed'
COL ssolderrcnt FOR 9,999 HEAD 'ORA-01555|Count'
COL nospaceerrcnt FOR 9,999 HEAD 'No Space|Count'
break on report
compute max of txncount -
maxquerylen -
maxconcurrency -
bks_per_sec -
kb_per_second -
undo_mb_required on report
compute sum of -
ssolderrcnt -
nospaceerrcnt on report
SELECT begin_time,
txncount-lag(txncount) over (order by end_time) as txncount,
maxquerylen,
maxconcurrency,
undoblks/((end_time - begin_time)*86400) as bks_per_sec,
(undoblks/((end_time - begin_time)*86400)) * t.block_size/1024 as kb_per_second,
((undoblks/((end_time - begin_time)*86400)) * t.block_size/1024) * TO_NUMBER(p2.value)/1024 as undo_MB_required,
ssolderrcnt,
nospaceerrcnt
FROM v$undostat s,
dba_tablespaces t,
v$parameter p,
v$parameter p2
WHERE t.tablespace_name = UPPER(p.value)
AND p.name = 'undo_tablespace'
AND p2.name = 'undo_retention'
ORDER BY begin_time;
show parameter undo
clear computes
Similar Messages
-
Undo tablespace full even with no active transaction and undo_retention 10s
The 9.2.0.4 instance is AUM (auto undo management). The undo table space is 50G and is almost full.
I have set the undo_retention to 10, previously it was 10800 (3hours). I restart the database. Wait quite long time.
And search on the dba_undo_extents.
select sum(bytes/(1024*1024*1024)),status from dba_undo_extents d where d.tablespace_name='UNDOTBS2' group by status;
SUM(BYTES/(1024*1024*1024)) STATUS
.574447632 EXPIRED
45.5358887 UNEXPIRED
It is hard to explain. 10 seconds already passed, at least all the extents should be expired.
Why so many 45G is still unexpried.
Is there a bug for undo tablespace? how to fix it.
It is a rac instance, I am trouble shooting the undo tablespace issues.
The UNDOTBS2 is for node2 to use.If you start the database in exclusive (one instance) mode then the database instance can have only one undo tablespace so I would not expect Oracle to do anything with the undo tablespace for the non-running instance.
Run you database as normal and generate undo. See if the status changes. If if does that would imply that Oracle does not expire undo unless the undo segments (rbs segments) are accessed. Please post back with results of what you see.
Between having batch production running on all my databases that use undo tablespaces and the fact we use uniform extent undo tabllespaces I am not in a position to try to duplicate what you are seeing.
HTH -- Mark D Powell -- -
My undo tablespace is getting full because of uncommited deletes performed by jdbc thin client sessions.
How can I solve this problem permanently?
Size of undo tablespace is 5.5GB
I am facing an undo tablespace full issue
Below are the sessions which maybe causing the problem.
select s.sid,
s.serial#,
s.sql_id,
s.prev_sql_id,
s.SCHEMANAME ,
s.OSUSER ,
s.program,
USED_UBLK,USED_UREC from v$session s, v$transaction t where s.taddr=t.addr order by USED_UREC;
3909 30842 fgcp0qn1bqzx9 XLTDB5 xltwrk5 JDBC Thin Client 504 45257
5133 53593 fgcp0qn1bqzx9 XLTDB5 xltwrk5 JDBC Thin Client 07 54482
4525 35108 fgcp0qn1bqzx9 XLTDB10 xltwrk10 JDBC Thin Client 2381 192853
4428 38484 fgcp0qn1bqzx9 XLTDB1 xltwrk1 JDBC Thin Client 8682 634540
For this sql id :fgcp0qn1bqzx9 there are more than 14k executions per hour.
Below is the query for this sql id:
/* TJAPI_SubTrxTransient_deleteTrb1SubTrxTransient_0 */ DELETE FROM TRB1_SUB_TRX_TRANSIENT
Some other details
++++++++++++
Oravle version:11.1.0.7
OS:SunOS
++++++++++++Perhaps an interesting link:
http://oracledisect.blogspot.com/2008/05/who-is-using-your-undo-space.html
Perhaps you can use Oracle Resource Manager, create a resource plan and switch sessions to a different consumer group once they reach a certain treshold.
http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/dbrm004.htm
Btw are these distributed transactions?
DBA commit other session's transaction?
Edited by: Markus Waldorf on Sep 9, 2010 7:57 PM -
(10gR2)Full UNDO tablespace
(10gR2)Full UNDO tablespace
============================
PURPOSE
10gR2 에서 UNDO tablespace 을 NO AUTOEXTEND로 생성한 경우 ,
transaction 이 실행중인 database 에서는 UNDO tablespace 가
FULL인 현상을 보게 됩니다.
이는 10gR2 에서 max retention 을 보장하는 undo retention 의
메카니즘이 소개되어 autoextend off 인 경우의 UNDO tablespace
에서 나타나는 현상입니다.
dba_undo_extents 에서 많은 UNEXPIRED undo segment 가 보이는 것이
확인되고 UNDO tablespace 가 100% full 인것처럼 나타나는 현상을 볼 수
있으며 그럼에도 불구하고 ORA-1555 나 ORA-30036 에러는 발생하지 않습니다.
Explanation
다음과 같이 많은 UNEXPIRED undo segment 가 조회됩니다.
SQL> select count(status) from dba_undo_extents where status = 'UNEXPIRED';
COUNT(STATUS)
463
SQL> select count(status) from dba_undo_extents where status = 'EXPIRED';
COUNT(STATUS)
20
SQL> select count(status) from dba_undo_extents where status = 'ACTIVE';
COUNT(STATUS)
21
dba_free_space 을 조회 결과 UNDO tablespace 의 free space 가 존재합니다.
SUM(BYTES)/(1024*1024) TABLESPACE_NAME
3 UNDOTBS1
58.4375 SYSAUX
3 USERS3
4.3125 SYSTEM
103.9375 USERS04
Transaction 이 실행되면 UNDO tablespace 에 free space 가 조회되지 않는
FULL 인것처럼 보입니다.
SUM(BYTES)/(1024*1024) TABLESPACE_NAME
58.25 SYSAUX
98 USERS3
4.3125 SYSTEM
87.9375 USERS04
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
다음은 AUM 에서의 Undo Block 할당 알고리즘은 다음과 같습니다.
1. current extent 에 free block 이 있으면 다음 free block 이
할당됩니다.
2. 그러나, free block 이 없으면, next extent 가 expired 되었다면 next extent 을
warp 한후 그 next extent 의 처음 block 을 return 합니다.
3. 만약 next extent 가 expired 되지 않았다면 UNDO tablespace 로부터 먼저
space 을 찾습니다. 이때 free extent 가 존재한다면 이를 transaction table 에
할당하고 해당 next extent 의 첫번째 block 을 return 합니다.
4. 만약 UNDO tablespace 에 free extent 가 없다면 offline 된 transaction table
에서 steal 합니다.
offline 된 transaction table 에서 extent 을 deallocate 한후 이를
current transaction table 에 add한후 그 add 한 extent 의 첫번째 free block 을
return 합니다.
5. offline 된 transaction table 에서 찾을수 없으면 , online 되어 있는
transaction table 에서 steal 합니다. offline 된 transaction table 에서 extent 을
deallocate 한후 이를 current transaction table 에 add한후 , 그 add 한 extent 의
첫번째 free block 을 return 합니다.
6. 1번~5번 까지 하여도 free block 을 얻지 못하면 이제 UNDO tablespace 의 file 을
extend 합니다.
file 이 extend 된다면 이후 current transaction table 에 extent 을 add 한후 ,
그 extent 의 첫번째 free block 을 return 합니다.
7. 6번 에서 UNDO tablespace 의 file 을 extend 하지 못했다면 , 자기의 transaction table
에서 unexpired 된 extent 을 재사용합니다. 그런데 이때 모든 extent 가 busy 하다면
즉 모두 uncommitted 된 정보라면 8번으로 갑니다. 아니라면 wrap 하여 unexpired 된
extent 을 사용합니다.
8. offline 된 transaction table 에서 unexpired 된 extent 을 steal 합니다. 이것이
실패한다면 online 된 transaction table 에서 unexpired 된 extent 을 steal 합니다.
9. 8 번까지 수행하고도 free block 을 얻지 못하면 이때서야 오라클에서는
"ORA-30036 unable to extend segment by %s in undo tablespace '%s' " 에러를
뿌리며 실패합니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fixed size UNDO tablespace 라 함은 autoextend 가 off 라 datafile 을 자동으로
더 이상 확장할 수 없음을 말합니다.
autoextend 가 off 인 경우 10.2 부터는 max retention 이 36 시간 입니다.
undo_retention 을 900 초(15 분) 으로 설정을 한다고 해도 10gR2 에서는
max retention 이 36 시간이라 이에 해당하는 undo extent 을 UNEXPIRED 으로 만듭니다.
그러나 이것이 가용한 undo extent 가 없다는 것이 아니고 , transaction 이 실행되게 되면
UNEXPIRED undo segment 을 재사용하게 됩니다.
References
< Note 413732.1 - Full UNDO Tablespace In 10gR2 >A undo tablespace almost full is not necessarily a problem with Oracle 10g ... unless you have some ORA-XXXX errors in the database instance alert.log or in client programs connected to the instance. Is this the case ?
You should also have a look to V$UNDOSTAT which stores undo statistics for the last 7 days.
This view has also 2 interesting columns about possible errors related to undo space:
SOLDERRCNT NUMBER Identifies the number of times the error ORA-01555 occurred. You can use this statistic to decide whether or not the UNDO_RETENTION initialization parameter is set properly given the size of the undo tablespace. Increasing the value of UNDO_RETENTION can reduce the occurrence of this error.
NOSPACEERRCNT NUMBER Identifies the number of times space was requested in the undo tablespace and there was no free space available. That is, all of the space in the undo tablespace was in use by active transactions. The corrective action is to add more space to the undo tablespace. -
Hello:
I've created a new undo tablespace undotbs2. I've set it to the default undo tablespace. When I've tried to drop the old one, I get the following error:
SQL> conn / as sysdba
Connected.
SQL> DROP TABLESPACE undotbs1 INCLUDING CONTENTS AND DATAFILES;
DROP TABLESPACE undotbs1 INCLUDING CONTENTS AND DATAFILES
ERROR at line 1: ORA-01548: active rollback segment '_SYSSMU7$' found, terminate dropping tablespace
This is a production database. The service is down because the partition with the Oracle tablespaces: system, undo, temp, etc is full.
After shutting down the database the problem persist: I cannot drop the old undo tablespace because of the same error.
I've followed the note 1321093.1. Here the query results:
Select segment_name, status, tablespace_name, rs.segment_id
from dba_rollback_segs rs
where status not in ('ONLINE','OFFLINE');
_SYSSMU7$ PARTLY AVAILABLE UNDOTBS1 7
SELECT KTUXEUSN, KTUXESLT, KTUXESQN, /* Transaction ID */ KTUXESTA Status, KTUXECFL Flags
FROM x$ktuxe
WHERE ktuxesta !='INACTIVE' AND ktuxeusn =7;
7 47 382687 ACTIVE DEAD
SELECT LOCAL_TRAN_ID,GLOBAL_TRAN_ID,STATE,MIXED,COMMIT# FROM DBA_2PC_PENDING;
No rows
SELECT LOCAL_TRAN_ID,IN_OUT,DATABASE,INTERFACE FROM dba_2pc_neighbors;
No rows
As you can see, there is no pending transactions. No application is connected to the database (service is down), however the database is appling rollbacks since 2 days.
A lot of archivelogs are being created at rolling back (30 GB archivelogs per hour). Here a tail of the alertlog file:
Wed Apr 17 06:19:53 2013
Thread 1 advanced to log sequence 7382
Current log# 5 seq# 7382 mem# 0: /ora2/origlogs/webfrbr/redo05_m1.log
Current log# 5 seq# 7382 mem# 1: /ora3/mirrorlogs/webfrbr/redo05_m2.log
Wed Apr 17 06:21:16 2013
Thread 1 advanced to log sequence 7383
Current log# 6 seq# 7383 mem# 0: /ora2/origlogs/webfrbr/redo06_m1.log
Current log# 6 seq# 7383 mem# 1: /ora3/mirrorlogs/webfrbr/redo06_m2.log
Wed Apr 17 06:22:41 2013
Thread 1 advanced to log sequence 7384
Current log# 4 seq# 7384 mem# 0: /ora2/origlogs/webfrbr/redo04_m1.log
Current log# 4 seq# 7384 mem# 1: /ora3/mirrorlogs/webfrbr/redo04_m2.log
Wed Apr 17 06:24:02 2013
Thread 1 advanced to log sequence 7385
Current log# 5 seq# 7385 mem# 0: /ora2/origlogs/webfrbr/redo05_m1.log
Current log# 5 seq# 7385 mem# 1: /ora3/mirrorlogs/webfrbr/redo05_m2.log
Wed Apr 17 06:25:24 2013
Thread 1 advanced to log sequence 7386
Current log# 6 seq# 7386 mem# 0: /ora2/origlogs/webfrbr/redo06_m1.log
Current log# 6 seq# 7386 mem# 1: /ora3/mirrorlogs/webfrbr/redo06_m2.log
Wed Apr 17 06:26:46 2013
Thread 1 advanced to log sequence 7387
Current log# 4 seq# 7387 mem# 0: /ora2/origlogs/webfrbr/redo04_m1.log
Current log# 4 seq# 7387 mem# 1: /ora3/mirrorlogs/webfrbr/redo04_m2.log
Oracle Database - Enterprise Edition 10.2.0.3
Linux x86-64 Oracle Linux 5
Please, consider the output of the following queries too:
select * from V$FAST_START_TRANSACTIONS
USN 7 -- Undo segment number of the transaction
SLT 47 -- Slot within the rollback segment
SEQ 382687 -- Incarnation number of the slot
STATE RECOVERING --
UNDOBLOCKSDONE 0 -- Number of undo blocks completed on the transaction
UNDOBLOCKSTOTAL 2079151 -- Total number of undo blocks that need recovery
PID 15 -- ID of the current server it has been assigned to
CPUTIME 1153 -- Time for which recovery has progressed (in seconds)
PARENTUSN 0 -- Undo segment number of the parent transaction in PDML
PARENTSLT 0 -- Slot of the parent transaction in PDML
PARENTSEQ 0 -- Sequence number of the parent transaction in PDML
XID 07002F00DFD60500 -- Transaction ID
PXID 0000000000000000 -- Parent transaction ID
RCVSERVERS 1 -- Number of servers used in the last recovery
select * from x$ktuxe where ktuxecfl = 'DEAD';
ADDR 00002B3E808B9BD8
INDX 145
INST_ID 1
KTUXEUSN 7
KTUXESLT 47
KTUXESQN 382687
KTUXERDBF 2
KTUXERDBB 2080076
KTUXESCNB 424110769
KTUXESCNW 0
KTUXESTA ACTIVE
KTUXECFL DEAD
KTUXEUEL 3739
KTUXEDDBF 0
KTUXEDDBB 0
KTUXEPUSN 0
KTUXEPSLT 0
KTUXEPSQN 0
KTUXESIZ 2079151
select * from v$fast_start_servers;
RECOVERING 0 15 07002F00DFD60500
IDLE 0 16 0000000000000000
IDLE 0 17 0000000000000000
IDLE 0 18 0000000000000000
IDLE 0 19 0000000000000000
IDLE 0 20 0000000000000000
IDLE 0 21 0000000000000000
IDLE 0 22 0000000000000000
IDLE 0 25 0000000000000000
IDLE 0 26 0000000000000000
IDLE 0 27 0000000000000000
IDLE 0 28 0000000000000000
IDLE 0 29 0000000000000000
IDLE 0 30 0000000000000000
IDLE 0 31 0000000000000000
IDLE 0 32 0000000000000000
Any ideas to solve this issue?
Thank you in advance
Edited by: albrotar on Apr 17, 2013 1:48 AM
Edited by: albrotar on Apr 17, 2013 1:49 AM
Edited by: albrotar on Apr 17, 2013 1:51 AM
Edited by: albrotar on Apr 17, 2013 1:52 AM
Edited by: albrotar on Apr 17, 2013 1:54 AMI've found some errors in alert log file occurred at shutting down the database:
+...+
Control autobackup written to DISK device
handle '/orabck/rman/webfrbr/ora_cfc-3587726327-20130414-00'
Completed: CREATE UNDO TABLESPACE undotbs2 DATAFILE '/orabck/undo/undotbs02.dbf'
SIZE 500M reuse autoextend ON NEXT 5M maxsize 32767M
Sun Apr 14 15:46:43 2013
Successfully onlined Undo Tablespace 5.
Undo Tablespace 1 moved to Pending Switch-Out state.
*** active transactions found in undo tablespace 1 during switch-out.
Sun Apr 14 15:46:44 2013
ALTER SYSTEM SET undo_tablespace='UNDOTBS2' SCOPE=BOTH;
Sun Apr 14 16:11:42 2013
ALTER ROLLBACK SEGMENT "_SYSSMU7$" offLINE
Sun Apr 14 16:11:42 2013
Completed: ALTER ROLLBACK SEGMENT "_SYSSMU7$" offLINE
Sun Apr 14 16:12:36 2013
DROP TABLESPACE undotbs1 INCLUDING CONTENTS AND DATAFILES
Sun Apr 14 16:12:36 2013
+...+
Thread 1 advanced to log sequence 5107
Current log# 4 seq# 5107 mem# 0: /ora2/origlogs/webfrbr/redo04_m1.log
Current log# 4 seq# 5107 mem# 1: /ora3/mirrorlogs/webfrbr/redo04_m2.log
Sun Apr 14 19:00:28 2013
Stopping background process CJQ0
Sun Apr 14 19:00:29 2013
Stopping background process QMNC
Sun Apr 14 19:00:31 2013
Stopping background process MMNL
Sun Apr 14 19:00:32 2013
Stopping background process MMON
Sun Apr 14 19:00:34 2013
Shutting down instance (immediate)
License high water mark = 31
Sun Apr 14 19:00:34 2013
Stopping Job queue slave processes
Sun Apr 14 19:00:34 2013
Job queue slave processes stopped
All dispatchers and shared servers shutdown
Sun Apr 14 19:00:42 2013
ALTER DATABASE CLOSE NORMAL
Sun Apr 14 19:04:28 2013
+...+
Thread 1 advanced to log sequence 5118
Current log# 6 seq# 5118 mem# 0: /ora2/origlogs/webfrbr/redo06_m1.log
Current log# 6 seq# 5118 mem# 1: /ora3/mirrorlogs/webfrbr/redo06_m2.log
Sun Apr 14 20:11:21 2013
Errors in file /ora1/admin/webfrbr/bdump/webfrbr_smon_4629.trc:
+ORA-07445: exception encountered: core dump [_intel_fast_memcpy.A()+10] [SIGSEGV] [Invalid permissions for mapped object] [0x2B6B66003000] [] []+*
Sun Apr 14 20:11:21 2013
Errors in file /ora1/admin/webfrbr/bdump/webfrbr_smon_4629.trc:
ORA-00600: internal error code, arguments: [999], [0x107C14015], [], [], [], [], [], []*
+ORA-07445: exception encountered: core dump [_intel_fast_memcpy.A()+10] [SIGSEGV] [Invalid permissions for mapped object] [0x2B6B66003000] [] []+*
Sun Apr 14 20:11:22 2013
+...+
Sun Apr 14 20:11:48 2013
Errors in file /ora1/admin/webfrbr/bdump/webfrbr_pmon_4617.trc:
ORA-00474: SMON process terminated with error
Sun Apr 14 20:11:48 2013
+...+
The instance could start up, but after this, it is recovering undo and generating redo since 2 days -
Unable to shrink/resize undo tablespace
Hi Experts,
I have Oracle 10.2.0.4 database running on RHEL 4.7 in production environment, my undo tablespace has grown upto 32 GB, database is rebooted, still the tablespace is full.
I want to shrink, resize the undo tablespace, please help me
Few details are as below
show parameter undo_retention
NAME TYPE VALUE
undo_retention integer 10
Please help
ThanksThis post is repeatedly executed by mistake, thread with same name is posted 2 minutes before this
Edited by: user1687821 on Jul 9, 2010 9:29 AM -
Unable to shrink undo tablespace... Help!
Hi,
I have problems to shrink the system undo tablespace, which has grown up to 14 GB.
I use 9.2. Table space owner is 'SYSTEM', undo_management = AUTO.
I tried to shrink the greatest rollback segments by the commands
ALTER SESSION SET UNDO_SUPPRESS_ERRORS = TRUE;
ALTER ROLLBACK SEGMENT "_SYSSMU6$" SHRINK TO 20 M;
Oracle confirmed these commands, but nothing happened.
What am I doing wrong?
Hermann MuellerYou have seen the discussion about the undo segments, on the temporary tablespaces, you should be aware that the sort segment of a given temporary tablespace is created at the time the first sort operation takes place. The sort segment continues to grow by means of extent allocation until the segment size has reached the total storage demands of all of the active sorts running on the instance. Oracle will keep on allocating temporary space on demand unless the physical limit states otherwise.
Temporary segments are produced each time a sort operation (explicit -order by- or implicit -aggregation, reindexing-) requires to sort a set that cannot fit into memory. So if you detect excesive sort usage you should aim your monitors towards the sort operations (reports, reindexing, max, min, aggregations, order by ...). If your system has a DDS behaviour, this kind of operations are frequent as a massive sorting has to be peformed against millions of rows.
A Temporary tablespace will almost always appear to be near 100% full, that's because once oracle has allocated temporary space it doesn't release it back to the free space, it keeps it allocated even when the sort operation has finished. Criteria behind this fact is similar to the one oracle used to have when the rollback segments were in use, Oracle only allocated space and the dba should perform manual actions to release space, and the criteria is performance. Once it has allocated space this big, there are possibilities that the same circumstances that raised the temporary usage high water mark to this level are repeated, so if oracle keeps the mamimum allocated space, it won't have to allocate the same storage once more.
Main concern with temporary tablespace growth is not free space itself, but the reasons why this amount of space was allocated, so I suggest you to track the sql statements with sort operations. If you are certain the circumstances that motivated this amount of temporary resources to be allocated won't be repeated again, then you could think of resizing down your temporary tablespace. I suggest you to create a new temporary tablespace with the desired size, and alter the default tempoary tablespace to point to this newly crated temporary tablespace, and finally get rid of the original temporary TS.
~ Madrid -
Hi,
I am using 10.2.0.3.0 on Oracle Solaris 5.10.
I have an undo tablespace 'UNDOTBS1' which has 5 data files of sizes 60GB. Here are my undo parameters:
SQL> show parameter undo
NAME TYPE VALUE
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1I have a long running batch process, which is inserting billions of records in the table and generating lots of undo. The batch is running for the last two days, and generating lots of undo and developer says that he is committing after 3 million records, though he was told to commit after 10000 records. Now all the data files of undo tablespace have become full except one, which is also getting filled up.
I see from dba_rollback_segs that there are some 25 segments which are showing status offline.
does it mean that the oracle will reuse those segments and I dont need to add another data file to the undo tablespace?
How would I know during this running process, that oracle would reuse space in undo tablespace, or will just throw an error, after exhausting all the data files.
Thanks and regardsHi,
As the undo segments are used in a curcular fashion, dba_free_space may not give correct picture. use following sql.
col PCT_USED head '% Used'
select a.used, b.allocated, round((a.used/b.allocated)*100,2) PCT_USED, c.unexpired, d.active from
(select sum(BYTES/1024/1024) used from dba_undo_extents where status in ('UNEXPIRED','ACTIVE')) a,
(select bytes/1024/1024 allocated from dba_data_files where tablespace_name = 'UNDOTBS1') b ,
(select sum(bytes/1024/1024) unexpired from dba_undo_extents where status = 'UNEXPIRED') c,
(select sum(bytes/1024/1024) active from dba_undo_extents where status = 'ACTIVE') d
Here ACTIVE - they are being used
UNEXPIRED - they will not be released until the undo_retention time. But if all other extents are used, then oracle may reallocate unexpired blocks and any session which is trying to read from unexpired block may received "snapshot too old error".
EXPIRED - here these blocks will be reused, you can consider them as free.
Thanks,
Siva -
Snapshot too old in a very big undo tablespace
Hi,
I can see the snapshot too old error message in my alert log file.
ORA-01555 caused by SQL statement below (Query Duration=5 sec, SCN: 0x000d.a1e610e5):
It shows that query failed just after its start within 5 seconds. I really dont understand this in the presence of following facts
Current size of my undo tablespace is around 15G and undo retention is 180 minutes and for my environment, oracle recommends to use around 8 G size for undo tablespace if i want to use undo retention to be set for 180 minutes.
I am using oracle 9.2.0.6 and automatic undo management.
Thanks
SalmanCould it be that the ora-1555 is thrown by the statement in the alert log, but is really caused by another statement that has been sitting around since yesterday? Oracle may be trying to make read-consistent some data that the other statement used to have in undo.
I see this all the time if I don't kill off leftover sessions in the middle of the night. Darn users.
Search asktom.oracle.com for the error, many good explanations there and in his books. There are some application coding conditions that can cause this, too.
Also, try doing a full scan of the table - select some arbitrary column without a where statement. This may correct a "delayed block cleanout" condition. Google that for more info if you don't know about it. -
How to flush the undo tablespace..
my undo is around 2000mb
but almost full and for triggering the job for 4millons records
how to free up the size? or I will hv to add the another datafile?You can not really "flush" the undo tablespace. How do you know, that it is almost full? Undo is allocated and re-used. As long as you don't get any database error regarding the undo tablespace, then everything is fine; no need to worry. You are "freeing" the undo-space whenever you say "commit".
-
Hi All,
My undo tablespace is 97% full.
Is there any way to check which process is using more undo tablespace.
Thansk in Advance for your response.
Regards,
Ashwani N.# UNDO tablespace usage
select a.process, a.program, a.module, a.machine, b.USED_UREC, c.sql_text
from v$sql c, v$session a, v$transaction b
where b.addr = a.taddr
and a.sql_address = c.address
and a.sql_hash_value = c.hash_value
order by b.USED_UREC;
SELECT s.sid , s.username , t.used_ublk
FROM v$transaction t
, v$session s
WHERE 1 = 1
AND t.ses_addr = s.saddr
column username format a15;
column segment_name format a15;
SELECT s.sid , s.username , t.used_ublk, round((t.used_ublk*8)/1024) size_in_MB_8kb_Block_size, round((t.used_ublk*16)/1024
) size_in_MB_16kb_Block_size
FROM v$transaction t
, v$session s
WHERE 1 = 1
AND t.ses_addr = s.saddr;
SELECT distinct rpad(s.sid,3) "SID",S.USERNAME,
E.SEGMENT_NAME,
T.START_TIME "Start",
rpad(T.STATUS,9) "Status",
round((t.used_ublk*8)/1024) "Size(MB)"
--T.USED_UBLK||' Blocks and '||T.USED_UREC||' Records' "Rollback Usage"
FROM DBA_DATA_FILES DF,
DBA_EXTENTS E,
V$SESSION S,
V$TRANSACTION T
WHERE DF.TABLESPACE_NAME = E.TABLESPACE_NAME AND
DF.FILE_ID = UBAFIL AND
S.SADDR = T.SES_ADDR AND
T.UBABLK BETWEEN E.BLOCK_ID AND E.BLOCK_ID+E.BLOCKS AND
E.SEGMENT_TYPE in( 'ROLLBACK','TYPE2 UNDO'source:-
http://blog.contractoracle.com/2008/08/undo-tablespace-usage.html -
Undo tablespace utilizes 100 %
hi,
We are using oracle 11.2.0.3.0 on solaris 10 sparc 64 bit. From last week we are facing an issue our undo tablespace got 100 % full , we have add the data files and increase the size upto 300 gb. But after some time it utilizes all the available space and cant release it.
Thanksuser11062519 wrote:
hi,
We are using oracle 11.2.0.3.0 on solaris 10 sparc 64 bit. From last week we are facing an issue our undo tablespace got 100 % full , we have add the data files and increase the size upto 300 gb. any long running batch jobs configured ?what is your undo retention period?
But after some time it utilizes all the available space and cant release it.space cannot release until unless active transaction ends. -
Undo tablespace currupt and no clean backup
Hello,
We are facing critical problem with database. We have not any clean backup and database in no archive log mode. Suddenly database is shutdown and when we are trying to open database it is giving error:-
ORA-01172: recovery of thread 1 stuck at block 350230 of file 3
ORA-01151: use media recovery to recover block, restore backup if needed
File 3 is Undo file.
Is there any way to open database?
Thanks in advance and please reply us ASAP.1) First, follow Howardjr recomendations and allways do a backup first.
2) Open a SR with Metalink to help with your problem
3) If you want to try something here are some options, but never skip the point 1 previously explained.
Well, you have two possible scenarios, one supported other unsupported.
This is an inconsistency issue..
Solution
============
*1]Supported Solution:*
Restore-Incomplete recovery the DB from backup or rebuild the DB using an export dump.
*2]Internal (Not-supported) Solution:*
Update undo$ to change the status$ = 1 (undo segment is dropped) for the corrupted undo segment.
Caution:
This is NOT a supported solution. Therefore ensure that a full database cold backup is taken bbefore doing this data-dictionary patching.
Steps to do the patching:
1) First ensure that a full database backup is taken.
2) Modify/add the following parameters in initSID.ora:
undo_management=manual
job_queue_processes =0
aq_tm_processes=0
systemtrig_enabled=false
3) Shutdown
4) Startup restrict pfile
5) set transaction use rollback segment system;
if set transaction above fails, then not to proceed further.
6) Update undo$ to change the status$ = 1 (undo segment is dropped) for
the corrupt undo segment.
update undo$ set status$ = 1
where us# = <'undo segment id'>
and ts#=<'tablespace id'>
and file#=<'file id'>
and block# = <'block id'>
and status$=2;
or
update undo$ set status$ = 1
where name = <'corrupt undo segment name'>
and status$=2;
This will update only 1 row. Rollback the update if more than 1 row is updated.
7) Commit;
8) Shutdown abort
9) Set back in init.ora parameters modified in Step 2.
Startup restrict
10) Drop the corrupt undo tablespace using command:
drop tablespace <corrupt undo tablespace name> including contents;
11) Create new undo tablespace.
In initSID.ora, set undo_management=auto, undo_tablespace=<'new undo tablespace name'>
Restart the instance.
12) Take a backup.
*Parameter offlinerollback_segments is not useful:*
Trying to drop the corrupt undo segment or the undo tablespace by setting parameters undo management=manual and offline_rollback_segments in initSID.ora will fails with error: ORA-00600 [ktssdrp1].
To see the information about the corrupt block use this query:
select us#, name, ts#, file#, block#,status$ from undo$
where (ts#, file#, block#) not in
(select ts#, file#, block# from seg$ where type# in (1,10)) and status$ > 1;I had the same problem some time ago, and the unsupported solution works great, but never try it without a full backup first.
Cheers,
Francisco Munoz Alvarez
http://oraclenz.wordpress.com
Edited by: F.Munoz Alvarez on Nov 30, 2012 11:03 AM -
hi
Lets sat I have rman full backup
how can I restore undo tablespace
database should be mounted or not?
I cannot restore it by using
"restore tablespace undo" clauseRMAN> startup mount;
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 209715200 bytes
Fixed Size 1286580 bytes
Variable Size 71306828 bytes
Database Buffers 134217728 bytes
Redo Buffers 2904064 bytes
RMAN> restore tablespace undo;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "undo": expecting one of: "double-quoted-string, identifier, single-quoted-string"
RMAN-01007: at line 1 column 20 file: standard input
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found ";": expecting one of: "allocate, alter, backup, beginline, blockrecover, catalog, cha
plicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, r
, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgra
RMAN-01007: at line 1 column 24 file: standard input -
Hi Team/champions,
I am confused in RMAN full DB backup why UNDO tablespce is included even we include the archive logs also.
in Short ?
why UNDO tablespace backup is required while taking RMAN backup ?
Regards,
Shitesh Shuklaif I dont want to include the UNDO tablespce in my backup
what if I took only database files backup excluding TEMP n UNDONOT an option. You have to include UNDO. 11g has optimization for backing up an Undo tablespace.
In 10gR2 what you could do is
1. Create a New Undo Tablespace
2. Switch to the new Undo Tablespace
3. verify that the Old Undo Tablespace is no longer in use -- confirm that there are no active transactions in undo segments in it
4. drop the old Undo tablespace
5. Run your RMAN Backup
You run the risks of
a. Waiting a long time at step 3
b. ORA-1555s for users after you drop the Undo tablespace in step 4.
Hemant K Chitale
http://hemantoracledba.blogspot.com
Maybe you are looking for
-
Updating - the best of both worlds
Hi, Ive had a look through a lot of the topics in this forum, though nobody seems to have wanted to do exactly the same as me. My application has quite a few lengthy operations that are perfomed as part of an actionPerformed event. Im focusing on one
-
How to display a oracle database?
hi everybody, I have create an oracle database with the sql line command. so do somebody hav a tool or wizard to displays it (like in sql server we have DBAMgr2k). thanks to help me
-
How to supply username and password for consuming webservice in BizTalk Adaptor?
While I hit the web service directly , I am able get response from that service, it asked for username and password, after that it processed the request and gave expected output. I am trying to consume the same web service (https) from BizTalk orches
-
Getting the error whie running the HelloWorld page in JDeveloper10g
Exception Details. oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.lang.NullPointerException; at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source) at or
-
Stopping previous functions and tweens onPress
Flash newbie. Trying to see if someone can guide me to a way I could stop my earlier tweens and onRollOver function when my onPress function is launched. What I worked out here with that McX/YScale.stop(); and that target9_mc.onRollOver = null; is