Wednesday, 11 December 2013

Undo tablespace switching


SQL*Plus: Release 9.2.0.1.0 - Production on Sun Jan 25 22:37:25 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> conn /as sysdba;
Connected.
SQL>
SQL>
SQL> select * from v$tablespace;

       TS# NAME                           INC
---------- ------------------------------ ---
         3 CWMLITE                        YES
         4 DRSYS                          YES
         5 EXAMPLE                        YES
         6 INDX                           YES
         7 ODM                            YES
         0 SYSTEM                         YES
         8 TOOLS                          YES
         1 UNDOTBS1                       YES
         9 USERS                          YES
        10 XDB                            YES
         2 TEMP                           YES

       TS# NAME                           INC
---------- ------------------------------ ---
        15 T_BLOCK                        YES
        11 UNDOTBS2                       YES
        14 TEMP1                          YES

14 rows selected.

SQL> create undo tablespace undotbs3 datafile 'e:\oracle\oradata\iacm\undotbs03.
dbf' size 20m;

Tablespace created.

SQL>
SQL> select * from v$tablespace;

       TS# NAME                           INC
---------- ------------------------------ ---
         3 CWMLITE                        YES
         4 DRSYS                          YES
         5 EXAMPLE                        YES
         6 INDX                           YES
         7 ODM                            YES
         0 SYSTEM                         YES
         8 TOOLS                          YES
         1 UNDOTBS1                       YES
         9 USERS                          YES
        10 XDB                            YES
         2 TEMP                           YES

       TS# NAME                           INC
---------- ------------------------------ ---
        15 T_BLOCK                        YES
        11 UNDOTBS2                       YES
        16 UNDOTBS3                       YES
        14 TEMP1                          YES

15 rows selected.

SQL> show parameter undo_tablespace;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_tablespace                      string      UNDOTBS1
SQL>
SQL>
SQL> alter system set undo_tablespace=undotbs3;

System altered.

SQL> show parameter undo_tablespace;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_tablespace                      string      UNDOTBS3
SQL>

No comments:

Post a Comment