Monday, February 14, 2011

MOVE DATAFILES AND REDO LOGS TO NEW LOCATION

    1. Query current datafiles location

      clip_image001[4]

    2. Shutdown database

      clip_image002[4]

    3. Move datafiles to the new location

      In my case I move datafiles to L:\oradata

    4. Startup mount database

      clip_image003[4]

    5. Alter database and specify the new location of each datafile

      Alter database rename file 'c:\oracle\product\10.2.0\oradata\mruhtel\system01.dbf' to 'l:\oradata\system01.dbf';

      Alter database rename file 'c:\oracle\product\10.2.0\oradata\mruhtel\sysaux01.dbf' to 'l:\oradata\sysaux01.dbf';

      Alter database rename file 'c:\oracle\product\10.2.0\oradata\mruhtel\undotbs01.dbf' to 'l:\oradata\undotbs01.dbf';

      Alter database rename file 'c:\oracle\product\10.2.0\oradata\mruhtel\users01.dbf' to 'l:\oradata\users01.dbf';

      Alter database rename file 'c:\oracle\product\10.2.0\oradata\mruhtel\example01.dbf' to 'l:\oradata\example01.dbf';

      Moving redologs

      Alter database rename file 'c:\oracle\product\10.2.0\oradata\mruhtel\redo01.log' to 'l:\oradata\redo01.log';

      Alter database rename file 'c:\oracle\product\10.2.0\oradata\mruhtel\redo02.log' to 'l:\oradata\redo02.log';

      Alter database rename file 'c:\oracle\product\10.2.0\oradata\mruhtel\redo03.log' to 'l:\oradata\redo03.log';

    6. Open database
    7. Query datafile and logfile location

      clip_image004[4]

      clip_image005

No comments:

Post a Comment