How to switch undo tablespace

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....

Similar Messages

  • 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

  • How to Shrink UNDO Tablespace

    Hello,
    We had a UNDO Tablespace of 22Gb but it is using just 2GB. How to shrink undo tablespace. we are using clustered 3 node production database 10.2.0.4
    Is there is way that we can shrink UNDO Tablespace or do i need to create a UNDO tablespace and assign the undo tablespace to DB and drop the old UNDO?
    How to ensure that transactions are done and free to drop the old UNDO?
    Is it something we need to restart all the three nodes as each node has its own UNDO Tablespace.
    Need Help on this issue.
    would appreciate your quick response.
    Thanks

    if i am in your place i will do the following:
    <pre class="jive-pre">1-Query DBA_DATA_FILES to determine the name of the datafiles of the UNDO</pre>
    2. Create a new UNDO tablespace.
    <pre class="jive-pre">CREATE UNDO TABLESPACE undo_ts2 DATAFILE '/directory/undo_ts2_01.dbf' SIZE xxxM;</pre>
    3. Modify the database parameter to use the new UNDO tablespace.
    <pre class="jive-pre"> ALTER SYSTEM SET undo_tablespace=undo_ts2 SCOPE=BOTH; </pre>
    4-The Drawback:
    <pre class="jive-pre">New transactions will begin using the new undo tablespace. After some time passes (at least the number of seconds specified by the UNDO_RETENTION initialization parameter), you can drop the old UNDO tablespace. The downside to this approach is that for a short time period, your database will have two UNDO tablespaces</pre>
    Regards
    Mohamed

  • How to estimate undo tablespace size in 11g?

    I found someone document said, use this sql to estimate undo tablespace:
    select (UR*(UPS*DBS))+(DBS*24) as "bytes" from (select value as UR from v$parameter where name='undo_retention'),(select (sum(undoblks)/sum(((end_time-begin_time)*86400))) as UPS from v$undostat),(select value as DBS from v$parameter where name='db_block_size');
    but in my 11g database, the "select value as UR from v$parameter where name='undo_retention'" is 0. so above sql is always get 196608(8192*24)
    How to estimate undo tablespace size in 11g?
    Thanks very much!

    for undo segments size you should turn it to be autoextend on as well undo management set to be AUTO
    i.e
    undo_managment='AUTO'
    for retention see that link
    Ora-01555, snapshot too old: rollback segment number 2 with name "_SYSSMU1
    BTW as hemant stated leave it to be auto which is good approach but make sure enough space on disk has been
    dedicated for undo segments are allowed to grow to the size they need to be based on the requested undo_retention.
    Khurram                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Switch undo tablespace issue

    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).

  • How to recover undo tablespace in 9i

    How can i recover undo tablespace 9i.Can any provide step by step recovery process

    Doc ID 94114.1 on Metalink might be of interest to you

  • Switch undo tablespace

    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

  • How to protect UNDO TABLESPACE in 9iR2

    We can put REDO LOGs onto different disks by the means of multiplexing, so that even though one datafile is corrupted, the whole system would still be operational. But UNDO TABLESPACE doesn't provide such a mechanism. If the datafile of the active UNDO TABLESPACE is corrupted, it's dead.
    I don't think a system would risk its availability on the single failure of the UNDO TABLESPACE. So there must be some tricks to circumvent this problem. Can anyone tell me that?
    Thanks!

    951368 wrote:
    I am sorry... I should have been more clear...
    The issue i have is : My primary is a 3 node RAC and i created the same 3 node physical standby, now we had a 4th node at our standby, standby allowed me to add all the required cluster parameteres like instance#,thread# for 4th node, but i was stopped at creating a undo tablespace for the 4th node. What is the procedure? do i need to create it at primary or is there a way i can directly create at standby?
    ThanksHi,
    So you have 3 nodes primary and wanted to add 4th node on standby?
    Create the 4th undo tablespace in primary using
    sql > create undo tablespace "undotbs4" datafile 'xxxxx' size xxxx;
    The primary won't touch this undo as none of the instances should pointing to this new undo.
    In the standby on 4th node define 'undo_tablespace' to undotbs4.
    Cheers

  • 2 Undo Tablespace both ONLINE, How to drop previous undo tbs

    Hello Team,
    Undo management=auto
    After Cloning :-
    To reclaim space i created another undo tablespace, but now both are online, but as per oracle as soon as you switch undo tablespace, previous undo TBS gets in Pending offline mode,offline mode, (So that transaction get finished)
    But in my case Both UNDO Tablespaces are online
    Previous Undo TBS1:- 600 GB
    New UNDo Tb2s:- 100GB
    Please suggest how to drop this online undo TBS1
    TABLESPACE_NAME ONLINE_
    APPS_UNDOTS1 ONLINE
    APPS_UNDOTS1 ONLINE
    APPS_UNDOTS1 ONLINE
    APPS_UNDOTS1 ONLINE
    APPS_UNDOTS1 ONLINE
    APPS_UNDOTS1 ONLINE
    APPS_UNDOTS1 ONLINE
    APPS_UNDOTS1 ONLINE
    APPS_UNDOTS1 ONLINE
    APPS_UNDOTS2 ONLINE
    APPS_UNDOTS2 ONLINE
    TABLESPACE_NAME ONLINE_
    APPS_UNDOTS2 ONLINE

    Hi As per
    select segment_name,owner,tablespace_name,status from dba_rollback_segs where tablespace_name like 'UNDOTBS1';
    All Are offline for UNDOTBS1(Previous)
    SEGMENT_NAME OWNER TABLESPACE_NAME STATUS
    SYSSMU49861044602693$ PUBLIC APPS_UNDOTS1 OFFLINE
    SYSSMU4893847838046$ PUBLIC APPS_UNDOTS1 OFFLINE
    SYSSMU48682660477388$ PUBLIC APPS_UNDOTS1 OFFLINE
    SYSSMU47753309457002$ PUBLIC APPS_UNDOTS1 OFFLINE
    SYSSMU47131240212364$ PUBLIC APPS_UNDOTS1 OFFLINE
    434 rows selected.

  • Undo Tablespace queries

    Hi All,
    I am bit confused with reading about the undo table space. so i need some clarification
    1. There are 2 undo tablespace in our application. Could someone explain how the 2 undo tablespace works? I didn't find any details about this.
    2. Both the undo tablespace is 100% utilized. Where the the new transaction will go? Will new transaction force the used blocks to be expired if needed?
    3. What should be the ideal size of undo tablespace with respect to the total storage size?
    4. is Archive log related to undotable space? if yes then When the archive logs get generated?
    Thanks

    1. In an RAC database, each Instance has to have it's own Undo Tablespace.
    In a non-RAC (single instance) database, only one Undo Tablespace may be active at any time. The other Undo Tablespace would be inactive but can be switched to with an ALTER SYSTEM SET UNDO_TABLESPACE command.
    2. Even if an Undo Tablespace is "100% used" Oracle can expire (and even drop) old extents and segments that are no longer needed by the Undo_Retention value. Thus, undo data for older transactions that have committed (more than Undo_Retention period has elapsed since the commit) will be overwritten.
    3. There's no "ideal size". Undo sizing is based on Transaction volumes, fluctuations in transaction volumes, query patterns etc.
    4. No, there is no direct relation between the two. However, all Undo that is generated also is written to Redo -- i.e. Redo captures Undo as well as it captures changes to Tables, Indexes etc.
    I suggest that you read the Oracle Concepts documentation at
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/toc.htm
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Undo Tablespace - newbie question

    Q1. Is an Undo Tablespace mandatory in a database ? I thought the only mandatories were SYSTEM, SYSAUX and TEMP ?
    Q2. What happens if you do not have an Undo Tablespace ?
    Q2. How does an Undo Tablespace relate to Undo / Rollback Segments in a database ?

    >
    Just to give simple, one-liner replies though its all covered in the doc link given by Helios,
    Q1. Is an Undo Tablespace mandatory in a database ? I thought the only mandatories were SYSTEM, SYSAUX and TEMP ?Yes, it is a mandatory tablespace loss of which would be requiring you to do a closed database recovery.
    Q2. What happens if you do not have an Undo Tablespace ?The system tablespace's Undo segment would be used. But that's a bad idea and you should have one .
    Q2. How does an Undo Tablespace relate to Undo / Rollback Segments in a database ?Because Undo segments are no where else but within the Undo tablespace only.
    HTH
    Aman....

  • Exclude undo tablespace in event

    How to exclude undo tablespace from monotoring in grid control? If event is created to notify when tablespace is reached to 90% and wants to exlcude undo. Is it possible?

    Edit the Undo tablespace and "Disable Threshold" on it.

  • How to rebuil undo and temp tbspc

    Hi hussein/helios
    Our apps undo and temp tablespaces got so big ( like 10Gb each) that it almost run out of space. Ho do i resync in back to 2Gb each.
    Is there a system commnad like > alter tablespace undo resync?
    Thanks a lot
    msK

    Hi,
    Please refer tech note *262066.1 : How To Size UNDO Tablespace For Automatic Undo Management*
    Hope helps.
    Regards,
    X A H E E R

  • 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.

  • 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
    Mahi

    Check 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.
    "

Maybe you are looking for

  • Adding AET field in IDOC

    Hi Experts, We have one custom IDoc.In that we have a segment for AET generated fields.Now i added a new field using AET.I am trying to add this new field to the segment.So i am trying to cancel release status of segment using we31.But i am getting e

  • WebUtil's configuration problem

    I have the following problem: I installed WebLogic Server 10.3.5, Fusion Middleware (Forms/Reports) 11.1.2 and Oracle XE 11g. My environment works correctly, when application don't uses webutil. When I open an application that uses WebUtil, happens t

  • How can i use page break for every 5 records in sap scripts

    on every 5 lines of records i have go for a new page so what is procedure to do this .if possible send me with coding .

  • I need a program! I'll pay you!

    Hi! I have to create a java program but I'm in difficult and I have no very experience with Java. The program is the following: Create a Client POP3 that is able to list messages, that are on the Server POP3, without have to download them. Users must

  • Keycode for License Merge Module

    Hi, please help.  I am supporting a legacy enterprise app written in  VB6 + Crystal Report 10, now it is upgraded to Windows 7 and Crystal Report XI R2.  I need to create a deployment package using InstallShield.  But the Crystal License Merge Module