Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Renaming redolog members

$
0
0
To complete this requirement you have to shutdown the database, move the redo log files to the new destination, startup the database in mount mode, rename the log members and then open the database.

    [oracle@localhost admin]$ sqlplus / as sysdba 
     
    SQL*Plus: Release 12.1.0.1.0 Production on Wed Mar 12 16:16:04 2014 
     
    Copyright (c) 1982, 2013, Oracle.  All rights reserved. 
     
     
    Connected to: 
    Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 
    With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options 
     
    SQL> set lines 180                         
    SQL> col member format a50 
    SQL> select GROUP#, MEMBER, CON_ID from V$LOGFILE; 
     
        GROUP# MEMBER        CON_ID 
    ---------- -------------------------------------------------- ---------- 
      1 /app/oracle/oradata/TEST/redo01.log         0 
      2 /app/oracle/oradata/TEST/redo02.log         0 
      3 /app/oracle/oradata/TEST/redo03.log         0 
     
    SQL> shutdown immediate; 
    Database closed. 
    Database dismounted. 
    ORACLE instance shut down. 
    SQL> host mv /app/oracle/oradata/TEST/redo01.log /app/oracle/oradata/TEST/redo01_renamed.log 
     
    SQL> host mv /app/oracle/oradata/TEST/redo02.log /app/oracle/oradata/TEST/redo02_renamed.log 
     
    SQL> host mv /app/oracle/oradata/TEST/redo03.log /app/oracle/oradata/TEST/redo03_renamed.log 
     
    SQL> host ls -l /app/oracle/oradata/TEST/*log 
    -rw-r-----. 1 oracle oinstall 52429312 Feb  7 15:59 /app/oracle/oradata/TEST/redo01_renamed.log 
    -rw-r-----. 1 oracle oinstall 52429312 Mar  3 13:00 /app/oracle/oradata/TEST/redo02_renamed.log 
    -rw-r-----. 1 oracle oinstall 52429312 Mar 12 16:17 /app/oracle/oradata/TEST/redo03_renamed.log 
     
    SQL> startup mount; 
    ORACLE instance started. 
     
    Total System Global Area  626327552 bytes 
    Fixed Size      2291472 bytes 
    Variable Size    473958640 bytes 
    Database Buffers   146800640 bytes 
    Redo Buffers      3276800 bytes 
    Database mounted. 
    SQL> alter database rename file '/app/oracle/oradata/TEST/redo01.log','/app/oracle/oradata/TEST/redo02.log','/app/oracle/oradata/TEST/redo03.log' 
      2  to '/app/oracle/oradata/TEST/redo01_renamed.log','/app/oracle/oradata/TEST/redo02_renamed.log','/app/oracle/oradata/TEST/redo03_renamed.log'; 
     
    Database altered. 
     
    SQL> alter database open; 
     
    Database altered. 
     
    SQL> select GROUP#, MEMBER, CON_ID from V$LOGFILE; 
     
        GROUP# MEMBER        CON_ID 
    ---------- -------------------------------------------------- ---------- 
      1 /app/oracle/oradata/TEST/redo01_renamed.log        0 
      2 /app/oracle/oradata/TEST/redo02_renamed.log        0 
      3 /app/oracle/oradata/TEST/redo03_renamed.log        0  

Done*****

Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>