首页 > 代码库 > DATAGUARD 添加修改REDOLOG大小
DATAGUARD 添加修改REDOLOG大小
DG在线日志组大小修改环境(单实例,Centos 6.5 X64,oracle 10.2.0.5,filesystem存储)REDO ONLINE LOGselect * from v$logfile where type=‘STANDBY‘; #查询为standby log 三组STANDBY LOGselect * from v$logfile where type<>‘STANDBY‘; #查询ONLINE LOG 为四组1.备库standby log 添加alter database recover managed standby database cancel;#取消APPLIEDalter database add standby logfile group 8 (‘/u01/app/oracle/oradata/netdata/st_redo08a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo08b.log‘) size 300M;alter database add standby logfile group 9 (‘/u01/app/oracle/oradata/netdata/st_redo09a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo09b.log‘) size 300M;alter database add standby logfile group 10 (‘/u01/app/oracle/oradata/netdata/st_redo10a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo10b.log‘) size 300M;alter database add standby logfile group 11 (‘/u01/app/oracle/oradata/netdata/st_redo11a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo11b.log‘) size 300M;2.删除备库standby logalter database drop logfile group 4;alter database drop logfile group 5;alter database drop logfile group 6;alter database drop logfile group 7;如果出现以下错误,在主库上切换一下日志ERROR at line 1:ORA-00261: log 4 of thread 1 is being archived or modifiedORA-00312: online log 4 thread 1: ‘/u01/app/oracle/oradata/netdata/st_redo04b.log‘3.主库standbylog添加alter database add standby logfile group 8 (‘/u01/app/oracle/oradata/netdata/st_redo08a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo08b.log‘) size 300M;alter database add standby logfile group 9 (‘/u01/app/oracle/oradata/netdata/st_redo09a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo09b.log‘) size 300M;alter database add standby logfile group 10 (‘/u01/app/oracle/oradata/netdata/st_redo10a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo10b.log‘) size 300M;alter database add standby logfile group 11 (‘/u01/app/oracle/oradata/netdata/st_redo11a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo11b.log‘) size 300M;4.删除主库旧的standby logalter database drop logfile group 4;alter database drop logfile group 5;alter database drop logfile group 6;alter database drop logfile group 7;5.主库添加新的ONLINE REDO LOGalter database add standby logfile group 12 (‘/u01/app/oracle/oradata/netdata/st_redo12a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo12b.log‘) size 300M;alter database add standby logfile group 13 (‘/u01/app/oracle/oradata/netdata/st_redo13a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo13b.log‘) size 300M;alter database add standby logfile group 14 (‘/u01/app/oracle/oradata/netdata/st_redo14a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo14b.log‘) size 300M;6.主库删除旧的ONLINE REDOLOG删除之前切文档,首先查看是不是ACTIVE或者是INACTIVE不是INACTIVE 多切几次归档alter system logfile switchalter system checkpointalter database drop logfile group 1;alter database drop logfile group 2;alter database drop logfile group 3;7.备库添加新的ONLINE REDO LOGalter system set standby_file_management=‘MANUAL‘;alter database add standby logfile group 12 (‘/u01/app/oracle/oradata/netdata/st_redo12a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo12b.log‘) size 300M;alter database add standby logfile group 13 (‘/u01/app/oracle/oradata/netdata/st_redo13a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo13b.log‘) size 300M;alter database add standby logfile group 14 (‘/u01/app/oracle/oradata/netdata/st_redo14a.log‘,‘/u01/app/oracle/oradata/netdata/st_redo14b.log‘) size 300M;8.删除备库旧的ONLINE REDO LOGSQL> alter database drop logfile group 1;alter database drop logfile group 1*ERROR at line 1:ORA-01624: log 1 needed for crash recovery of instance netdata (thread 1)ORA-00312: online log 1 thread 1: ‘/u01/app/oracle/oradata/netdata/redo01.log‘[oracle@oracle10g-dg1-213-100 ~]$ oerr ora 0162401624, 00000, "log %s needed for crash recovery of instance %s (thread %s)"// *Cause: A log cannot be dropped or cleared until the thread‘s checkpoint// has advanced out of the log.// *Action: If the database is not open, then open it. Crash recovery will// advance the checkpoint. If the database is open force a global// checkpoint. If the log is corrupted so that the database cannot// be opened, it may be necessary to do incomplete recovery until// cancel at this log.尝试clean logfileALTER DATABASE CLEAR LOGFILE GROUP 1*ERROR at line 1:ORA-19527: physical standby redo log must be renamedORA-00312: online log 1 thread 1: ‘/u01/app/oracle/oradata/netdata/redo01.log‘[oracle@oracle10g-dg1-213-100 netdata]$ oerr ora 1952719527, 00000, "physical standby redo log must be renamed"// *Cause: The CLEAR LOGFILE command was used at a physical standby// database. This command cannot be used at a physical standby// database unless the LOG_FILE_NAME_CONVERT initialization// parameter is set. This is required to avoid overwriting// the primary database‘s logfiles.// *Action Set the LOG_FILE_NAME_CONVERT initialization parameter.LOG_FILE_NAME_CONVERT参数未初始化SQL> alter system set log_file_name_convert=‘/u01/app/oracle/oradata/netdata/‘,‘/u01/app/oracle/oradata/netdata/‘ scope=spfile;System altered.SQL> shutdown immediate;ORA-01109: database not openDatabase dismounted.ORACLE instance shut down.SQL> startup nomount;ORACLE instance started.Total System Global Area 704643072 bytesFixed Size 2098912 bytesVariable Size 184551712 bytesDatabase Buffers 511705088 bytesRedo Buffers 6287360 bytesSQL> alter database mount standby database;Database altered.SQL> ALTER DATABASE CLEAR LOGFILE GROUP 1;Database altered.SQL> ALTER DATABASE CLEAR LOGFILE GROUP 2;Database altered.SQL> ALTER DATABASE CLEAR LOGFILE GROUP 3;Database altered.SQL> alter database drop logfile group 1;Database altered.SQL> alter database drop logfile group 2;Database altered.SQL> alter database drop logfile group 3;Database altered.SQL> alter system set standby_file_management=‘AUTO‘ scope=both;System altered.SQL> alter database recover managed standby database disconnect from session;Database altered.
DATAGUARD 添加修改REDOLOG大小
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。