Operating System - HP-UX
1753989 Members
6625 Online
108811 Solutions
New Discussion юеВ

how do I move the logfile and control file ?

 
Deanna Tran_1
Frequent Advisor

how do I move the logfile and control file ?

Currently, the logfile and control file are on the internal diskes..and i now want to move those to the external diskes? how would I do that? the reason for doing this, because i want to improve performance and plus oracle uses all of my CPU....
4 REPLIES 4
Dave Chamberlin
Trusted Contributor

Re: how do I move the logfile and control file ?

To move the controlfiles:
1) shutdown the database normally
2) move the controlfiles to their new locations
3) edit your initora file to have the new paths of your controlfiles
4) restart the database

To move redo logs is a little more complicated:
1) shutdown the database normally
2) move the redo log files to their new locations
3) only do a STARTUP MOUNT command when restarting the database.
4) do ALTER DATABASE RENAME 'the_old_path' to 'the_new_path'
the_old_path would be like /u01/oradata/PROD/redo01.log etc
5) do ALTER DATABASE OPEN, and you are done
Jeanine Kone
Trusted Contributor

Re: how do I move the logfile and control file ?

I think the easiest way to move the redo log files would be to add new logfiles using the new mountpoints and then drop the old ones. you can use the gui for this - alter database would be the command to use if you don't have the gui.

For the control file: I would shut down the database. copy / move the control files to the new place, edit the init(sid).ora file to indicate the new location of control files, start the database back up.

BTW - take a full backup before you make significant changes like these - just in case.

Deanna Tran_1
Frequent Advisor

Re: how do I move the logfile and control file ?

oops..I got this error message after moving the
redo logs...
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-00305: log 1 of thread 1 inconsistent; belongs to another database
ORA-00312: online log 1 thread 1: '/u09/oradata/saki/redo01.log'

however..i know it is belong to that database;
Doni Darmawan
Advisor

Re: how do I move the logfile and control file ?

Hi Deanna,

I guess that you copied your log file using 'cp' commmand, not 'mv' command. It usually happened and I ever got the same problem. That error appeared because the owner of log file is not exactly same with the old one. Simply type "ll" command to see.
If you see the different owner of the log file, just type command with syntax:

chown dbowner:osgroup yourfiles

Ex.

chown oraprod:dba redo01.log

I hope this can solve your problem.

Rgrds,

Doni