Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

moving a datafile

Status
Not open for further replies.
Sep 25, 2000
18
US
I would like to move a datafile from one physical disk to another. What's the best way to do this without losing the data that is currently there. Thanks in advance. erick@cmoremedical.com
 
To move a datafile to a different location:

1. Shut down the database.
2. Copy the datafile(s) to the desired location(s).
3. Mount the database, but do not open it.
4. Issue the following command for every datafile that has been moved.
ALTER DATABASE RENAME FILE 'old_name' TO 'new_name';
5. Open the database.
6. Back up your control file.

If the file belongs to a non system tablespace you should also be able to do the rename by just taking the tablespace offline, instead of shutting down the entire database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top