Monday, February 9, 2009

Rename a tablespace and datafile.

alter tablespace EWAREDATA rename to SAGE_CDS_TEST;

alter tablespace SAGE_CDS_TEST offline;

!mv /srv/oradata1/sage2ewaredata.ora /srv/oradata1/sage2/SAGE_CDS_TEST.dbf

alter tablespace SAGE_CDS_TEST rename datafile '/srv/oradata1/sage2ewaredata.ora' TO '/srv/oradata1/sage2/SAGE_CDS_TEST.dbf';

alter tablespace SAGE_CDS_TEST online;