千家信息网

Oracle 11g RAC开启归档,闪回并设置各自不同的路径

发表于:2025-01-20 作者:千家信息网编辑
千家信息网最后更新 2025年01月20日,操作步骤:(开启归档)在任一个节点操作:[oracle@rac02 ~]$ srvctl stop database -d mecbs[oracle@rac02 ~]$ sqlplus / as sy
千家信息网最后更新 2025年01月20日Oracle 11g RAC开启归档,闪回并设置各自不同的路径

操作步骤:(开启归档)

在任一个节点操作:

[oracle@rac02 ~]$ srvctl stop database -d mecbs[oracle@rac02 ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Mon Sep 14 23:24:19 2015Copyright (c) 1982, 2013, Oracle.  All rights reserved.Connected to an idle instance.SQL> startup mount;ORACLE instance started.Total System Global Area  776646656 bytesFixed Size      2257272 bytesVariable Size    570429064 bytesDatabase Buffers   197132288 bytesRedo Buffers      6828032 bytesDatabase mounted.SQL> alter system set log_archive_dest_1='LOCATION=+ARCH' scope=spfile sid='*';System altered.SQL> alter system set cluster_database=false scope=spfile;System altered.SQL> alter database archivelog;Database altered.SQL> alter database open;Database altered.SQL> alter system set cluster_database=true scope=spfile;System altered.SQL> shutdow immediate;Database closed.Database dismounted.ORACLE instance shut down.SQL> startupORACLE instance started.SQL> startupORACLE instance started.Total System Global Area  776646656 bytesFixed Size      2257272 bytesVariable Size    570429064 bytesDatabase Buffers   197132288 bytesRedo Buffers      6828032 bytesDatabase mounted.Database opened.SQL> archive log list;Database log mode        Archive ModeAutomatic archival        EnabledArchive destination        +ARCHOldest online log sequence     4Next log sequence to archive   5Current log sequence        5开启其他节点。。。

开启数据库闪回:

[oracle@rac01 ~]$ srvctl stop database -d mecbsSQL> startup mount;ORACLE instance started.Total System Global Area  776646656 bytesFixed Size      2257272 bytesVariable Size    541068936 bytesDatabase Buffers   230686720 bytesRedo Buffers      2633728 bytesDatabase mounted.SQL> alter system set db_recovery_file_dest_size=10G scope=spfile sid='*';System altered.SQL> alter system set db_recovery_file_dest='+FRA' scope=spfile sid='*';System altered.SQL> shutdown immediate;ORA-01109: database not openDatabase dismounted.ORACLE instance shut downSQL> startup mount;ORACLE instance started.Total System Global Area  776646656 bytesFixed Size      2257272 bytesVariable Size    541068936 bytesDatabase Buffers   230686720 bytesRedo Buffers      2633728 bytesDatabase mounted.SQL> alter database flashback on;SQL> alter database open;Database altered.SQL> show  parameter db_recovery;NAME         TYPE  VALUE------------------------------------ ----------- ------------------------------db_recovery_file_dest       string  +FRAdb_recovery_file_dest_size      big integer 10GSQL> archive log list;Database log mode        Archive ModeAutomatic archival        EnabledArchive destination        +ARCHOldest online log sequence     5Next log sequence to archive   6Current log sequence        6ASMCMD [+ARCH/MECBS/ARCHIVELOG] > du Used_MB      Mirror_used_MB      9                   9ASMCMD [+fra/MECBS/FLASHBACK] > du Used_MB      Mirror_used_MB    204                 204

=======END=========

0