do oracle redo logs need to be copied when all other data is copied to a new disks?

dba.stackexchange https://dba.stackexchange.com/questions/11975

  •  16-10-2019
  •  | 
  •  

Question

I have to migrate all data for an Oracle server from the present SAN to a new SAN. It is an 11g database in production on a Linux server. Database software is on local disk but all data (including datafiles, archive logs, control files, etc) are on a SAN via NFS.

The plan is to shut down Oracle before the sysadmin copies over the data to the new SAN. Since we are using NFS, when I start up Oracle again, the change should be transparent to Oracle.

The sysadmin has been told that the redo logs do not need to be copied. It seems to me that the redo logs should be archived before the copy. Should I force a log switch (alter system switch logfile)before the shutdown and then copy the archive logs? Or will a shutdown trigger the redo logs to be archived?

Was it helpful?

Solution

The REDO logs should be copied.

Shutdown doesn't trigger a logfile switch.

If you are changing the paths for the files, then using the "create controlfile reuse noresetlogs" method is the best. If you do move it without REDO logs, then archivelog current and then use the "create controlfile set resetlogs" method. In general though, moving the redo logs are best.

--EDIT--

Based on what you said, you are mounting these in the exact same path, then do your self a favor and just put all of the files, DATAFILES TEMPFILES CONTROLFILES REDOLOGS, etc in the exact same file path. Nothing else to do and it comes up fine.

-Richard

OTHER TIPS

If you are using ASM, you could even do this online by first adding the new disks to the current diskgroups, rebalance the disk groups and drop the old SAN disks from the diskgroups. During this drop, the first thing that happens is - again - a rebalance action in which the data that is on the dropping disks is moved from those disks to the new disks. A very powerful feature, not sure if it can help you.

If it all has to be done using FS copies, it still can be done online, if you are running archive log mode. Since 11g RMAN can clone from an active database, also very powerful.

FWIW: some applications check the controlfile and complain if it is changed. This is part of a check for licenses.

Short answer for you question, you need the online redologfiles. The archives are only needed for recovery operations so they should remain accessible, not perse on the new SAN. A regular backup would be ok. Copy the online redo logfiles and use RMAN for the copy of the database since it handles everything that needs to be done in a good way.

Keep it simple: copy the redo logs.

At least you must recreate them if you don't copy them (do you know how to do this? Perhaps you have to recreate the controlfile too but I am not sure about that) . If the database is not shut down cleanly you cannot open the database at all if you don't have the redo logs.

So keep it simple and copy the redo logs.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top