OracleDBA之路之Redo log files(四)

Relocating and Renaming Redo Log Members
给组成员改名并且换位置

SQL> select * from v$logfile;
 
    GROUP# STATUS  TYPE    MEMBER                                   IS_
---------- ------- ------- ---------------------------------------- ---
         4         ONLINE  /u01/oradata/houzhh/redo04.rdo           NO
我们修改group4
1. Shut down the database.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
2. Copy the redo log files to the new location.
[oracle@oracle11g houzhh]$ cd /u01/oradata/houzhh
[oracle@oracle11g houzhh]$ pwd
/u01/oradata/houzhh
[oracle@oracle11g houzhh]$ cp redo04.rdo .. -----复制redo04.rdo 到上层目录
[oracle@oracle11g houzhh]$ cd ..
[oracle@oracle11g oradata]$ ll
total 10272
drwxr-xr-x 2 oracle oinstall     4096 Sep  4 17:42 db01
drwxr-x--- 2 oracle oinstall     4096 Sep 11 16:26 houzhh
-rw-r----- 1 oracle oinstall 10486272 Sep 11 16:28 redo04.rdo
[oracle@oracle11g oradata]$ mv redo04.rdo  redo04a.rdo -----改名
[oracle@oracle11g oradata]$ ll
total 10272
drwxr-xr-x 2 oracle oinstall     4096 Sep  4 17:42 db01
drwxr-x--- 2 oracle oinstall     4096 Sep 11 16:26 houzhh
-rw-r----- 1 oracle oinstall 10486272 Sep 11 16:28 redo04a.rdo
3. Startup the database, mount, but do not open it.
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
 
Total System Global Area  422670336 bytes
Fixed Size                  1336960 bytes
Variable Size             331352448 bytes
Database Buffers           83886080 bytes
Redo Buffers                6094848 bytes
Database mounted.
4. Rename the redo log members.
SQL> alter database rename file '/u01/oradata/houzhh/redo04.rdo' to '/u01/oradata/redo04a.rdo';
 
Database altered.
5. Open the database for normal operation.
SQL> alter database open;
 
Database altered.
SQL> select * from v$logfile;
 
    GROUP# STATUS  TYPE    MEMBER                                   IS_
---------- ------- ------- ---------------------------------------- ---
         4         ONLINE  /u01/oradata/redo04a.rdo                 NO

 

 

你可能感兴趣的:(oracle)