sql>sho parameter undo_tablespace
NAME TYPE VALUE
---------------------------------- ------ -------
undo_tablespace string UNDOTBS1
SQL> create undo tablespace undotbs2 datafile '/u01/app/oracle/undotbs2.dbf' size 100m;
SQL> drop tablespace test_undo including contents and datafiles;
create tablespace test_undo datafile '/u01/app/oracle/test_undo.dbf' size 128k;
SQL> drop table test_undo_tab purge;
create table test_undo_tab(txt char(1000)) tablespace test_undo;
SQL> insert into test_undo_tab values ('teststring1');
insert into test_undo_tab values ('teststring2');
commit;
SQL>alter system checkpoint;
SQL>alter system set undo_tablespace = undotbs2;
sho parameter undo_tablespace
NAME TYPE VALUE
--------------------------------- ------- ---------
undo_tablespace string UNDOTBS2
SQL>alter system switch logfile;
SQL> col member for a30
select member, l.status from v$log l, v$logfile f where l.group# = f.group# and l.status = 'CURRENT';
MEMBER STATUS
--------------------------- ----------------
/u01/app/oracle/redo04.log CURRENT
SQL> update test_undo_tab set txt = 'teststring_uncommitted' where txt = 'teststring1';
SQL> update test_undo_tab set txt = 'teststring_committed' where txt = 'teststring2';
commit;
[oracle@node1 oracle]$ strings /u01/app/oracle/redo04.log|grep teststring
teststring_uncommitted
teststring1
teststring_committed
teststring2
[oracle@node1 oracle]$ strings /u01/app/oracle/test_undo.dbf|grep teststring
teststring2 ,
teststring1
[oracle@node1 oracle]$ strings /u01/app/oracle/undotbs2.dbf|grep teststring
SQL> alter system checkpoint;
[oracle@node1 oracle]$ strings /u01/app/oracle/test_undo.dbf|grep teststring
teststring_committed ,
teststring_uncommitted
[oracle@node1 oracle]$ strings /u01/app/oracle/undotbs2.dbf| grep teststring
teststring2
teststring1
SQL>drop tablespace test_undo including contents and datafiles;
alter system set undo_tablespace=undotbs1;
drop tablespace undotbs2 including contents and datfiles;
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (2)
Author
Commented:Kindly do the needful.
Regards
Anju Garg
Author
Commented:I have made the required change.
Regards
Anju Garg