"Undo Tablespace X moved to Pending Switch-Out state."
Hi,
The alert.log is recorded several '"Undo Tablespace X moved to Pending Switch-Out state." notifications after UNDOTBS2 was created and brought ONLINE along with UNDOTBS1. UNDOTBS2 is now the default UNDO.
I understand that the notification is because of the "PENDING OFFLINE" state of the rollback segment which has the active transactions.
I ran the following query as per Metalink Doc 341372.1:
We are now having performance issues, could the sessions showing up from the query above be contributing to performance bottlenecks?
Please advise as this is high intensity production database.
Thanks and Regards,
A
Edited by: 850391 on Apr 16, 2011 12:22 AM
Hello,
The alert.log is recorded several '"Undo Tablespace X moved to Pending Switch-Out state." notifications after UNDOTBS2 was created and brought ONLINE along with UNDOTBS1. UNDOTBS2 is now the default UNDO.Why did you have to create a second UNDO Tablespace ?
We are now having performance issuesDid you have this performance issues before or after you have switched to UNDOTBS2 ?
If you killed the sessions which were using the former UNDO tablespace UNDOTBS1, then now some Transactions may be rollbacking.
If these Transactions were rather heavy, it can be ressource consuming to Rollback them.
It's just an assumption, as previously posted, you may use AWR or STATSPACK to see better what it's happening.
Hope this help.
Best regards,
Jean-Valentin
Similar Messages
-
How to drop an undo tablespace which is in Pending Offline status
Dear All,
I changed my undo tablespace from undotbs1 to undonew in order to drop undotbs1.
But my undotbs1 is in pending offline state, how can i drop undotbs1
Thanks
MahiCheck here
Managing the Undo Tablespace
Query V$TRANSACTION find out which transaction holding rollback segment on old undo tablespace. Commit or rollback it.
Or simply wait for a while patiently.
Quote "
The switch operation does not wait for transactions in the old undo tablespace to commit. If there are any pending transactions in the old undo tablespace, the old undo tablespace enters into a PENDING OFFLINE mode (status). In this mode, existing transactions can continue to execute, but undo records for new user transactions cannot be stored in this undo tablespace.
An undo tablespace can exist in this PENDING OFFLINE mode, even after the switch operation completes successfully. A PENDING OFFLINE undo tablespace cannot be used by another instance, nor can it be dropped. Eventually, after all active transactions have committed, the undo tablespace automatically goes from the PENDING OFFLINE mode to the OFFLINE mode.
" -
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 -
Hi,
I am running Oracle 9.2 on Solaris. I have Automatic undo management turned on and have a Undo tablespace by name UNDOTBS. It has a single datafile and has AUTOEXTEND feature turned on. My UNDO_RETENTION was set to 4 hours.
Presently, the size of UNDOTBS has grown to around 40G and has filled up the file system in which it resides. I need to clean up the file system. In order to do this, I followed the below procedure.
SQL> create undo tablespace UNDOTBS1 datafile '/u04/oradata/proddb/undo_00.dbf' size 1024M autoextend off;
SQ> alter system set undo_tablespace=undotbs1 scope=both;
SQL> alter system set undo_retention=3600 scope=both;
Now, i checked the alert log and it is offlining all the UNDO segments of the first undo tablespace UNDOTBS. It is taking time and has been more than 1.5 hours. I have a couple of questions here,
1. As i have issued "alter system undo_tablespace=undotbs1 scope=both", all the new transactions will use the new UNDOTBS1. No new transactions will be using the first undo tablespace UNDOTBS right?
2. Since, i have issued "alter system undo_retention=3600 scope=both", all the transactions in first undo tablespace UNDOTBS will be rolled back after 2 hours, no matter if it is commited or not. After this period, i am safe to drop the first undo tablespace using "drop tablespace UNDOTBS including contents and datafiles;". Did i get it right?
Any information will be of a great help.
THanks,
Harris.Hi,
Thank you all for the replies. It has been two days since i switched the undo_tablespace to use the new tablespace(undotbs1) but my alert log is still being flooded with " Undo tablespace 1 moved to pending switch out state". I tried the following to see if there are any rows returne from the above query and it did 3 rows, showing some undo segments with the following output
SQL> select a.name, b.status from v$rollname a, v$rollstat b where a.name in (select segment_name from dba_segments where tablespace_name='UNDOTBS') and a.usn=b.usn;
Name Status
_SYSSMU15$ UNKNOWN
_SYSSMU33$ UNKNOWN
_SYSSMU9$ PENDING OFFLINE
I have seen gone through the metalink id: 341372.1 that speaks about this SWITCH-OUT state. How can i make sure what old transactions are still using the Undo segments in first undo tablespace and how can i go about killing them. Could anyone please let me know that i could use the following queries to find the correct sessions that are using the Old Undo tablespace.
SQL> select ADDR, XIDUSN,STATUS, START_TIME from v$transaction;
SQL> SELECT
a.usn,
a.name,
b.status,
c.tablespace_name,
d.addr,
e.sid,
e.serial#,
e.username,
e.program,
e.machine,
e.osuser
FROM
v$rollname a,
v$rollstat b,
dba_rollback_segs c,
v$transaction d,
v$session e
WHERE
a.usn=b.usn AND
a.name=c.segment_name AND
a.usn=d.xidusn AND
d.addr=e.taddr AND
b.status='PENDING OFFLINE';
Just wanted to make sure that the second query lists the PENDING OFFLINE segments of the first tablespace right?
This is a prod. box, so wanted to confirm with you guys before proceeding.
Thanks,
Harris. -
Is it OK to Switching Undo Tablespaces without DB stop ?
We use Oracle11g R2.
I read Oracle Doc and It looks OK.
But, how could I make sure UNDO tablespace mode(ONLINE,PENDING OFFLINE) ?
Switching Undo Tablespaces
You can switch from using one undo tablespace to another. Because the UNDO_TABLESPACE initialization parameter is a dynamic parameter, the ALTER SYSTEM SET statement can be used to assign a new undo tablespace.
The following statement switches to a new undo tablespace:
ALTER SYSTEM SET UNDO_TABLESPACE = undotbs_02;
Assuming undotbs_01 is the current undo tablespace, after this command successfully executes, the instance uses undotbs_02 in place of undotbs_01 as its undo tablespace.
If any of the following conditions exist for the tablespace being switched to, an error is reported and no switching occurs:
The tablespace does not exist
The tablespace is not an undo tablespace
The tablespace is already being used by another instance (in an Oracle RAC environment only)
The database is online while the switch operation is performed, and user transactions can be executed while this command is being executed. When the switch operation completes successfully, all transactions started after the switch operation began are assigned to transaction tables in the new undo tablespace.
The switch operation does not wait for transactions in the old undo tablespace to commit. If there are any pending transactions in the old undo tablespace, the old undo tablespace enters into a PENDING OFFLINE mode (status). In this mode, existing transactions can continue to execute, but undo records for new user transactions cannot be stored in this undo tablespace.
An undo tablespace can exist in this PENDING OFFLINE mode, even after the switch operation completes successfully. A PENDING OFFLINE undo tablespace cannot be used by another instance, nor can it be dropped. Eventually, after all active transactions have committed, the undo tablespace automatically goes from the PENDING OFFLINE mode to the OFFLINE mode. From then on, the undo tablespace is available for other instances (in an Oracle Real Application Cluster environment).After you switch the UNDO_TABLESPACE parameter to the new tablespace, at the minimum, you have to wait for active transactions to complete (commit/rollback) before you can take the old Undo Tablespace offline. Note that if you take the old Undo Tablespace offline too quickly, you may prevent long running queries from reading from the old Undo Tablespace and may cause them to error with ORA-01555. So you need to wait a reasonable time (e.g look at MAXQUERYLEN in V$UNDOSTAT) before you take the old Undo Tablespace offline.
Hemant K Chitale -
I want to swithch current undo tablespace to another current undo tablespace,how can i check whether all the sessions have finished and commited in current table space?
I don't think you really need to check because Oracle will handle the switch from old to new undo tablespace the following way:
>
The switch operation does not wait for transactions in the old undo tablespace to commit. If there are any pending transactions in the old undo tablespace, the old undo tablespace enters into a PENDING OFFLINE mode (status). In this mode, existing transactions can continue to execute, but undo records for new user transactions cannot be stored in this undo tablespace.
An undo tablespace can exist in this PENDING OFFLINE mode, even after the switch operation completes successfully. A PENDING OFFLINE undo tablespace cannot be used by another instance, nor can it be dropped. Eventually, after all active transactions have committed, the undo tablespace automatically goes from the PENDING OFFLINE mode to the OFFLINE mode. From then on, the undo tablespace is available for other instances (in an Oracle Real Application Cluster environment). -
Undo tablespace grew 15GB +
Hi Guys,
During one of the processes my UNDO tablespace grew to 15GB(reached it's limit) and it keeps growing. I have made the size to 20GB and it going to fill that too. Can someone suggest a way to fix this issue? Can I create a new TS and drop the old one something like this:
CREATE SMALLFILE UNDO TABLESPACE "UNDOTBS2" DATAFILE 'D:\ORACLE\ORADATA\NGS1\UNDOTBS02.DBF' SIZE 200M REUSE
alter system set undo_tablespace = undotbs2
DROP TABLESPACE UNDOTBS1
If I drop the old UNDO tablespace do I have to follow some prerequisite for example set undo_retention=0 etc. Please let me know.
ThanksHello,
Even if the transaction is commited the Undo Tablespace can keep Undo records ( you have the
parameter undo_retention ).
When you create a new Undo tablespace then, you have to switch the database to it by
using the parameter undo_tablespace.
This is a dynamic parameter but, I use to restart the database so as to be sure that the old
undo tablespace is not used anymore. So that I can drop it.
Of course the database should be shutdown cleanly so that there's no transaction to rollback when
you start it up.
Best regards,
Jean-Valentin -
Doubt regarding ORA-30036: unable to extend segment by 8 in undo tablespace
I am using 11g Release 1 Database .
I have to analyze the performance of two tables of different designs which serve the same purpose and come up with the design which is efficient .
SQL> desc staging_dict
Name Null? Type
SNO NUMBER
CODE_FRAGMENTS CLOB
CODE_FRAGMENTS_U CLOB
CODE_FRAGMENTS_D CLOB
CODE_FRAGMENTS_DO CLOB
SQL> desc staging_dict1
Name Null? Type
SNO NUMBER
CODE_FRAGMENTS CLOB
CODE_FRAGMENTS_UD CLOB
CODE_TYPE VARCHAR2(5 CHAR)Initially I tried inserting a few thousand records into both the tables . Then I did some conversion on one column and I populate the result on other column of the same table . So I update the table in bulk mode and I commit for every thousand records .
I have a undo tablespace of 2G with undo_retention=900 , retention guratantee is not set for the undo tablespace .
When I tried the conversion and update on the first table (STAGING_DICT) it took more time for around 2500 records compared to other table and when I increased the number of records to 10000 it threw an error
ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS'
But I didn't come across this error when I tried the conversion and update on the table for the same 2500 records (STAGING_DICT1) and it was also 10 times faster .
My doubt is does the error ORA-30036 occur because it is saving the undo image of all the four clob columns though I am doing conversion on one column and updating the other column (using only two columns in the update and only one column is affected by update command) ?
Also how is that having less CLOB rows prove more effective by adding one more VARCHAR column which differentiates the code_frament type in the STAGING_DICT1 table than having it as more CLOB columns as in STAGING_DICT table ?Don't you think the error OP reported is kind of weird?
Because as you said, Oracle stores "undo" of lob in user tablespace not undo tablespace if the lob is stored out-of-line.
1. If the size of lob was small, small size of undo would be stored into undo tablespace,
and OP would'nt have undo tablespace shortage problem.
(How does small lob flood undo tablespace?)
2. If the size of lob was big, OP would have 01555 error on user tablespace not undo tablespace shortage error.
So, i think there are 2 theories that can explain this abnormality.
1. OP hit the bug of massive undo generation.
2. OP is using securefile which is 11g new feature.
Oracle documents says that undo for securefile lob is stored in "undo" tablespace, not user tablespace.
But unfortunately, i'm not sture about this coz i didn't try it myself -
Undo tablespace growing without reusing space
Hi,
I'm running an Oracle9i database on Solaris. I am using the automatic undo management and I have one undo tablespace. The UNDO_RETENTION value is 900. I have created the undo tablespace this way (clause in create database statement):
UNDO TABLESPACE "UNDOTBS1" DATAFILE '/u04/oracle/oradata/my_dbname/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
The undo tablespace datafile is now close to 3G. I have other servers running the same setup, and their undo datafile size is still 200M. There is currently no active transaction in the database. Any idea why this is happening? Is there any tables I can check for clues?
Many thanks,
GloriaShould Oracle automatically shrink the undo tablespace (datafile) when it is not needed anymore? Say at one point the database really needs 3G of undo tablespace, but afterwards only 10M is needed, would the datafile be 'shrunk' back?
Also, how can I check if the database really needed the 3G of undo tablespace at one point? (I guess it's checking the level of activities in the database, but how do I do that for past data?)
I'm trying to decide whether the undo tablespace really grew due to a need at some point or is it a case of Bug 2660394 (documented in metalink note271119.1). The bug basically says that "An auto extensible undo tablespace MAY grow before reusing expired extents leading to more space use than actually needed". -
Hello,
I created a new undo tablespace and have successfully switched the database to use the new undo tablespace. Now I want to drop the old undo tablespace.
What is the process for me to drop the old undo tablespace?
Is it drop tablespace undotabsOLD; ? What are the 'gotachas' I should be aware before drop a tablespace that was unsed as an undo tablespace? Thank you in advance.undo_retention is not a 'gotcha' in this case,
according the Oracle document I posted earlier,
the undo tablespace is ready to be dropped when all active transactions gone. It will not wait for undo_retention
see following examples,
--Make a bigger retention just in case
SQL> show parameter undo
NAME TYPE VALUE
undo_management string AUTO
undo_retention integer 3600
undo_tablespace string UNDOTBS_01
-- Now create a new undo
SQL> CREATE UNDO TABLESPACE undotbs_02
2 DATAFILE '/u02/oradata/undo/undo2.dbf' SIZE 100M REUSE AUTOEXTEND ON
3 /
Tablespace created.
-- Before we switch make an uncommited transaction on other session
-- Then
SQL> ALTER SYSTEM SET UNDO_TABLESPACE = undotbs_02;
System altered.
SQL> show parameter undo
NAME TYPE VALUE
undo_management string AUTO
undo_retention integer 3600
undo_tablespace string UNDOTBS_02
-- Try to drop UNDOTBS_01
SQL> drop tablespace UNDOTBS_01 including contents and datafiles
2 /
drop tablespace UNDOTBS_01 including contents and datafiles
ERROR at line 1:
ORA-30013: undo tablespace 'UNDOTBS_01' is currently in use
-- Run a query to list PENDING OFFLINE rollback segments
SQL> SELECT NAME, XACTS "ACTIVE TRANSACTIONS"
2 FROM V$ROLLNAME, V$ROLLSTAT
3 WHERE STATUS = 'PENDING OFFLINE'
4 AND V$ROLLNAME.USN = V$ROLLSTAT.USN;
NAME ACTIVE TRANSACTIONS
_SYSSMU10$ 1
-- Now commit on other session
SQL> select sysdate from dual
2 /
SYSDATE
2007-06-21 03:49:49
SQL> SELECT NAME, XACTS "ACTIVE TRANSACTIONS"
2 FROM V$ROLLNAME, V$ROLLSTAT
3 WHERE STATUS = 'PENDING OFFLINE'
4 AND V$ROLLNAME.USN = V$ROLLSTAT.USN;
NAME ACTIVE TRANSACTIONS
_SYSSMU10$ 0
-- Wait a few seconds
SQL> select sysdate from dual;
SYSDATE
2007-06-21 03:50:00
SQL> SELECT NAME, XACTS "ACTIVE TRANSACTIONS"
2 FROM V$ROLLNAME, V$ROLLSTAT
3 WHERE STATUS = 'PENDING OFFLINE'
4 AND V$ROLLNAME.USN = V$ROLLSTAT.USN;
no rows selected
-- NOW, drop the tablespace
SQL> drop tablespace UNDOTBS_01 including contents and datafiles;
Tablespace dropped.
Done -
Dear all,
I have created a new undo tablespace named undotbs2, How can i switch all the session use the undotbs2?
Many sessions are running and using the old undo tablespace named undotbs1.user7244870 wrote:
CKPT wrote:
Sb has already mentioned links how to manage undo..
For more reference check this below links.
http://oracleflash.com/32/Change-or-switch-undo-tablespace-in-Oracle-database.html
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/undo.htm#BABGJBJH
I can't open the link.
http://oracleflash.com/32/Change-or-switch-undo-tablespace-in-Oracle-database.html
Is there a specific reason that you are not willing to read the official doc link?
http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/logical.htm#CNCPT1079
Aman.... -
Move an undo tablespace datafile while online
Having a spirited debate at work today. Is it possible, or has anyone successfully moved an undo tablespace datafile while keeping the database online? (Hypothetically someone created it in the wrong directory)
My logic:
Create a new undo tablespace B
Switch undo tablespace from A to B
Take tablespace A offline
Once A goes from 'PENDING OFFLINE' to 'OFFLINE' copy the file to new location
Alter database rename file location
Switch undo tablespace from B to A
Drop tablespace B
Any comments?Yes I do understood that, but you don't have to "move" the datafile.
The procedure I proposed is just to create a new undo tablespace, drop the former and forget about it.
You can't "move" the file stricto sensu while the database is online, but nothing prevents you from switching from one tablespace to another. Once it's done, everything's fine. And if you're on 10G (r2?) you might even rename tablespace "B" to tablespace "A"!
Yoann. -
Cannot drop undo tablespace with Active extents but no active sessions
Hi all,
I am running on 10gr2 oracle database in a Linux 32 bit environment.
I have a corrupted undo datafile. I've been able to recover the datafile but still the alert logs is still showing that it is corrupted.
Now what I'm trying to do is to drop the old undo tablespace like the one discussed here Change undo tablespace in Oracle - Switch Oracle's Undo tablespace.
My problem is I have an Active extent but no active session corresponding to it:
SYS@ccasdb AS SYSDBA > SELECT a.name,b.status
FROM v$rollname a,v$rollstat b
WHERE a.usn = b.usn
AND a.name IN (
SELECT segment_name
FROM dba_segments
WHERE tablespace_name = 'UNDOTBS1'
); 2 3 4 5 6 7 8
NAME STATUS
_SYSSMU18$ PENDING OFFLINE
SYS@ccasdb AS SYSDBA > SELECT a.name,b.status , d.username , d.sid , d.serial#
2 FROM v$rollname a,v$rollstat b, v$transaction c , v$session d
3 WHERE a.usn = b.usn
4 AND a.usn = c.xidusn
5 AND c.ses_addr = d.saddr
6 AND a.name IN (
7 SELECT segment_name
8 FROM dba_segments
9 WHERE tablespace_name = 'UNDOTBS1'
10 );
no rows selected
but still cannot drop the undotablespace.
SYS@ccasdb AS SYSDBA > drop tablespace UNDOTBS1 including contents and datafiles;
drop tablespace UNDOTBS1 including contents and datafiles
ERROR at line 1:
ORA-30013: undo tablespace 'UNDOTBS1' is currently in use
Regards,
TimYes i was able to recover the datafile but the alert_log kept on prompting that it is still corrupted. The datafile's status is online.
I want to kill the session/s contributing to the PENDING OFFLINE status of the rollback segment so I can already drop the undotablespace and so
that the alert log will stop prompting for that corrupted datafile in that UNDOTABLESPACE.
Can i Just alter the tablespace's datafiles to offline drop then just drop it. Then I drop the tablespace? -
Hey Folks,
I really need some help here.
I'm trying to drop/recreate the undo tablespace (currently 25gig) Oracle 9i
When I try to drop the undo tablespace 'UNDOTBS1' I get the following error:
âORA-01548: active rollback segment '_SYSSMU1$' found, terminate dropping tablespaceâ
Here's what I have tried so far:
- Bounced the DB several times hoping to get rid of the reference to the active rollback segment. No luck.
- Created a new undo table space
- Tried 'Alter system set undo_tablespace=new_one' (noticed that 10 new rollback segs were created '_SYSMU11$..SYSMU20$' pointing to the new undo tablespace)
- I then performed an offline drop of the undo tablespace data file. After the offline drop, the system rollback segs SYSMU01$..SYSMU10$ went offline as would be expected.
- Even with the new undo tablespace, all other application tablespaces still use the old undo which due to the offline drop, no inserts, deletes, etc. will work.
After all the above, I still get the same error when trying to drop the undo tablespace.
Any ideas? Ideally I would like to be able to drop the undo tablespace and recreate it, but at this point I'd be happy to bring back the undo tablespace datafile so we can at least use the database again.
Thanks in advance!!
ColinSQL> show parameters undo
undo_retention integer
10800
undo_suppress_errors boolean
FALSE
undo_tablespace string
UNDOTBS03
r.- The undo tablespace which the database is looking for is this one ( UNDOTBS03 )
What is strange about the lines above is that I have
all those params above commented out in my
\pfile\init.ora file (and have bounced the db).
Iâm not sure why they are still showing up.
r.- Perhaps your instance is started with the spfile instead of the init file
Here's what we did after the UNDOTBS1 tablespace
caused the disk to run out of space during a large
import (from now on we are going to use commit = y):
1. Created a new undo tablespace UNDOTBS03 - got
errors so instead we to created it as a temp
tablespace UNDOTBS03 which worked. r.- Yes, but that tablespace was created as a UNDO TABLESPACE ?
2. Tried to drop UNDOTBS1 got the following error
msg:
ORA-01548: active rollback segment '_SYSSMU1$' found,
terminate dropping tablespacer.- Of course, the database did not allow to drop it beacause there were pending transactions
3. SQL> alter system set undo_tablespace =
'UNDOTBS03' scope = both. Tried dropping UNDOTBS1.
Same error as in #2 above.r.- There were still pending transactions with the older undo tablespace
4. We then offline dropped the datafile associated
with UNDOTBS1 hoping that would then allow us to drop
UNDOTBS1. Same error as #2.r.- That was the worst you did. You can not drop a tablespace so...
5. Then tried creating a undo tablespace again:
Create UNDO tablespace undo_temp
datafile 'D:\oracle\oradata\usbperf\undo_temp.DBF'
size 25m autoextend on;
Error on line 0
Create UNDO Tablespace undo_temp
datafile 'D:\oracle\oradata\usbperf\undo_temp.
ORA-00604: error occurred at recursive SQL level 1
ORA-00376: file 2 cannot be read at this time
ORA-01110: data file 2:
'D:\ORACLE\ORADATA\USBPERF\UNDOTBS01.DBF'
So thatâs where we are. I'm guessing that the
original undo tablespace corrupted when it tried to
extend and ran of disk space?
Thanks again for the help.
Colin ok I can guide to solve this but you have to do what I am going to tell you step by step. Is this a production database ?
Joel Pérez
http://www.oracle.com/technology/experts -
Hi Gurus,
How to drop an undo tablespace in oracle 10.2.
when i issue drop tablespace undo including contents
it shows like "ORA-30013: undo tablespace 'UNDO' is currently in use"
Pls help it out......
Regards
RajeshThe reason why you cannot drop this tablespace is because it has been declared as the undo tablesapace for the database by means of the UNDO_TABLESPACE instance parameter.
You have to create a new undo tablespace and change the undo_tablespace instance parameter value to point to the new undo tablespace:
ALTER SYSTEM SET UNDO_TABLESPACE=<N EW UNDO TS>;
Afterwards you will have to wait for a while before you are able to drop the current tablespace if there are active transactions or if the information is still required to perform flashback queries (it depends on the UNDO_RETENTION instance parameter), so it is suggested to temporarily reduce this value so you can perform the switch to the new tablespace and you can get rid of the current tablespace.
~ Madrid
http://hrivera99.blogspot.com/
Maybe you are looking for
-
How to display utf-8 coding chinese characters in code editor of a English version dreamweaver
hi, i am trying to insert some chinese words in my html script,( English win7 and English dreamweaver Cs6), no matter what coding I chose, the characters can not display in coding eidtor,but they showed well in live and desing. why? Do I have to use
-
Retrieving a ref object from complex object table
Hai All, I have problem retrieving a ref object. The scenario is as follows: create type typ1 as object (c1 number, c2 varchar2(25)); create type typ2 as object (c1 number, c2 ref typ1); create table tab1 of typ2; I generate the java classes using th
-
What am I doing wrong that is making it run so slowly? I have MS Word documents that I convert to .ps, then use Distiller to produce .pdf files. When I try to create a new pdf using multiple files, it takes a very long time... as in 30-45 minutes. Gr
-
When running my dtrace script for one day I get the following message on the console, 1987 dynamic variable drop Can anyone give some hint as what is happening?
-
As the subject says, I'm a newcomer to Mac, and a long-time hostage of Microsoft. I can't get used to working with "libraries of pictures". When I import to these libraries, what happens to the original pictures? If I edit the pictures in the library