Just a sample case about rebuilding the redo group
来源:互联网 发布:淘宝助理怎么改主图 编辑:程序博客网 时间:2024/05/16 07:12
ORACLE_FileManage_Rebuild the redo group
Just a sample Case:
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
---------- -------------------- ---------- ---------- --- ---------------- ---------------------------
1 1 39967 52428800 1 NO INACTIVE 3688205413 30-1-12
2 1 39968 52428800 1 NO INACTIVE 3688311000 30-1-12
3 1 39969 52428800 1 NO CURRENT 3688413657 30-1-12
Solution:
1. NO-RAC
Case:
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------------
1 1 39967 52428800 1 NO INACTIVE 3688205413 30-1-12
2 1 39968 52428800 1 NO INACTIVE 3688311000 30-1-12
3 1 39969 52428800 1 NO CURRENT 3688413657 30-1-12
Solution:
--- 1. Create a temp redo group 4
$ sqlplus '/as sysdba'
SQL> ALTER DATABASE ADD LOGFILE GROUP 4 ('/opt/oracle/oradata/redotmp01.ora') SIZE 1000M;
--- 2. Switch the logfile, make sure the group 4 is current
SQL> alter system switch logfile;
SQL> select * from v$log;
--- 3. Drop the old redo groups
SQL> alter database drop logfile group 1;
SQL> alter database drop logfile group 2;
SQL> alter database drop logfile group 3;
--- 4. Create the new redo groups. (Must make sure the LV size are enough.)
SQL> ALTER DATABASE ADD LOGFILE GROUP 1 ('/dev/raw/raw10') SIZE 1000M;
SQL> ALTER DATABASE ADD LOGFILE GROUP 2 ('/dev/raw/raw12') SIZE 1000M;
SQL> ALTER DATABASE ADD LOGFILE GROUP 3 ('/dev/raw/raw14') SIZE 1000M;
--- 5. Switch logfile and drop the group 4
SQL> set linesize 400
SQL> alter system switch logfile;
SQL> alter database drop logfile group 4;
2. RAC
Solution:
--- 1. Create a temp redo group 7 and group 8
$ sqlplus '/as sysdba'
SQL> ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 7 ('/opt/oracle/oradata/redotmp07.ora') SIZE 1000M;
SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 8 ('/opt/oracle/oradata/redotmp08.ora') SIZE 1000M;
--- 2. Switch the logfile in the instance 1, make sure the group 7 is current. Switch the logfile in the instance 2, make sure the group8 is current.
SQL> alter system switch logfile;
SQL> select * from v$log;
--- 3. Drop the old redo groups
SQL> alter database drop logfile group 1;
SQL> alter database drop logfile group 2;
SQL> alter database drop logfile group 3;
SQL> alter database drop logfile group 4;
SQL> alter database drop logfile group 5;
SQL> alter database drop logfile group 6;
--- 4. Create the new redo groups. (Must make sure the LV size are enough.)
SQL> ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 1 ('/dev/raw/raw10') SIZE 1000M;
SQL> ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 2 ('/dev/raw/raw12') SIZE 1000M;
SQL> ALTER DATABASE ADD LOGFILE THREAD 1 GROUP 3 ('/dev/raw/raw14') SIZE 1000M;
SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 4 ('/dev/raw/raw15') SIZE 1000M;
SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 ('/dev/raw/raw16') SIZE 1000M;
SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 6 ('/dev/raw/raw17') SIZE 1000M;
--- 5. Switch logfile and drop the group 7 and group 8
SQL> set linesize 400
SQL> alter system switch logfile;
SQL> alter database drop logfile group 7;
SQL> alter database drop logfile group 8;
- Just a sample case about rebuilding the redo group
- Just a sample case about rebuilding standby database using dd command
- Just a simple case about the oracle 11gR1 dataguard configuration
- 55 Which statement about recovering from the loss of a redo log group is true? A. If the lost redo l
- Just a complaint about the college examinations
- 67.The instance abnormally terminates because of a power outage. Which statement is true about redo
- About the Use case diagram
- Which statement is true about loading data using the conventional path of SQL*Loader? A.Redo is not
- Rebuilding A Kernel Module On The Fly(Build a kernel module without rebuilding kernel)
- Evaluating Career Opportunities: It’s Not Just About the Numbers
- It JUST is a copy.(About Keyboard Driver)
- using switch case block not just under the integral type
- ApacheDS 2.0__Basic User Guide 1.5. - About the sample configurations and sample directory data
- just in case
- about the blog, a new friend
- A template about the nandflash driver
- Q&A about the _method_ meaning?
- A small test demo about the ++ operator
- 对 Android 开发者有益的 40 条优化建议
- 可变长度数据存储结构动态删除元素
- php5 non-thread-safe和thread-safe这两个版本有何区别?
- unix环境高级编程-5.4-缓冲
- 站群系统之西部动力We7与动易SiteGroup
- Just a sample case about rebuilding the redo group
- Linux下DDNS客户端的使用
- 51单片机 万年历
- java基础12 IO
- 【转】直接拿来用!超实用的Java数组技巧攻略
- 特征向量相似度和距离计算方法
- SetTimer()函数
- LBS定位技术
- 网站数据分析报告怎么写?