Add Extra ASM Control File

Use RMAN command “restore controlfile from” to duplicate a controlfile.

Playing around to add another control file into ‘+DATA2’ disk group.

Check current control files

SQL> select name from v$controlfile;

NAME
----------------------------------------------------------
+DATA2/ractest/controlfile/current.523.925063153
+FRA/ractest/controlfile/current.1395.925063153

SQL> show parameter control_file

NAME                                TYPE VALUE
------------------------------------ ----------- -------------------------
control_file_record_keep_time integer 7
control_files                 string   +DATA2/ractest/controlfile/current.523.925063153, +FRA/ractest/controlfile/current.1395.925063153

Change “control_file” parameter in spfile only.

SQL> alter system set control_files='+DATA2','+DATA2/ractest/controlfile/current.523.925063153','+FRA/ractest/controlfile/current.1395.925063153' scope=spfile;

System altered.

Shut down and startup in nomount mode.

SQL> shutdown immediate;
Database dismounted.
ORACLE instance shut down.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 8551575552 bytes
Fixed Size 2270360 bytes
Variable Size 1543506792 bytes
Database Buffers 6996099072 bytes
Redo Buffers 9699328 bytes

Copy another control file to ‘+DATA2’  by restoring from any current available control file.

RMAN> restore controlfile from '+DATA2/ractest/controlfile/current.523.925063153';

Starting restore at 13-OCT-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=58 instance=ractest1 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=+DATA2/ractest/controlfile/current.555.925125605 <-- New one
output file name=+DATA2/ractest/controlfile/current.523.925063153 <-- Old one
output file name=+FRA/ractest/controlfile/current.1395.925063153  <-- Old one
Finished restore at 13-OCT-16

RMAN> exit

Recovery Manager complete.

Check the parameter ‘control_file’ was updated automatically.

SQL> show parameter control_file

NAME                           TYPE    VALUE
------------------------------ ------- ----------------------
control_file_record_keep_time  integer 7
control_files                  string  +DATA2/ractest/controlfile/current.555.925125605,
+DATA2/ractest/controlfile/current.523.925063153, +FRA/ractest/controlfile/current.1395.925063153


SQL> alter database open;

Database altered.

SQL> show parameter control_file

NAME                          TYPE    VALUE
----------------------------- ------- ------------------------------
control_file_record_keep_time integer 7
control_files                 string +DATA2/ractest/controlfile/current.555.925125605,
+DATA2/ractest/controlfile/current.523.925063153, +FRA/ractest/controlfile/current.1395.925063153

TNS-12542: TNS:address already in use

Listener port should be dedicated to listener only.

Trying to create a dedicated Listener for building active standby database without touching current listeners in a critical production environment. Then got those errors:

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 11-OCT-2016 14:24:31

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Starting /u01/app/oracle/product/11.2.0/dbhome_2/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/racnode1/listener_standby/alert/log.xml
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=racnode1)(PORT=8888)))
TNS-12542: TNS:address already in use
 TNS-12560: TNS:protocol adapter error
 TNS-00512: Address already in use
 Linux Error: 98: Address already in use

Listener failed to start. See the error message(s) above...

Checked port 8888 has been used :

$ netstat -na|grep -i 8888
tcp 0 0 127.0.0.1:34244 127.0.0.1:8888 TIME_WAIT
tcp 0 0 127.0.0.1:34245 127.0.0.1:8888 TIME_WAIT
tcp 0 0 ::ffff:127.0.0.1:8888 :::* LISTEN

SOLUTION

It is resolved by using a free port 9999.

$lsnrctl start LISTENER_STANDBY

$lsnrctl status LISTENER_STANDBY

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 11-OCT-2016 15:09:53

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=racnode1)(PORT=9999)))
STATUS of the LISTENER
------------------------
Alias LISTENER_STANDBY
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 11-OCT-2016 15:07:36
Uptime 0 days 0 hr. 2 min. 17 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/racnode1/listener_standby/alert/log.xml
Listening Endpoints Summary...
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=racnode1)(PORT=9999)))
Services Summary...
Service "TSTSTBY1" has 1 instance(s).
 Instance "TSTSTBY1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

ORA-01623: log 31 is current log for instance RACTEST3 (thread 3) – cannot drop

Disable thread before dropping the online redo logfiles.

Three nodes RAC database was migrated to two nodes RAC database, while trying to drop online redo logs of thread 3,  the errors are as below:

SQL> alter database drop logfile group 31;
alter database drop logfile group 31
*
ERROR at line 1:
ORA-01623: log 31 is current log for instance RACTEST3 (thread 3) - cannot drop
ORA-00312: online log 31 thread 3: '+DATA1/ractest/onlinelog/group_31.409.924815767'
ORA-00312: online log 31 thread 3: '+FRA/ractest/onlinelog/group_31.262.924815769'

SOLUTION

Disable thread 3 by :

SQL> alter database disable thread 3;

Database altered.

Then drop the redo logs successfully.

SQL> alter database drop logfile group 31;

Database altered.

SQL> alter database drop logfile group 32;

Database altered.

SQL> alter database drop logfile group 33;
Database altered.

...
..
.