Cum putem muta fisiere redo in Oracle

  • 1- Gaseste locatia fisierelor de log folosind tabela v$logfile.
  • SQL> SELECT member FROM v$logfile;
    
    MEMBER
    --------------------------------------------------------------------------------
    /u00/oracle/oradata/RCAT/redo03.log
    /u00/oracle/oradata/RCAT/redo02.log
    /u00/oracle/oradata/RCAT/redo01.log
  • 2- Oprește baza de date.
  • SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
  • 3-Copia fișierele de log în noul local.
  • mv /u00/oracle/oradata/RCAT/redo03.log /u01/oracle/oradata/RCAT/redo03.log
    mv /u00/oracle/oradata/RCAT/redo02.log /u01/oracle/oradata/RCAT/redo02.log
    mv /u00/oracle/oradata/RCAT/redo01.log /u01/oracle/oradata/RCAT/redo01.log
  • 4-Porniți baza de date în modul "mount" și redenumiți fișierele de log .
  • ALTER DATABASE RENAME FILE '/u00/oracle/oradata/RCAT/redo03.log' to '/u01/oracle/oradata/RCAT/redo03.log';
    ALTER DATABASE RENAME FILE '/u00/oracle/oradata/RCAT/redo02.log' to '/u01/oracle/oradata/RCAT/redo02.log';
    ALTER DATABASE RENAME FILE '/u00/oracle/oradata/RCAT/redo01.log' to '/u01/oracle/oradata/RCAT/redo01.log';
  • 5-Deschide baza de date.
  • SQL> ALTER DATABASE OPEN;
    Database altered.