We set up Oracle on a WIndows 2008R2 server and have a drive that we originally set up for data (D:\Oradata). It contains s directory for our Database with 4 subdirectories(ARCHIVELOG, CONTROLFILE, DATAFILE, ONLINELOG). This takes up about 808G. We now have to move the database to a new E: drive.
I wish to maintain the same database name, tables, indexes, PL/SQL, schemas, etc.
I do this at least quarterly, as a restore test. First, while the DB is up, I use Toad (to keep this thread relevant!) to write the statements for me to move the datafiles and log files:
SELECT
‘alter database rename file ‘’’||member||’’’ to ‘’’||REPLACE(member,‘C:/’,‘E:/’) ||’’’;’ “NEWNAME”
FROM v$logfile
ORDER BY GROUP#, member;
I then follow Part II of MOS Doc 115424.1, using the output from the above to tell the DB where the datafiles are (step 4 in Part II).
This does require the DB to be down, but I don’t know that it can be done cleanly any other way. A test of your procedure on another DB is always advisable!
Let us know if you’re not able to get there. While I probably shouldn’t copy the article verbatim, I can transpose/transcribe the pertinent portion. I use my own similar methods anyway, but thought this link would be easier. Doh!