Moving Tablespaces
This procedure is the Oracle approved method for renaming a tablespace data file. The datafile might be renamed or moved to a completely different drive. Here are the steps to follow:
1. Login to SQL*Plus as the SYSTEM user (password is usually: manager).
To see the list of tablespace names and their associated data files, enter the following command in SQL*Plus:
SELECT tablespace_name, file_name FROM dba_data_files;
Identify both the tablespace names and the associated data files that you wish to rename. You will need this information in the steps below.
2. Before moving a data file, it must be taken offline. To do this, enter the following command in SQL*Plus:
ALTER TABLESPACE tablespace_name OFFLINE;
3. Shut down the Oracle database either via the Control Panel or via one of the Oracle utilities.
4. Move or rename the data file using the Windows Explorer.
5. Start the Oracle database either via the Control Panel or via one of the Oracle utilities.
6. Now you need to tell Oracle where the file has been moved to. To do this, enter the following command in SQL*Plus while logged in as the SYSTEM user:
ALTER TABLESPACE tablespace_name
RENAME DATAFILE 'original_file_name'
TO 'new_file_name';
This will tell Oracle where the data file is now located. If the new_file_name does not exist, then Oracle will issue an error message to let you know. Don't forget the apostrophes around the filenames.
7. Now you can bring the tablespace back online. To do this, enter the following command in SQL*Plus:
ALTER TABLESPACE tablespace_name ONLINE;
That should do it.