Thursday, March 2, 2017

Convert RAC Database In Archive-log Mode

In this example we are converting our RAC database in archive-log mode. We are using single location across instance for archive log destination. Archive log destination can be different on nodes but all the destinations must be accessible to each node while database recovery.

Step 1:- Lets check database configuration


[oracle@rac1 bin]$ ./srvctl config database -d orcl
Database unique name: orcl
Database name: orcl
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/orcl/spfileorcl.ora
Domain: dba.com
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcl
Database instances: orcl1,orcl2
Disk Groups: DATA
Services:
Database is administrator managed


Step 2:Stop database


[oracle@rac1 bin]$ ./srvctl stop database -d orcl


Step 3:Start anyone instance of database in mount mode


[oracle@rac1 bin]$ srvctl start instance -d orcl -i orcl1 -o mount


Step 4:Connect to database and change into archivelog mode


[oracle@rac1 bin]$ sqlplus / as sysdba

SQL> alter database archivelog;

Database altered.

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /u01/app/oracle/product/11.2.0/db_1/dbs/arch
Oldest online log sequence     7
Next log sequence to archive   8
Current log sequence           8
SQL> exit


Step 5: Stop the running instance and start database


[oracle@rac1 bin]$ srvctl stop instance -d orcl -i orcl1

[oracle@rac1 bin]$ srvctl start database -d orcl

[oracle@rac1 bin]$ srvctl status database -d orcl
Instance orcl1 is running on node rac1
Instance orcl2 is running on node rac2



Step 6: Define location for archives.Using OMF so no need to create any directory structure.


[oracle@rac1 bin]$ sqlplus / as sysdba
SQL> alter system set log_archive_dest_1 ='location=+DATA' scope=both SID='*';

System altered.


Step 7:Verify Your work


SQL> ARCHIVE LOG LIST
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            +DATA
Oldest online log sequence     7
Next log sequence to archive   8
Current log sequence           8

ASMCMD> pwd
+DATA/ORCL/ARCHIVELOG




1 comment:

  1. My rather long internet look up has at the end of the day been
    compensated with pleasant insight to talk about with my family and
    friends.
    Oracle Training in Bangalore

    ReplyDelete