cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle - Move datafiles to a new filesystem

Former Member
0 Kudos

Hi,

We have an ERP system running on HP-UX with Oracle database.

To stick with SAP recommendation, the filesystems holding the datafiles should have a blocksize of 8192K. We have 5 filesystem of 2 TB for the datafiles of the production system, and 3 have a blocksize of 1024k instead of 8192k.

The safest strategy would be to:

- Stop SAP and DB

- Copy the datafiles of these 3 filesystems to 3 new filesystem with a blocksize of 8192K

- Adapt the mount points

- Restart the DB and SAP

The problem with this strategy is that it is very time consuming, and will need a long downtime to complete it.

We have another strategy in mind:

- Putting the database in backup mode

- Copying all the datafiles (for the 5 filesystems) to new filesystems

- Putting the database back in normal mode

- Stopping SAP and the DB

- Changing the mounting points to the new filesystems

- Starting up the database and recover it (applying all the logs)

- Starting SAP

This should help us reducing the downtime.

Can you advise if it is a valid strategy ? Do you have any other idea on how we could proceed ?

Thanks in advance for your help 🙂

Antoine

Accepted Solutions (1)

Accepted Solutions (1)

stefan_koehler
Active Contributor
0 Kudos

Hi Antoine,

well from a technical point of view this is valid, but to be honest it is slow as well and it includes many manual error-prone activities. Nowadays there is no reason for not using RMAN

The fastest and safest method (in my opinion) would be the following:

  1. Create the 3 new file systems
  2. Perform full image copy backup of corresponding data files to that file system
  3. Perform incremental backups (with block change tracking) and apply them to the corresponding image file copies (Rolling Forward Image Copy Backups)
  4. Perform the last incremental backup (with block change tracking) and apply it right before shutdown of SAP
  5. Shutdown SAP
  6. Use RMAN to switch to data file copy (in new file system)
  7. Use RMAN to recover data files, which should take only a few seconds to minutes depending on the load between step 4 and 5.
  8. Start SAP

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

This method is indeed probably better than doing it manually, and should reduce the downtime to the minimum.

Thanks for this very useful method 🙂

Regards,

Antoine

Answers (2)

Answers (2)

Reagan
Advisor
Advisor
0 Kudos

Hello

This will work provided you apply all the archived logs and open the database with resetlogs option.

What about restoring the database from the backup ? does the restore take a lot of time than the manual copy. If not then that would be the best.

Regards

RB

Former Member
0 Kudos

Hi Benjamin,

We use backup on tapes, and a restore takes around 24 hours. But it would be probably better than copying the datafiles online as it will gives less stress to the storage.

Thanks for the tip 🙂

Regards,

Antoine

former_member188883
Active Contributor
0 Kudos

Hi Antoine,

Refer link for steps http://www.orafaq.com/wiki/Move_datafile_to_different_location

Hope this helps.

Regards,

Deepak Kori

Former Member
0 Kudos

Hi Deepak,

From my understanding, if you put a datafile offline, you can't access it anymore until you put it online again. So, the database is not fully available again, and then also SAP.

If you try to move a datafile with BRTOOLS, it will shutdown the database.

But we could indeed use this method to move different datafiles of one filesystem at different moments.

Regards,

Antoine