The answers provided by previous posters are all correct regarding the syntax to create a new UNDO tablespace and to switch system to the new UNDO tablespace.
The Oracle documentation states that the following statement will switch to the new UNDO tablespace:
ALTER SYSTEM SET UNDO_TABLESPACE = <name of new UNDO TS>;
e.g. for @Mohammad Jolani:
ALTER SYSTEM SET UNDO_TABLESPACE = UNDOTBS20140508;
However there are some restrictions to this switching which are documented as:
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).
So according to A PENDING OFFLINE undo tablespace cannot be used by another instance, nor can it be dropped. you would have to wait until Oracle has fully switched the current UNDO tablespace completely.
Try querying the status of the tablespace with :
select file#, ts#, status, bytes, substr(name, 0, 30) from v$datafile;
You might find that your old UNDO tablespace is still being used or in the PENDING OFFLINE
state.
You could also try switching the UNDO tablespaces back and forth with:
ALTER SYSTEM SET 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).
If the parameter value for UNDO TABLESPACE is set to '' (two single quotes), then the current undo tablespace is switched out and the next available undo tablespace is switched in. Use this statement with care, because if there is no undo tablespace available, the SYSTEM rollback segment is used. This causes ORA-01552 errors to be issued for any attempts to write non-SYSTEM related undo to the SYSTEM rollback segment.
You can not force the switching unless you shut down your database. If Oracle thinks it still needs the old UNDO TS then so be it. Your system will already be writing to the new UNDO TS so there is no need to force anything unless you have special requirements.