Database Reference
In-Depth Information
ALTER TABLESPACE payroll OFFLINE NORMAL;
Step 2: Rename the data files at OS Level
Use OS commands (cp in Unix, copy in Windows) to change the
name/location of data files associated with the tablespace.
Step 3: Inform Oracle About The Change
Use the ALTER TABLESPACE statement with RENAME
DATAFILE clause to inform Oracle regarding the change you
made to the data files at the OS level.
ALTER TABLESPACE payroll RENAME DATAFILE
'/disk1/oradata/test/payroll_data01.dbf',
'/disk1/oradata/test/payroll_data02.dbf'
TO
'/disk2/oradata/test/payroll_data01.dbf',
'/disk2/oradata/test/payroll_data02.dbf';
Step 4: Make Tablespace ONLINE
Use the following statement to bring the tablespace online again
and that's it.
ALTER TABLESPACE payroll ONLINE;
In case you want to change the name and/or location of data
file(s) belonging to SYSTEM tablespace than you have to
shutdown Oracle database follow step 2 and then STARTUP
MOUNT, this command will make the Instance alive and the
Instance will mount the database but it will not be open to the
public. Then follow step 3 and finally open the database using
following SQL statement.
ALTER DATABASE OPEN;
Search WWH ::




Custom Search