Monday, June 19, 2017

Oracle GoldenGate Version 12.2.0.1.1 Not Supports Oracle Database 12cR2 (12.2.0.1.0)




Oracle GoldenGate Version (12.2.0.1.1) Not Supports Oracle Database 12cR2 (12.2.0.1.0).

Saturday, June 10, 2017

Duplicate a controlfile when ASM is involved with OMF


1. Modify the spfile specifically the parameter control_files


SQL> alter system set control_files='+RECO/ORCL/CONTROLFILE/current.257.946348789','+DATA' scope=spfile sid='*';
System altered.

2. Start the instance in NOMOUNT mode.


[oracle@rac1-12c ~]$ . oraenv
ORACLE_SID = [orcl] ? orcl1
The Oracle base remains unchanged with value /u01/app/oracle

[oracle@rac1-12c ~]$ sqlplus /nolog
SQL*Plus: Release 12.1.0.2.0 Production on Sun Jun 11 03:48:49 2017
Copyright (c) 1982, 2014, Oracle.  All rights reserved.

SQL> connect sys/oracle as sysdba
Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 2499805184 bytes
Fixed Size      2927480 bytes
Variable Size    738198664 bytes
Database Buffers  1744830464 bytes
Redo Buffers     13848576 bytes
SQL> 

3. From rman, duplicate the controlfile


[oracle@rac1-12c ~]$ rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Sun Jun 11 03:49:25 2017
Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCL (not mounted)

RMAN> restore controlfile from '+RECO/ORCL/CONTROLFILE/current.257.946348789';

Starting restore at 11-JUN-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=13 instance=orcl1 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=+RECO/ORCL/CONTROLFILE/current.257.946348789
output file name=+DATA/ORCL/CONTROLFILE/current.425.946352989
Finished restore at 11-JUN-17

RMAN> exit

4. Modify the control_files parameter with the complete path of the new file: 


[oracle@rac1-12c ~]$ . oraenv
ORACLE_SID = [orcl1] ? orcl1
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/12.1.0.2/db_1
The Oracle base remains unchanged with value /u01/app/oracle

[oracle@rac1-12c ~]$ sqlplus /nolog
SQL*Plus: Release 12.1.0.2.0 Production on Sun Jun 11 03:50:56 2017
Copyright (c) 1982, 2014, Oracle.  All rights reserved.

SQL> connect sys/oracle as sysdba
Connected.

SQL> select open_mode from v$database;
select open_mode from v$database
                      *
ERROR at line 1:
ORA-01507: database not mounted

SQL> alter system set control_files='+RECO/ORCL/CONTROLFILE/current.257.946348789',
                                    '+DATA/ORCL/CONTROLFILE/current.425.946352989' 
                                     scope=spfile sid='*';
System altered.

SQL> shu immediate;
ORA-01507: database not mounted
ORACLE instance shut down.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

5. Check control_files parameter


[oracle@rac1-12c ~]$ srvctl start database -d orcl

[oracle@rac1-12c ~]$ . oraenv
ORACLE_SID = [orcl] ? orcl
The Oracle base remains unchanged with value /u01/app/oracle

[oracle@rac1-12c ~]$ sqlplus /nolog
SQL*Plus: Release 12.1.0.2.0 Production on Sun Jun 11 03:54:34 2017
Copyright (c) 1982, 2014, Oracle.  All rights reserved.

SQL> connect sys/oracle@orcl as sysdba
Connected.

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
orcl2

SQL> show parameter control

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time      integer  7
control_files        string  +RECO/ORCL/CONTROLFILE/current.257.946348789, 
       +DATA/ORCL/CONTROLFILE/current.425.946352989
control_management_pack_access      string  DIAGNOSTIC+TUNING