Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question
    
This method worked with no problems. All files were copied over and then Oracle was pointed to the new NFS mounts. –  names_are_easy Feb 16 '12 at 19:23
add comment

3 Answers

up vote -1 down vote accepted

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

share|improve this answer
    
Shutdown doesn't trigger a logfile switch. Can you give link for this behaviour? –  Atilla Ozgur Feb 1 '12 at 11:26
    
SHUTDOWN NORMAL, TRANSACTIONAL, or IMMEDIATE completing successfully write the database to a consistent state, so the redo log files are not required to recover the database to a consistent state. They checkpoint the database, but don't force a log switch in and of themselves. Check the Database Concepts guide. –  Adam Musch Feb 1 '12 at 14:57
    
Exactly. However, in order to accomplish this without redo logs, you have to start/stop a recovery session in order for the database to allow you to open it without the redo logs. Do yourself a favor and just move them too. All in all, they are tiny compared to the rest of the instance. –  REW Feb 2 '12 at 4:16
    
-1 I vote down this post because I found inaccuracies and bad advices in this answer and the comment of the author: for example 'create controlfile' is not the best way to change the filenames but should be avoided. –  miracle173 May 27 '12 at 5:35
add comment

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.

share|improve this answer
    
I am not using ASM, so these are FS copies. The sysadmin will be moving the data from the old Netapp to a new one. I think he will be using a Netapp command like "Snap-mirror" or "snapshot" to copy over the data. I am not a storage engineer, but I believe this kind of copy is done at the block level. Would you recommend using RMAN over the Netapp commands? –  names_are_easy Feb 1 '12 at 14:08
    
as a dba I prefer 2b in control. Important is that the snapshots are complete and contain the full database. The snapshots made in the storage should be quicker. –  ik_zelf Feb 1 '12 at 15:19
    
You can snap mirror "hot" and do this with only enough downtime to remount the disks. –  Gaius Feb 3 '12 at 19:45
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.