Skip to main content

Enable Archivelog mode on Oracle11g R2 RAC environment

Today I want to show you how to enable archivelog mode on Oracle 11g R2 RAC environment.

1. Checking log_mode:
 [oracle@rac1 acfs]$ export ORACLE_SID=RAC1  
 [oracle@rac1 acfs]$ sqlplus "/as sysdba"  
 SQL> archive log list  
 Database log mode No Archive Mode  
 Automatic archival Disabled  
 Archive destination USE_DB_RECOVERY_FILE_DEST  
 Oldest online log sequence 9  
 Current log sequence 10  
 SQL>  

[oracle@rac2 acfs]$ export ORACLE_SID=RAC2  
 [oracle@rac2 acfs]$ sqlplus "/as sysdba"  
 SQL*Plus: Release 11.2.0.1.0 Production on Mon Oct 13 18:13:53 2014  
 Copyright (c) 1982, 2009, Oracle. All rights reserved.  
 Connected to:  
 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production  
 With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,  
 Data Mining and Real Application Testing options  
 SQL> select name, open_mode, log_mode from v$database;  
 NAME   OPEN_MODE      LOG_MODE    
 --------- -------------------- ------------  
 RAC    READ WRITE      NOARCHIVELOG  
 SQL>  

Using SRVCTL utility stop cluster database
 [oracle@rac1 ~]$ srvctl stop database -d RAC  

--checking statuses
[oracle@rac1 ~]$ srvctl status database -d RAC  
 Instance RAC1 is not running on node rac1  
 Instance RAC2 is not running on node rac2  

Connect to node 1 and startup instance on mount mode, enable archiving and at the end shutdown the instance:

 SQL> startup mount  
 ORACLE instance started.  
 Total System Global Area 849530880 bytes  
 Fixed Size         1339824 bytes  
 Variable Size       570429008 bytes  
 Database Buffers     272629760 bytes  
 Redo Buffers        5132288 bytes  
 Database mounted.  
 SQL> ALTER DATABASE ARCHIVELOG;  
 SQL> SHUTDOWN IMMEDIATE;  

As you know we have shared files between instances so, this operation only has to be done from a single node.

Now start the clustered database
 [oracle@rac1 ~]$ srvctl start database -d RAC  
 [oracle@rac1 ~]$ srvctl status database -d RAC  
 Instance RAC1 is running on node rac1  
 Instance RAC2 is running on node rac2 


--Check again on both nodes
 SQL> select name, open_mode, log_mode, instance_name from v$database, v$instance;  
 NAME   OPEN_MODE      LOG_MODE   INSTANCE_NAME  
 --------- -------------------- ------------ ----------------  
 RAC    READ WRITE      ARCHIVELOG  RAC1  

 SQL> select name, open_mode, log_mode, instance_name from v$database, v$instance;  
 NAME   OPEN_MODE      LOG_MODE   INSTANCE_NAME  
 --------- -------------------- ------------ ----------------  
 RAC    READ WRITE      ARCHIVELOG  RAC2  
 SQL>  

That`s all.

Comments

Popular posts from this blog

Rman encryption and other techniques

Today I will demonstrate Recovery Manager features, especially encryption and some other techniques. First of all let me note about RMAN backup encryption. Staring from Oracle 10g RMAN now creates encrypted backups that cannot be restored by unauthorized people. There are 3 modes of backup encryption: * Transparent encryption * Password encryption * Dual-mode encryption using either transparent or password encryption All RMAN backups are not encrypted but you can encrypt any RMAN backup in the form of a backup set. In this tutorial I will show you how to configure Password encryption. Let`s finish talking and start to demonstrate. check parameters with "SHOW ALL" command, by default encryption is OFF RMAN> show all; RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTR...

ORA-03206: maximum file size of (5242880) blocks in AUTOEXTEND clause is out of range

Today when I want to change max size of datafile I got strange error. ALTER DATABASE DATAFILE '/u01/app/oracle/oradata/MYDB/users01.dbf' AUTOEXTEND ON NEXT 1280K MAXSIZE 32GB ORA-03206: maximum file size of (5242880) blocks in AUTOEXTEND clause is out of range Here is reason: The maximum file size for an autoextendable file has exceeded the maximum number of blocks allowed. After research internet I found that instead of using 32GB we can use 32767M. (same values but in MB). Or you may use 31GB too. ALTER DATABASE DATAFILE '/u01/app/oracle/oradata/MYDB/users01.dbf' AUTOEXTEND ON NEXT 1280K MAXSIZE 32767M;

Fix ORA-01139: RESETLOGS option only valid after an incomplete database recovery

While shutting down my TEST database process was hanged. Then I had to use shutdown abort. But when I wanted to start database it did not open. SQL> select name from v$database; NAME --------- TEST SQL> shut abort; ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 6597406720 bytes Fixed Size 2265664 bytes Variable Size 3204451776 bytes Database Buffers 3372220416 bytes Redo Buffers 18468864 bytes Database mounted. SQL> alter database open; alter database open * ERROR at line 1: ORA-03113: end-of-file on communication channel Process ID: 6552 Session ID: 191 Serial number: 3  What`s wrong?  SQL> alter database open resetlogs; ERROR:    ORA-03114: not connected to ORACLE    SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Pr...