Monday, June 30, 2014

ORA-16627: operation disallowed since no standby databases would remain to support protection mode

1.Change the dataguard configuration protection mode fails with ora-16627
DGMGRL> edit configuration
> set protection mode as
> maxavailability;
Error: ORA-16627: operation disallowed since no standby databases would remain to support protection mode

2.check the standby database logxptmode
DGMGRL> show database dbrac2 'LogXptMode';
  LogXptMode = 'ASYNC'

3.Change the log transport mode to sync from async
DGMGRL> edit database dbrac2
> set property 'LogXptMode'='sync';
Property "LogXptMode" updated

4.Change the protection mode from maxperformance to maxavailability
DGMGRL> edit configuration
> set protection mode as maxavailability;
Succeeded.
DGMGRL> show configuration

Configuration - dgmgrl1

  Protection Mode: MaxAvailability
  Databases:
  dbrac1 - Primary database
    dbrac2 - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS




Sunday, June 29, 2014

ORA-16698: LOG_ARCHIVE_DEST_n parameter set for object to be added


1.Adding a database in dgmgrl fails with error ora-16698
DGMGRL> add database
> dbrac2 as
> connect identifier is dbrac2;
Error: ORA-16698: LOG_ARCHIVE_DEST_n parameter set for object to be added

dgmgrl alert log file with the  message.
=========================================
06/30/2014 09:54:05
ADD DATABASE
dbrac1 already has log_archive_dest_2 for the object to be added

2.Remove the entry in the log_archive_dest_2 of the primary database and retry adding the database using the dgmgrl CLI

SQL> alter system set log_archive_dest_2='' scope=both;

System altered.

3.Add the database
DGMGRL> add database dbrac2
> as
> connect identifier is dbrac2;
Database "dbrac2" added
Alter log with error message.
=============================================
ADD DATABASE
06/30/2014 10:00:08
Cannot find destination to match the site.

4.Set the protection mode to maximum performance if not set to default
DGMGRL> show configuration

Configuration - dgmgrl1

  Protection Mode: MaxAvailability
  Databases:
  dbrac1 - Primary database
    dbrac2 - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

DGMGRL> edit configuration set protection mode as maxperformance;
Succeeded.

DGMGRL> show configuration;

Configuration - dgmgrl1

  Protection Mode: MaxPerformance
  Databases:
  dbrac1 - Primary database
    dbrac2 - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

5.Enable the configuration
DGMGRL> enable configuration;
Enabled.
DGMGRL> show configuration

Configuration - dgmgrl1

  Protection Mode: MaxPerformance
  Databases:
  dbrac1 - Primary database
    dbrac2 - Physical standby database
      Error: ORA-16810: multiple errors or warnings detected f                                                                        or the database

Fast-Start Failover: DISABLED

Configuration Status:
ERROR


6.Show the database statusreport,check the errors message
DGMGRL> show database 'dbrac2' 'statusReport';
STATUS REPORT
       INSTANCE_NAME   SEVERITY ERROR_TEXT
       new12cdb_rac2    WARNING ORA-16714: the value of property ArchiveLagTarget is inconsistent with the database setting
       new12cdb_rac2    WARNING ORA-16714: the value of property LogArchiveMaxProcesses is inconsistent with the database setting
       new12cdb_rac2    WARNING ORA-16714: the value of property LogArchiveMinSucceedDest is inconsistent with the database setting
       new12cdb_rac2    WARNING ORA-16714: the value of property LogArchiveTrace is inconsistent with the database setting
       new12cdb_rac2    WARNING ORA-16675: database instance restart required for property value modification to take effect
       new12cdb_rac2    WARNING ORA-16714: the value of property LogArchiveFormat is inconsistent with the database setting
                   *      ERROR ORA-16766: Redo Apply is stopped


7.Check the database with inconsistentProperties
DGMGRL> show database verbose dbrac2

Database - dbrac2

  Role:              PHYSICAL STANDBY
  Intended State:    APPLY-ON
  Transport Lag:     0 seconds (computed 0 seconds ago)
  Apply Lag:         (unknown)
  Apply Rate:        (unknown)
  Real Time Query:   OFF
  Instance(s):
    new12cdb_rac2
      Warning: ORA-16714: the value of property ArchiveLagTarget is inconsistent with the database setting
      Warning: ORA-16714: the value of property LogArchiveMaxProcesses is inconsistent with the database setting
      Warning: ORA-16714: the value of property LogArchiveMinSucceedDest is inconsistent with the database setting
      Warning: ORA-16714: the value of property LogArchiveTrace is inconsistent with the database setting
      Warning: ORA-16675: database instance restart required for property value modification to take effect
      Warning: ORA-16714: the value of property LogArchiveFormat is inconsistent with the database setting

  Database Error(s):
    ORA-16766: Redo Apply is stopped

  Properties:
    DGConnectIdentifier             = 'dbrac2'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    RedoRoutes                      = ''
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyLagThreshold               = '0'
    TransportLagThreshold           = '0'
    TransportDisconnectedThreshold  = '30'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '4'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = '/u03/oradata/new12cdb, /u04/oradata/new12cdb'
    LogFileNameConvert              = '/u04/fra/NEW12CDB/onlinelog, /u03/fra/NEW12CDB/onlinelog'
    FastStartFailoverTarget         = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ol6-112-rac2.localdomain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBRAC2_DGMGRL)(INSTANCE_NAME=new12cdb_rac2)(SERVER=DEDICATED)))'
    StandbyArchiveLocation          = '/u03/fra'
    AlternateLocation               = ''
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = '%t_%s_%r.dbf'
    TopWaitEvents                   = '(monitor)'

Database Status:
ERROR


DGMGRL> show database dbrac2 InconsistentProperties;
INCONSISTENT PROPERTIES
   INSTANCE_NAME        PROPERTY_NAME         MEMORY_VALUE         SPFILE_VALUE         BROKER_VALUE
   new12cdb_rac2     ArchiveLagTarget                    0                                         0
   new12cdb_rac2 LogArchiveMaxProcesses                    4                                         4
   new12cdb_rac2 LogArchiveMinSucceedDest                    1                                         1
   new12cdb_rac2      LogArchiveTrace                    0            (missing)                    0
   new12cdb_rac2     LogArchiveFormat         %t_%s_%r.dbf            (missing)         %t_%s_%r.dbf


8.Change the inconsistent properites in the standby database
DGMGRL for Linux: Version 12.1.0.1.0 - 64bit Production

Copyright (c) 2000, 2012, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/sys123@dbrac2
Connected as SYSDBA.
DGMGRL>
DGMGRL> show database verbose dbrac2

Database - dbrac2

  Role:              PHYSICAL STANDBY
  Intended State:    APPLY-ON
  Transport Lag:     0 seconds (computed 0 seconds ago)
..................
DGMGRL> sql "alter system set archive_lag_target=0 scope=both sid='*'";
Succeeded.
DGMGRL> sql "alter system set Log_archive_max_processes=4 scope=both sid='*'";
Succeeded.
DGMGRL> sql "alter system set log_archive_min_succeed_dest=1 scope=both sid='*'";
Succeeded.
DGMGRL> sql "alter system set log_archive_trace=0 scope=both sid='*'";
Succeeded.
DGMGRL> sql "alter system set log_archive_format='%t_%s_%r.dbf' scope=spfile sid='*'";
Succeeded.
DGMGRL> show database dbrac2

Database - dbrac2

  Role:              PHYSICAL STANDBY
  Intended State:    APPLY-ON
  Transport Lag:     0 seconds (computed 1 second ago)
  Apply Lag:         (unknown)
  Apply Rate:        (unknown)
  Real Time Query:   OFF
  Instance(s):
    new12cdb_rac2
      Warning: ORA-16714: the value of property LogArchiveTrace is inconsistent with the database setting
      Warning: ORA-16675: database instance restart required for property value modification to take effect
      Warning: ORA-16714: the value of property LogArchiveFormat is inconsistent with the database setting

  Database Error(s):
    ORA-16766: Redo Apply is stopped

Database Status:
ERROR

9.Logging into the standby database server and Bounce the standby database using the dgmgrl cli
[oracle@ol6-112-rac2 ~]$ dgmgrl
DGMGRL for Linux: Version 12.1.0.1.0 - 64bit Production

Copyright (c) 2000, 2012, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
DGMGRL>
DGMGRL>
DGMGRL> conn sys/sys123@dbrac2
Unrecognized command "conn", try "help"
DGMGRL> connect sys/sys123@dbrac2
Connected as SYSDBA.
DGMGRL> shutdown immediate
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
DGMGRL> startup mount
ORACLE instance started.
Database mounted.
DGMGRL> show database dbrac2

Database - dbrac2

  Role:              PHYSICAL STANDBY
  Intended State:    APPLY-ON
  Transport Lag:     0 seconds (computed 0 seconds ago)
  Apply Lag:         0 seconds (computed 0 seconds ago)
  Apply Rate:        525.00 KByte/s
  Real Time Query:   OFF
  Instance(s):
    new12cdb_rac2

Database Status:
SUCCESS

10.Enable configuartion
DGMGRL> enable configuration
Enabled.
DGMGRL> show configuration

Configuration - dgmgrl1

  Protection Mode: MaxPerformance
  Databases:
  dbrac1 - Primary database
    dbrac2 - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS


Tuesday, June 24, 2014

Sync Mode is required for maximum protection modes

1. Database crashes if the async mode is set for the maximum protection mode. Minimum requirements for setting the maximum protection mode is sync,affirm.
[oracle@ol6-112-rac1 trace]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Tue Jun 24 12:33:52 2014

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

Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2296576 bytes
Variable Size             671089920 bytes
Database Buffers          390070272 bytes
Redo Buffers                5480448 bytes
Database mounted.
SQL> select name,open_mode,protection_mode from v$database;

NAME      OPEN_MODE            PROTECTION_MODE
--------- -------------------- --------------------
NEW12CDB  MOUNTED              MAXIMUM PROTECTION

SQL> show parameter log_archive_dest_3

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_3                   string      SERVICE=ol6rac2  db_unique_nam
                                                 e=ol6rac2 async lgwr compressi
                                                 on=enable max_failure=4 reopen
                                                 =8
log_archive_dest_30                  string
log_archive_dest_31                  string
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 18954
Session ID: 7 Serial number: 5

Alert log:-
==========
Starting background process ARC1
LGWR: Primary database is in MAXIMUM PROTECTION mode
LGWR: Destination LOG_ARCHIVE_DEST_3 is using asynchronous network I/O
LGWR: Destination LOG_ARCHIVE_DEST_1 is not serviced by LGWR
LGWR: Minimum of 1 synchronous standby database required
Errors in file /u01/app/orcl/oracle/diag/rdbms/ol6rac1/new12cdb/trace/new12cdb_lgwr_18928.trc:
ORA-16072: a minimum of one standby database destination is required
ARC1 started with pid=23, OS id=18972
USER (ospid: 18928): terminating the instance due to error 16072
System state dump requested by (instance=1, osid=18928 (LGWR)), summary=[abnormal instance termination].
System State dumped to trace file /u01/app/orcl/oracle/diag/rdbms/ol6rac1/new12cdb/trace/new12cdb_diag_18920.trc
Dumping diagnostic data in directory=[cdmp_20140624123440], requested by (instance=1, osid=18928 (LGWR)), summary=[abnormal instance termination].
Instance terminated by USER, pid = 18928

2.After changing the async to sync ,the database is able to open without any issues.
[oracle@ol6-112-rac1 trace]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Tue Jun 24 12:37:03 2014

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

Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2296576 bytes
Variable Size             671089920 bytes
Database Buffers          390070272 bytes
Redo Buffers                5480448 bytes
Database mounted.
SQL> show parameter log_archive_dest_3

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_3                   string      SERVICE=ol6rac2  db_unique_nam
                                                 e=ol6rac2 async lgwr compressi
                                                 on=enable max_failure=4 reopen
                                                 =8
log_archive_dest_30                  string
log_archive_dest_31                  string
SQL> alter system set log_archive_dest_3='SERVICE=ol6rac2  db_unique_name=ol6rac2 sync lgwr compression=enable max_failure=4 reopen=8';

System altered.

SQL> select name,open_mode,protection_mode,database_role from v$database;

NAME      OPEN_MODE            PROTECTION_MODE      DATABASE_ROLE
--------- -------------------- -------------------- ----------------
NEW12CDB  MOUNTED              MAXIMUM PROTECTION   PRIMARY

SQL> alter database open;

Database altered.



Monday, June 23, 2014

Change the standby protection mode

Change the protection mode from maximum performance to maximum availability
SQL> show parameter log_archive_dest_3

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_3                   string      SERVICE=ol6rac2  db_unique_nam
                                                 e=ol6rac2 sync lgwr compressio
                                                 n=enable max_failure=4 reopen=
                                                 8
log_archive_dest_30                  string
log_archive_dest_31                  string
SQL> show parameter log_archive_config

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_config                   string      DG_CONFIG=(ol6rac1,ol6rac2)
SQL> select name,open_mode,protection_Mode,database_role from v$database;

NAME      OPEN_MODE            PROTECTION_MODE      DATABASE_ROLE
--------- -------------------- -------------------- ----------------
NEW12CDB  READ WRITE           MAXIMUM PERFORMANCE  PRIMARY

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2296576 bytes
Variable Size             671089920 bytes
Database Buffers          390070272 bytes
Redo Buffers                5480448 bytes
Database mounted.
SQL> alter database set standby database to maximize availability;

Database altered.

SQL> alter database open;

Database altered.

SQL> select name, open_mode,protection_mode,database_role from v$database;

NAME      OPEN_MODE            PROTECTION_MODE      DATABASE_ROLE
--------- -------------------- -------------------- ----------------
NEW12CDB  READ WRITE           MAXIMUM AVAILABILITY PRIMARY




RMAN-05001: auxiliary file name %s conflicts with a file used by the target database

renamed tempfile 1 to /u04/oradata/orcl/12cdbtemp01.dbf in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 23-JUN-14
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u04/oradata/orcl/12cdbsystem01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:03:45
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u04/oradata/orcl/12cdbsysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:25
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u04/oradata/orcl/12cdbundotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:35
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u04/oradata/orcl/12cdbusers01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u04/oradata/orcl/12cdbexample01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 23-JUN-14

sql statement: alter system archive log current
current log archived
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/23/2014 18:36:03
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name /u03/fra/1_114_850736530.dbf conflicts with a file used by the target database
Resolution:- Included nofilenamecheck in the rman script the issue is resolved.

[oracle@ol6-112-rac2 rman]$ rman target="sys/sys123@ol6rac1" auxiliary="sys/sys123@ol6rac2"

Recovery Manager: Release 12.1.0.1.0 - Production on Mon Jun 23 19:19:20 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: NEW12CDB (DBID=3192639891)
connected to auxiliary database: NEW12CDB (not mounted)

RMAN> @ rman_standby.cmd

RMAN> duplicate  database 'new12cdb' for standby
2> from active database
3> dorecover
4> spfile
5> set db_unique_name='ol6rac2'
6> set db_recovery_file_dest='/u04/oradata/orcl/fra'
7> set control_files='/u04/oradata/orcl/12cdb/control01.ctl','/u04/oradata/orcl/12cdb/control02.ctl'
8> set audit_file_dest='/u01/app/orcl/oracle/admin/new12cdb/adump'
9> set log_file_name_convert='/u03/fra/NEW12CDB/onlinelog','/u04/oradata/orcl/12cdb'
10> db_file_name_convert='/u03/oradata/new12cdb/','/u04/oradata/orcl/12cdb'
11> nofilenamecheck;
Starting Duplicate Db at 23-JUN-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK
current log archived

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u03/app/oracle/product/12.1.0/dbhome_1/dbs/orapwnew12cdb' auxiliary format
 '/u03/app/oracle/product/12.1.0/dbhome_1/dbs/orapwnew12cdb_dup'   ;
   restore clone from service  'ol6rac1' spfile to
 '/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb_dup.ora';
   sql clone "alter system set spfile= ''/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb_dup.ora''";
}
executing Memory Script

Starting backup at 23-JUN-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=34 device type=DISK
Finished backup at 23-JUN-14

Starting restore at 23-JUN-14
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: restoring SPFILE
output file name=/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb_dup.ora
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 23-JUN-14

sql statement: alter system set spfile= ''/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb_dup.ora''

contents of Memory Script:
{
   sql clone "alter system set  db_unique_name =
 ''ol6rac2'' comment=
 '''' scope=spfile";
   sql clone "alter system set  db_recovery_file_dest =
 ''/u04/oradata/orcl/fra'' comment=
 '''' scope=spfile";
   sql clone "alter system set  control_files =
 ''/u04/oradata/orcl/12cdb/control01.ctl'', ''/u04/oradata/orcl/12cdb/control02.ctl'' comment=
 '''' scope=spfile";
   sql clone "alter system set  audit_file_dest =
 ''/u01/app/orcl/oracle/admin/new12cdb/adump'' comment=
 '''' scope=spfile";
   sql clone "alter system set  log_file_name_convert =
 ''/u03/fra/NEW12CDB/onlinelog'', ''/u04/oradata/orcl/12cdb'' comment=
 '''' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  db_unique_name =  ''ol6rac2'' comment= '''' scope=spfile

sql statement: alter system set  db_recovery_file_dest =  ''/u04/oradata/orcl/fra'' comment= '''' scope=spfile

sql statement: alter system set  control_files =  ''/u04/oradata/orcl/12cdb/control01.ctl'', ''/u04/oradata/orcl/12cdb/control02.ctl'' comment= '''' scope=spfile

sql statement: alter system set  audit_file_dest =  ''/u01/app/orcl/oracle/admin/new12cdb/adump'' comment= '''' scope=spfile

sql statement: alter system set  log_file_name_convert =  ''/u03/fra/NEW12CDB/onlinelog'', ''/u04/oradata/orcl/12cdb'' comment= '''' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2296576 bytes
Variable Size                671089920 bytes
Database Buffers             390070272 bytes
Redo Buffers                   5480448 bytes

contents of Memory Script:
{
   restore clone from service  'ol6rac1' standby controlfile;
}
executing Memory Script

Starting restore at 23-JUN-14
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=19 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
output file name=/u04/oradata/orcl/12cdb/control01.ctl
output file name=/u04/oradata/orcl/12cdb/control02.ctl
Finished restore at 23-JUN-14

contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script

sql statement: alter database mount standby database

contents of Memory Script:
{
   set newname for tempfile  1 to
 "/u04/oradata/orcl/12cdbtemp01.dbf";
   switch clone tempfile all;
   set newname for datafile  1 to
 "/u04/oradata/orcl/12cdbsystem01.dbf";
   set newname for datafile  2 to
 "/u04/oradata/orcl/12cdbsysaux01.dbf";
   set newname for datafile  3 to
 "/u04/oradata/orcl/12cdbundotbs01.dbf";
   set newname for datafile  4 to
 "/u04/oradata/orcl/12cdbusers01.dbf";
   set newname for datafile  5 to
 "/u04/oradata/orcl/12cdbexample01.dbf";
   restore
   from service  'ol6rac1'   clone database
   ;
   sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u04/oradata/orcl/12cdbtemp01.dbf in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 23-JUN-14
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u04/oradata/orcl/12cdbsystem01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:03:45
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u04/oradata/orcl/12cdbsysaux01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:05
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u04/oradata/orcl/12cdbundotbs01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:15
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u04/oradata/orcl/12cdbusers01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u04/oradata/orcl/12cdbexample01.dbf
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:15
Finished restore at 23-JUN-14

sql statement: alter system archive log current
current log archived

contents of Memory Script:
{
   restore clone force from service  'ol6rac1'
           archivelog from scn  2396220;
   switch clone datafile all;
}
executing Memory Script

Starting restore at 23-JUN-14
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=126
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using network backup set from service ol6rac1
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=127
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 23-JUN-14

datafile 1 switched to datafile copy
input datafile copy RECID=5 STAMP=851023774 file name=/u04/oradata/orcl/12cdbsystem01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=6 STAMP=851023775 file name=/u04/oradata/orcl/12cdbsysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=7 STAMP=851023775 file name=/u04/oradata/orcl/12cdbundotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=8 STAMP=851023775 file name=/u04/oradata/orcl/12cdbusers01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=9 STAMP=851023775 file name=/u04/oradata/orcl/12cdbexample01.dbf

contents of Memory Script:
{
   set until scn  2397480;
   recover
   standby
   clone database
    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 23-JUN-14
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 126 is already on disk as file /u03/fra/1_126_850736530.dbf
archived log for thread 1 with sequence 127 is already on disk as file /u03/fra/1_127_850736530.dbf
archived log file name=/u03/fra/1_126_850736530.dbf thread=1 sequence=126
archived log file name=/u03/fra/1_127_850736530.dbf thread=1 sequence=127
media recovery complete, elapsed time: 00:00:05
Finished recover at 23-JUN-14
Finished Duplicate Db at 23-JUN-14

RMAN>
RMAN> **end-of-file**


RMAN-04014: startup failed: ORA-00845: MEMORY_TARGET not supported on this system


connected to auxiliary database (not started)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/23/2014 16:19:21
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-04014: startup failed: ORA-00845: MEMORY_TARGET not supported on this system


Increase size of tmpfs
[root@ol6-112-rac2 ~]# cat /etc/fstab|grep tmpfs
tmpfs                   /dev/shm                tmpfs   defaults,size=4G        0 0
[root@ol6-112-rac2 ~]# mount -o remount tmpfs
[root@ol6-112-rac2 ~]# mount
/dev/mapper/vg_ol6112rac1-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,size=4G)

RMAN-05558: Must specify DB_UNIQUE_NAME with FOR STANDBY clause

[oracle@ol6-112-rac2 rman]$ rman target="sys/sys123@ol6rac1" auxiliary="sys/sys123@ol6rac2"

Recovery Manager: Release 12.1.0.1.0 - Production on Mon Jun 23 16:09:54 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: NEW12CDB (DBID=3192639891)
connected to auxiliary database: NEW12CDB (not mounted)

RMAN> @ rman_dupicate_standby.cmd

RMAN> duplicate  database 'new12cdb' for standby
2> from active database
3> dorecover
4> spfile
5> set audit_file_dest='/u01/app/orcl/oracle/admin/new12cdb/adump'
6> set log_file_name_convert='/u03/fra/NEW12CDB/onlinelog','/u04/oradata/orcl/12cdb'
7> db_file_name_convert='/u03/oradata/new12cdb/','/u04/oradata/orcl/12cdb';
Starting Duplicate Db at 23-JUN-14
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/23/2014 16:10:02
RMAN-05501: aborting duplication of target database
RMAN-05558: Must specify DB_UNIQUE_NAME with FOR STANDBY clause

RMAN> **end-of-file**

Resolution:-
Include db_unique_name in the set clause of duplicate statement

Script:-
duplicate  database 'new12cdb' for standby
from active database
dorecover
spfile
set db_unique_name='ol6rac2'
set audit_file_dest='/u01/app/orcl/oracle/admin/new12cdb/adump'
set log_file_name_convert='/u03/fra/NEW12CDB/onlinelog','/u04/oradata/orcl/12cdb'
db_file_name_convert='/u03/oradata/new12cdb/','/u04/oradata/orcl/12cdb';


Output of script execution:-

oracle@ol6-112-rac2 rman]$ rman target="sys/sys123@ol6rac1" auxiliary="sys/sys123@ol6rac2"

Recovery Manager: Release 12.1.0.1.0 - Production on Mon Jun 23 16:19:01 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: NEW12CDB (DBID=3192639891)
connected to auxiliary database: NEW12CDB (not mounted)

RMAN> @ rman_dupicate_standby.cmd

RMAN> duplicate  database 'new12cdb' for standby
2> from active database
3> dorecover
4> spfile
5> set db_unique_name='ol6rac2'
6> set audit_file_dest='/u01/app/orcl/oracle/admin/new12cdb/adump'
7> set log_file_name_convert='/u03/fra/NEW12CDB/onlinelog','/u04/oradata/orcl/12cdb'
8> db_file_name_convert='/u03/oradata/new12cdb/','/u04/oradata/orcl/12cdb';
Starting Duplicate Db at 23-JUN-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK
current log archived

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u03/app/oracle/product/12.1.0/dbhome_1/dbs/orapwnew12cdb' auxiliary format
 '/u03/app/oracle/product/12.1.0/dbhome_1/dbs/orapwnew12cdb_dup'   ;
   restore clone from service  'ol6rac1' spfile to
 '/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb_dup.ora';
   sql clone "alter system set spfile= ''/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb_dup.ora''";
}
executing Memory Script

Starting backup at 23-JUN-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=57 device type=DISK
Finished backup at 23-JUN-14

Sunday, June 22, 2014

clone 12c oracle home


1. Make sure that no process is using the oracle home , which needs to be cloned.

ps  -ef | grep $RDBMS_USER

2.Create zip file of the oracle home
[oracle@ol6-112-rac1 shared_data]$ zip -r ORACLE_HOME_12C $ORACLE_HOME
[oracle@ol6-112-rac1 shared_data]$ ls -ltr
total 2806596
-rw-r--r-- 1 oracle oinstall 2873945761 Jun 23 09:56 ORACLE_HOME_12C.zip

3.Copy the files to the target host
4.Unzip the zip file ORACLE_HOME_12c.zip

[oracle@ol6-112-rac2 orcl]$ ls -ltr
total 2806596
drwxr-x--- 2 oracle oinstall       4096 Jun  3 18:49 orcl
-rw-r--r-- 1 oracle oinstall 2873945761 Jun 23 09:56 ORACLE_HOME_12C.zip
[oracle@ol6-112-rac2 orcl]$ unzip -d / ORACLE_HOME_12C.zip
                 unable to process u03/app/oracle/product/12.1.0/dbhome_1/jdk/lib/visualvm/platform/config/Modules/org-netbeans-modules-sendopts.xml.
checkdir error:  cannot create /u03/app
                 Permission denied
                 unable to process u03/app/oracle/product/12.1.0/dbhome_1/jdk/lib/visualvm/platform/config/Modules/org-netbeans-modules-editor-mimelookup-impl.xml.
checkdir error:  cannot create /u03/app
                 Permission denied
                 unable to process u03/app/oracle/product/12.1.0/dbhome_1/jdk/lib/visualvm/platform/config/Modules/org-openide-actions.xml.
checkdir error:  cannot create /u03/app

su - root
Password:
[root@ol6-112-rac2 ~]# mkdir -p /u03/app
[root@ol6-112-rac2 ~]# chown -Rf oracle:oinstall /u03/app
[root@ol6-112-rac2 ~]# exit
logout
[oracle@ol6-112-rac2 orcl]$ unzip -d / ORACLE_HOME_12C.zip
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/utlsmtp.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/exfpatch.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtrc.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtbipk.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/dbmsredacta.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/libqsmashr.def
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/catblock.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/dbmsxdbc.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/pubcust.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtxml.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtatsk.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtrawb.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtesch.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtperf.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/sblisins.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtbsmc.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtbiat.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvsemxi.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/catxdbapp.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/utledtol.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/awrddrpt.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvtxlsb.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/dbmspsp.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/catxdbvr.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/utlxmv.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/prvthlut.plb
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/initjvm5.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/catsumaa.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/wwvdocs.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/mgdsys.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/sbreport.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/initscfw.sql
  inflating: /u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/execaq.sql

5.Run the clone.pl script found in the $ORACLE_HOME/clone/bin directory
[oracle@ol6-112-rac2 dbhome_1]$ $ORACLE_HOME/perl/bin/perl  /u03/app/oracle/product/12.1.0/dbhome_1/clone/bin/clone.pl ORACLE_BASE="/u03/app/oracle" ORACLE_HOME="/u03/app/oracle/product/12.1.0/dbhome_1" OSDBA_GROUP=oinstall -defaultHomeName
./runInstaller -clone -waitForCompletion  "ORACLE_BASE=/u03/app/oracle" "ORACLE_HOME=/u03/app/oracle/product/12.1.0/dbhome_1" "oracle_install_OSDBA=oinstall" -defaultHomeName  -silent -paramFile /u03/app/oracle/product/12.1.0/dbhome_1/clone/clone_oraparam.ini
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 6323 MB    Passed
Checking swap space: must be greater than 500 MB.   Actual 4093 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-06-23_10-33-15AM. Please wait ...You can find the log of this install session at:
 /u01/app/oraInventory/logs/cloneActions2014-06-23_10-33-15AM.log
..................................................   5% Done.
..................................................   10% Done.
..................................................   15% Done.
..................................................   20% Done.
..................................................   25% Done.
..................................................   30% Done.
..................................................   35% Done.
..................................................   40% Done.
..................................................   45% Done.
..................................................   50% Done.
..................................................   55% Done.
..................................................   60% Done.
..................................................   65% Done.
..................................................   70% Done.
..................................................   75% Done.
..................................................   80% Done.
..................................................   85% Done.
..................................................   90% Done.
..................................................   95% Done.

Copy files in progress.

Copy files successful.

Link binaries in progress.
Setup files in progress.

Setup files successful.

Setup Inventory in progress.

Setup Inventory successful.

Finish Setup in progress.

Finish Setup successful.
The cloning of OraHome1 was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2014-06-23_10-33-15AM.log' for more details.

As a root user, execute the following script(s):
        1. /u03/app/oracle/product/12.1.0/dbhome_1/root.sh


..................................................   100% Done.
[oracle@ol6-112-rac2 dbhome_1]$ su - root
Password:
[root@ol6-112-rac2 ~]# sh /u03/app/oracle/product/12.1.0/dbhome_1/root.sh
Check /u03/app/oracle/product/12.1.0/dbhome_1/install/root_ol6-112-rac2.localdomain_2014-06-23_10-49-40.log for the output of root script
exit

Friday, June 20, 2014

Upgrade database to 12c using RMAN duplicate


A.Installation of 12c software in the target host





















B. Pre-upgrade steps in the source database for database upgradation  to 12c from 11.2.0.3
 1.copy the preupgrade.sql and utluppkg.sql script from the 12.1.0.1.0 $ORACLE_HOME/rdbms/admin location to the source database /tmp directory
[oracle@ol6-112-rac1 admin]$ scp preupgrd.sql utluppkg.sql  oracle@ol6-112-racDat2:/tmp
preupgrd.sql                                                                                        100% 5231     5.1KB/s   00:00
utluppkg.sql                                                                                        100%  373KB 372.9KB/s   00:00
                                                                                     100% 5231     5.1KB/s   00:00

2.Run the preupgrade.sql
-rw-r--r--  1 oracle  oinstall   5231 Jun 19 14:56 preupgrd.sql
-rw-r--r--  1 oracle  oinstall 381893 Jun 19 14:56 utluppkg.sql
[oracle@ol6-112-rac2 tmp]$ echo $ORACLE_SID
dupdb
[oracle@ol6-112-rac2 tmp]$ sqlplus / as sysdba @preupgrd.sql

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 19 14:58:00 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Loading Pre-Upgrade Package...
Executing Pre-Upgrade Checks...
Pre-Upgrade Checks Complete.
      ************************************************************

Results of the checks are located at:
 /u01/app/orcl/oracle/cfgtoollogs/DUPDB/preupgrade/preupgrade.log

Pre-Upgrade Fixup Script (run in source database environment):
 /u01/app/orcl/oracle/cfgtoollogs/DUPDB/preupgrade/preupgrade_fixups.sql

Post-Upgrade Fixup Script (run shortly after upgrade):
 /u01/app/orcl/oracle/cfgtoollogs/DUPDB/preupgrade/postupgrade_fixups.sql

      ************************************************************

         Fixup scripts must be reviewed prior to being executed.

      ************************************************************

      ************************************************************
                   ====>> USER ACTION REQUIRED  <<====
      ************************************************************

 The following are *** ERROR LEVEL CONDITIONS *** that must be addressed
                    prior to attempting your upgrade.
            Failure to do so will result in a failed upgrade.

           You MUST resolve the above errors prior to upgrade

      ************************************************************


3.Check the logs and preupgrade fixup scripts
[oracle@ol6-112-rac2 tmp]$ sqlplus / as sysdba @preupgrd.sql

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 19 14:58:00 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Loading Pre-Upgrade Package...
Executing Pre-Upgrade Checks...
Pre-Upgrade Checks Complete.
      ************************************************************

Results of the checks are located at:
 /u01/app/orcl/oracle/cfgtoollogs/DUPDB/preupgrade/preupgrade.log

Pre-Upgrade Fixup Script (run in source database environment):
 /u01/app/orcl/oracle/cfgtoollogs/DUPDB/preupgrade/preupgrade_fixups.sql

Post-Upgrade Fixup Script (run shortly after upgrade):
 /u01/app/orcl/oracle/cfgtoollogs/DUPDB/preupgrade/postupgrade_fixups.sql

      ************************************************************

         Fixup scripts must be reviewed prior to being executed.

      ************************************************************

      ************************************************************
                   ====>> USER ACTION REQUIRED  <<====
      ************************************************************

 The following are *** ERROR LEVEL CONDITIONS *** that must be addressed
                    prior to attempting your upgrade.
            Failure to do so will result in a failed upgrade.

           You MUST resolve the above errors prior to upgrade

      ************************************************************

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ol6-112-rac2 tmp]$ more /u01/app/orcl/oracle/cfgtoollogs/DUPDB/preupgrade/preupgrade.log
Oracle Database Pre-Upgrade Information Tool 06-19-2014 14:58:21
Script Version: 12.1.0.1.0 Build: 006
**********************************************************************
   Database Name:  DUPDB
         Version:  11.2.0.3.0
      Compatible:  11.2.0.0.0
       Blocksize:  8192
        Platform:  Linux x86 64-bit
   Timezone file:  V14
**********************************************************************
                          [Renamed Parameters]
                     [No Renamed Parameters in use]
**********************************************************************
**********************************************************************
                    [Obsolete/Deprecated Parameters]
             [No Obsolete or Desupported Parameters in use]
**********************************************************************
                            [Component List]
**********************************************************************
--> Oracle Catalog Views                   [upgrade]  VALID
--> Oracle Packages and Types              [upgrade]  VALID
--> JServer JAVA Virtual Machine           [upgrade]  VALID
--> Oracle XDK for Java                    [upgrade]  VALID
--> Oracle Workspace Manager               [upgrade]  VALID
--> OLAP Analytic Workspace                [upgrade]  VALID
--> Oracle Enterprise Manager Repository   [upgrade]  VALID
--> Oracle Text                            [upgrade]  VALID
--> Oracle XML Database                    [upgrade]  VALID
--> Oracle Java Packages                   [upgrade]  VALID
--> Oracle Multimedia                      [upgrade]  VALID
--> Oracle Spatial                         [upgrade]  VALID
--> Expression Filter                      [upgrade]  VALID
--> Rule Manager                           [upgrade]  VALID
--> Oracle Application Express             [upgrade]  VALID
--> Oracle OLAP API                        [upgrade]  VALID
**********************************************************************
                              [Tablespaces]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
     minimum required size: 1231 MB
--> SYSAUX tablespace is adequate for the upgrade.
     minimum required size: 1469 MB
--> UNDOTBS1 tablespace is adequate for the upgrade.
     minimum required size: 400 MB
--> TEMP tablespace is adequate for the upgrade.
     minimum required size: 60 MB
--> EXAMPLE tablespace is adequate for the upgrade.
     minimum required size: 310 MB

                      [No adjustments recommended]

**********************************************************************
**********************************************************************
                          [Pre-Upgrade Checks]
**********************************************************************
WARNING: --> Process Count may be too low

     Database has a maximum process count of 150 which is lower than the
     default value of 300 for this release.
     You should update your processes value prior to the upgrade
     to a value of at least 300.
     For example:
        ALTER SYSTEM SET PROCESSES=300 SCOPE=SPFILE
     or update your init.ora file.

WARNING: --> Inactive DBIDs found in AWR

     AWR contains inactive DBIDs which may need additional updating after
     upgrading.

WARNING: --> Enterprise Manager Database Control repository found in the database

     In Oracle Database 12c, Database Control is removed during
     the upgrade. To save time during the Upgrade, this action
     can be done prior to upgrading using the following steps after
     copying rdbms/admin/emremove.sql from the new Oracle home
   - Stop EM Database Control:
    $> emctl stop dbconsole

   - Connect to the Database using the SYS account AS SYSDBA:

   SET ECHO ON;
   SET SERVEROUTPUT ON;
   @emremove.sql
     Without the set echo and serveroutput commands you will not
     be able to follow the progress of the script.

WARNING: --> Existing DBMS_LDAP dependent objects

     Database contains schemas with objects dependent on DBMS_LDAP package.
     Refer to the Upgrade Guide for instructions to configure Network ACLs.
     USER APEX_030200 has dependent objects.

INFORMATION: --> OLAP Catalog(AMD) exists in database

     Starting with Oracle Database 12c, OLAP is desupported.
     If you are not using the OLAP Catalog component and want
     to remove it, then execute the
     ORACLE_HOME/oraolap/admin/catnoamd.sql script before or
     after the upgrade.

INFORMATION: --> Older Timezone in use

     Database is using a time zone file older than version 18.
     After the upgrade, it is recommended that DBMS_DST package
     be used to upgrade the 11.2.0.3.0 database time zone version
     to the latest version which comes with the new release.
     Please refer to My Oracle Support note number 977512.1 for details.


**********************************************************************
                      [Pre-Upgrade Recommendations]
**********************************************************************

                        *****************************************
                        ********* Dictionary Statistics *********
                        *****************************************

Please gather dictionary statistics 24 hours prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:
    EXECUTE dbms_stats.gather_dictionary_stats;

^^^ MANUAL ACTION SUGGESTED ^^^

**********************************************************************
                     [Post-Upgrade Recommendations]
**********************************************************************

                        *****************************************
                        ******** Fixed Object Statistics ********
                        *****************************************

Please create stats on fixed objects two weeks
after the upgrade using the command:
   EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;

^^^ MANUAL ACTION SUGGESTED ^^^

**********************************************************************
                   ************  Summary  ************

 0 ERRORS exist in your database.
 4 WARNINGS that Oracle suggests are addressed to improve database performance.
 2 INFORMATIONAL messages that should be reviewed prior to your upgrade.

 After your database is upgraded and open in normal mode you must run
 rdbms/admin/catuppst.sql which executes several required tasks and completes
 the upgrade process.

 You should follow that with the execution of rdbms/admin/utlrp.sql, and a
 comparison of invalid objects before and after the upgrade using
 rdbms/admin/utluiobj.sql

 If needed you may want to upgrade your timezone data using the process
 described in My Oracle Support note 977512.1
                  ***********************************


3.Run the preupgrade fixup script present in the /u01/app/orcl/oracle/cfgtoollogs/DUPDB/preupgrade/preupgrade_fixups.sql
[oracle@ol6-112-rac2 preupgrade]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 19 15:06:53 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @ preupgrade_fixups.sql
Pre-Upgrade Fixup Script Generated on 2014-06-19 14:58:18  Version: 12.1.0.1 Build: 006
Beginning Pre-Upgrade Fixups...

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


**********************************************************************
Check Tag:     DEFAULT_PROCESS_COUNT
Check Summary: Verify min process count is not too low
Fix Summary:   Review and increase if needed, your PROCESSES value.
**********************************************************************
Fixup Returned Information:
WARNING: --> Process Count may be too low

     Database has a maximum process count of 150 which is lower than the
     default value of 300 for this release.
     You should update your processes value prior to the upgrade
     to a value of at least 300.
     For example:
        ALTER SYSTEM SET PROCESSES=300 SCOPE=SPFILE
     or update your init.ora file.
**********************************************************************


PL/SQL procedure successfully completed.


**********************************************************************
Check Tag:     EM_PRESENT
Check Summary: Check if Enterprise Manager is present
Fix Summary:   Execute emremove.sql prior to upgrade.
**********************************************************************
Fixup Returned Information:
WARNING: --> Enterprise Manager Database Control repository found in the database

     In Oracle Database 12c, Database Control is removed during
     the upgrade. To save time during the Upgrade, this action
     can be done prior to upgrading using the following steps after
     copying rdbms/admin/emremove.sql from the new Oracle home
   - Stop EM Database Control:
    $> emctl stop dbconsole

   - Connect to the Database using the SYS account AS SYSDBA:

   SET ECHO ON;
   SET SERVEROUTPUT ON;
   @emremove.sql
     Without the set echo and serveroutput commands you will not
     be able to follow the progress of the script.
**********************************************************************


PL/SQL procedure successfully completed.


**********************************************************************
Check Tag:     DBMS_LDAP_DEPENDENCIES_EXIST
Check Summary: Check for dependency on DBMS_LDAP package
Fix Summary:   Network Objects must be reviewed manually.
**********************************************************************
Fixup Returned Information:
WARNING: --> Existing DBMS_LDAP dependent objects

     Database contains schemas with objects dependent on DBMS_LDAP package.
     Refer to the Upgrade Guide for instructions to configure Network ACLs.
     USER APEX_030200 has dependent objects.
**********************************************************************


PL/SQL procedure successfully completed.


**********************************************************************
Check Tag:     AMD_EXISTS
Check Summary: Check to see if AMD is present in the database
Fix Summary:   Manually execute ORACLE_HOME/oraolap/admin/catnoamd.sql script to remove OLAP.
**********************************************************************
Fixup Returned Information:
INFORMATION: --> OLAP Catalog(AMD) exists in database

     Starting with Oracle Database 12c, OLAP is desupported.
     If you are not using the OLAP Catalog component and want
     to remove it, then execute the
     ORACLE_HOME/oraolap/admin/catnoamd.sql script before or
     after the upgrade.
**********************************************************************


PL/SQL procedure successfully completed.


**********************************************************************
                      [Pre-Upgrade Recommendations]
**********************************************************************


PL/SQL procedure successfully completed.

                        *****************************************
                        ********* Dictionary Statistics *********
                        *****************************************

Please gather dictionary statistics 24 hours prior to
upgrading the database.
To gather dictionary statistics execute the following command
while connected as SYSDBA:
    EXECUTE dbms_stats.gather_dictionary_stats;

^^^ MANUAL ACTION SUGGESTED ^^^


PL/SQL procedure successfully completed.


           **************************************************
                ************* Fixup Summary ************

 4 fixup routines generated INFORMATIONAL messages that should be reviewed.


PL/SQL procedure successfully completed.

**************** Pre-Upgrade Fixup Script Complete *********************

PL/SQL procedure successfully completed.


4.Copy the rdbms/admin/emremove.sql from the new oracle home to the source database and run the script against the database to be upgraded
oracle@ol6-112-rac1 admin]$ pwd
/u03/app/oracle/product/12.1.0/dbhome_1/rdbms/admin
[oracle@ol6-112-rac1 admin]$ scp emremove.sql oracle@ol6-112-rac2:/tmp
emremove.sql                                                                                        100%   19KB  19.2KB/s   00:00
[oracle@ol6-112-rac1 admin]$
=============================
[oracle@ol6-112-rac2 tmp]$ export ORACLE_UNQNAME=dupdb
[oracle@ol6-112-rac2 tmp]$ emctl stop dbconsole
OC4J Configuration issue. /u01/app/orcl/oracle/product/11.2.0.3/db_1/oc4j/j2ee/OC4J_DBConsole_ol6-112-rac2_dupdb not found.
=========================================
SQL> set echo on
SQL> set serveroutput on
SQL> @emremove.sql
SQL> Rem
SQL> Rem $Header: rdbms/admin/emremove.sql /main/2 2012/07/27 01:19:53 spramani Exp $
SQL> Rem
SQL> Rem emremove.sql
SQL> Rem
SQL> Rem Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
SQL> Rem
SQL> Rem    NAME
SQL> Rem emremove.sql - This script removes EM Schema from RDBMS
SQL> Rem
SQL> Rem    DESCRIPTION
Dropping synonym : SMP_EMD_NVPAIR ...
Dropping synonym : SMP_EMD_NVPAIR_ARRAY ...
Dropping synonym : SMP_EMD_STRING_ARRAY ...
Dropping synonym : SMP_EMD_STRING_ARRAY_ARRAY ...
Dropping synonym : SMP_EMD_TARGET_OBJ ...
Dropping synonym : SMP_EMD_TARGET_OBJ_ARRAY ...
Finished phase 5
Starting phase 6 : Dropping Oracle Enterprise Manager related other roles ...
Finished phase 6
The Oracle Enterprise Manager related schemas and objects are dropped.
Do the manual steps to studown the DB Control if not done before running this
script and then delete the DB Control configuration files

PL/SQL procedure successfully completed.

============================

5.gather dictionary statistics
SQL>
SQL>  EXECUTE dbms_stats.gather_dictionary_stats;
PL/SQL procedure successfully completed.

6.configure the controlfile autobackup 'ON' on the source database and take full backup of the database.
[oracle@ol6-112-rac2 rman]$
[oracle@ol6-112-rac2 rman]$ rman target="/"

Recovery Manager: Release 11.2.0.3.0 - Production on Thu Jun 19 14:36:28 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DUPDB (DBID=575818374)
RMAN> configure controlfile autobackup on;

new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored


7. Scrip to take full backup of database plus archivelog
run
{
set controlfile autobackup format for device type disk to '/u03/backup_db2/cntrl_%F';
backup database
format="/u03/backup_db2/%U"
plus archivelog
format="/u03/backup_db2/%U";
}

8. Take backup of the database
[oracle@ol6-112-rac2 rman]$ rman target="/"

Recovery Manager: Release 11.2.0.3.0 - Production on Thu Jun 19 15:30:37 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DUPDB (DBID=575818374)

RMAN> @ rman_backup_db_full.cmd

RMAN> run
2> {
3> set controlfile autobackup format for device type disk to '/u03/backup_db2/cntrl_%F';
4> backup database
5> format="/u03/backup_db2/%U"
6> plus archivelog
7> format="/u03/backup_db2/%U";
8> }
executing command: SET CONTROLFILE AUTOBACKUP FORMAT


Starting backup at 19-JUN-14
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=42 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=1 RECID=1 STAMP=850663295
input archived log thread=1 sequence=2 RECID=2 STAMP=850663336
input archived log thread=1 sequence=3 RECID=3 STAMP=850663357
input archived log thread=1 sequence=4 RECID=4 STAMP=850663378
input archived log thread=1 sequence=5 RECID=5 STAMP=850663396
input archived log thread=1 sequence=6 RECID=6 STAMP=850663676
input archived log thread=1 sequence=7 RECID=7 STAMP=850663844
channel ORA_DISK_1: starting piece 1 at 19-JUN-14
channel ORA_DISK_1: finished piece 1 at 19-JUN-14
piece handle=/u03/backup_db2/01pb86d5_1_1 tag=TAG20140619T153045 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
Finished backup at 19-JUN-14

Starting backup at 19-JUN-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u03/oradata/dupdb/system01.dbf
input datafile file number=00002 name=/u03/oradata/dupdb/sysaux01.dbf
input datafile file number=00005 name=/u03/oradata/dupdb/example01.dbf
input datafile file number=00003 name=/u03/oradata/dupdb/undotbs01.dbf
input datafile file number=00004 name=/u03/oradata/dupdb/users01.dbf
channel ORA_DISK_1: starting piece 1 at 19-JUN-14
channel ORA_DISK_1: finished piece 1 at 19-JUN-14
piece handle=/u03/backup_db2/02pb86e9_1_1 tag=TAG20140619T153121 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:05
Finished backup at 19-JUN-14

Starting backup at 19-JUN-14
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=8 RECID=8 STAMP=850664007
channel ORA_DISK_1: starting piece 1 at 19-JUN-14
channel ORA_DISK_1: finished piece 1 at 19-JUN-14
piece handle=/u03/backup_db2/03pb86i8_1_1 tag=TAG20140619T153327 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 19-JUN-14

Starting Control File and SPFILE Autobackup at 19-JUN-14
piece handle=/u03/backup_db2/cntrl_c-575818374-20140619-00 comment=NONE
Finished Control File and SPFILE Autobackup at 19-JUN-14

RMAN> **end-of-file**


9.copy the backup pieces and the password file to the target location with the new 12c database home installed.
 [oracle@ol6-112-rac2 u03]$ scp -r backup_db2/ ol6-112-rac1:/u03/backup_dupdb
cntrl_c-575818374-20140619-00                                                                       100% 9920KB   9.7MB/s   00:00
03pb86i8_1_1                                                                                        100%   30KB  29.5KB/s   00:00
01pb86d5_1_1                                                                                        100%  288MB  10.3MB/s   00:28
02pb86e9_1_1                                                                                        100% 1211MB   7.6MB/s   02:40
[oracle@ol6-112-rac2 dbs]$ scp initdupdb.ora  oracle@ol6-112-rac1:/u03/app/oracle/product/12.1.0/dbhome_1/dbs
initdupdb.ora                                                                                       100% 1057     1.0KB/s   00:00

C. RMAN duplicate and upgradation of database to 12c from 11.2.0.3
 1.start the auxiliary database using the pfile with only parameter db_name
[oracle@ol6-112-rac1 dbs]$ cat initnew12cdb.ora
db_name=new12cdb
[oracle@ol6-112-rac1 dbs]$ export ORACLE_SID=new12cdb
[oracle@ol6-112-rac1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Fri Jun 20 10:59:14 2014

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

Connected to an idle instance.

SQL> startup nomount pfile=?/dbs/initnew12cdb.ora
ORACLE instance started.

Total System Global Area  217157632 bytes
Fixed Size                  2286656 bytes
Variable Size             159386560 bytes
Database Buffers           50331648 bytes
Redo Buffers                5152768 bytes
SQL>

2. Create the password file for the auxiliary database
[oracle@ol6-112-rac1 dbs]$ orapwd file=orapwnew12cdb entries=10 password=sys123 force=y
[oracle@ol6-112-rac1 dbs]$ ls orapwnew12cdb
orapwnew12cdb

3.create a dedicated listener configuration for the auxiliary database
[oracle@ol6-112-rac1 admin]$ cat listener.ora
LISTEN_FOR_NEW12CDB=
(DESCRIPTION_LIST =
        (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.111)(PORT = 1524))
        )
)
SID_LIST_LISTEN_FOR_NEW12CDB=
(SID_LIST=
        (SID_DESC=
        (ORACLE_HOME=/u03/app/oracle/product/12.1.0/dbhome_1)
        (SID_NAME=new12cdb)
        )
 )

[oracle@ol6-112-rac1 admin]$ lsnrctl start LISTEN_FOR_NEW12CDB

LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 20-JUN-2014 11:06:43

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

Starting /u03/app/oracle/product/12.1.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.1.0.1.0 - Production
System parameter file is /u03/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Log messages written to /u03/app/oracle/diag/tnslsnr/ol6-112-rac1/listen_for_new12cdb/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.111)(PORT=1524)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.111)(PORT=1524)))
STATUS of the LISTENER
------------------------
Alias                     LISTEN_FOR_NEW12CDB
Version                   TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date                20-JUN-2014 11:06:44
Uptime                    0 days 0 hr. 0 min. 1 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u03/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u03/app/oracle/diag/tnslsnr/ol6-112-rac1/listen_for_new12cdb/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.111)(PORT=1524)))
Services Summary...
Service "new12cdb" has 1 instance(s).
  Instance "new12cdb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

4.Create the netservice name for the auxiliary database in $ORACLE_HOME/network/admin/tnsnames.ora file
[oracle@ol6-112-rac1 admin]$ vi tnsnames.ora
[oracle@ol6-112-rac1 admin]$ tnsping new12cdb

TNS Ping Utility for Linux: Version 12.1.0.1.0 - Production on 20-JUN-2014 11:14:51

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

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ol6-112-rac1)(PORT = 1524)) (CONNECT_DATA = (SERVER = DEDICATED) (Service_NAME = new12cdb)))
OK (10 msec)

5.Check the auxiliary database is connecting using the password file
[oracle@ol6-112-rac1 dbs]$ sqlplus sys/sys123@new12cdb as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Fri Jun 20 11:18:23 2014

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL>

6.Check the backup of the source database is present in the backup location
[oracle@ol6-112-rac1 backup_db2]$ pwd
/u03/backup_dupdb/backup_db2
[oracle@ol6-112-rac1 backup_db2]$ ls -ltr
total 1544280
-rw-r----- 1 oracle oinstall   10158080 Jun 19 15:41 cntrl_c-575818374-20140619-00
-rw-r----- 1 oracle oinstall      30208 Jun 19 15:41 03pb86i8_1_1
-rw-r----- 1 oracle oinstall  301484544 Jun 19 15:41 01pb86d5_1_1
-rw-r----- 1 oracle oinstall 1269661696 Jun 19 15:44 02pb86e9_1_1

7.Duplicate the database using backup pieces in the backup location and connect only to the auxiliary database using the script.
run
{
duplicate database 'dupdb' to 'new12cdb'
backup location='/u03/backup_dupdb/backup_db2'
spfile
set db_name='new12cdb'
set control_files='/u03/oradata/new12cdb/control01.ctl','/u03/fra/new12cdb/control02.ctl'
set db_unique_name='new12cdb'
set audit_file_dest='/u01/app/orcl/oracle/admin/new12cdb/adump'
set dispatchers='(PROTOCOL=TCP) (SERVICE=new12cdbXDB)'
set memory_target='1024M'
set memory_max_target='1024M'
set sga_target='0'
set pga_aggregate_target='0'
set local_listener=''
set log_archive_dest_1='LOCATION=/u03/fra'
set log_file_name_convert='/u03/fra/DUPDB/onlinelog','/u03/oradata/new12cdb'
noopen #not open the database in resetlogs mode
db_file_name_convert='/u03/oradata/dupdb','/u03/oradata/new12cdb';
}

8.Output of execution of duplicate script
[oracle@ol6-112-rac1 rman]$ rman auxiliary="sys/sys123@new12cdb" @ rman_duplicate_noopen.cmd | tee -a rman_duplicate_noopen.log

Recovery Manager: Release 12.1.0.1.0 - Production on Fri Jun 20 11:37:18 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to auxiliary database: NEW12CDB (not mounted)

RMAN> run
2> {
3> set newname for tempfile 1 to '/u03/oradata/new12cdb/temp01.dbf';
4> duplicate database 'dupdb' to 'new12cdb'
5> backup location='/u03/backup_dupdb/backup_db2'
6> spfile
7> set db_name='new12cdb'
8> set control_files='/u03/oradata/new12cdb/control01.ctl','/u03/fra/new12cdb/control02.ctl'
9> set db_unique_name='new12cdb'
10> set audit_file_dest='/u01/app/orcl/oracle/admin/new12cdb/adump'
11> set dispatchers='(PROTOCOL=TCP) (SERVICE=new12cdbXDB)'
12> set memory_target='1024M'
13> set memory_max_target='1024M'
14> set sga_target='0'
15> set pga_aggregate_target='0'
16> set local_listener=''
17> set log_archive_dest_1='LOCATION=/u03/fra'
18> set log_file_name_convert='/u03/fra/DUPDB/onlinelog','/u03/oradata/new12cdb'
19> noopen #not open the database in resetlogs mode
20> db_file_name_convert='/u03/oradata/dupdb','/u03/oradata/new12cdb';
21> }
22>
23>
24>
executing command: SET NEWNAME

Starting Duplicate Db at 20-JUN-14

contents of Memory Script:
{
   restore clone spfile to  '/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb.ora' from
 '/u03/backup_dupdb/backup_db2/cntrl_c-575818374-20140619-00';
   sql clone "alter system set spfile= ''/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb.ora''";
}
executing Memory Script

Starting restore at 20-JUN-14
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK

channel ORA_AUX_DISK_1: restoring spfile from AUTOBACKUP /u03/backup_dupdb/backup_db2/cntrl_c-575818374-20140619-00
channel ORA_AUX_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 20-JUN-14

sql statement: alter system set spfile= ''/u03/app/oracle/product/12.1.0/dbhome_1/dbs/spfilenew12cdb.ora''

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''NEW12CDB'' comment=
 ''duplicate'' scope=spfile";
   sql clone "alter system set  db_name =
 ''new12cdb'' comment=
 '''' scope=spfile";
   sql clone "alter system set  control_files =
 ''/u03/oradata/new12cdb/control01.ctl'', ''/u03/fra/new12cdb/control02.ctl'' comment=
 '''' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''new12cdb'' comment=
 '''' scope=spfile";
   sql clone "alter system set  audit_file_dest =
 ''/u01/app/orcl/oracle/admin/new12cdb/adump'' comment=
 '''' scope=spfile";
   sql clone "alter system set  dispatchers =
 ''(PROTOCOL=TCP) (SERVICE=new12cdbXDB)'' comment=
 '''' scope=spfile";
   sql clone "alter system set  memory_target =
 1024M comment=
 '''' scope=spfile";
   sql clone "alter system set  memory_max_target =
 1024M comment=
 '''' scope=spfile";
   sql clone "alter system set  sga_target =
 0 comment=
 '''' scope=spfile";
   sql clone "alter system set  pga_aggregate_target =
 0 comment=
 '''' scope=spfile";
   sql clone "alter system set  local_listener =
 '''' comment=
 '''' scope=spfile";
   sql clone "alter system set  log_archive_dest_1 =
 ''LOCATION=/u03/fra'' comment=
 '''' scope=spfile";
   sql clone "alter system set  log_file_name_convert =
 ''/u03/fra/DUPDB/onlinelog'', ''/u03/oradata/new12cdb'' comment=
 '''' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''NEW12CDB'' comment= ''duplicate'' scope=spfile

sql statement: alter system set  db_name =  ''new12cdb'' comment= '''' scope=spfile

sql statement: alter system set  control_files =  ''/u03/oradata/new12cdb/control01.ctl'', ''/u03/fra/new12cdb/control02.ctl'' comment= '''' scope=spfile

sql statement: alter system set  db_unique_name =  ''new12cdb'' comment= '''' scope=spfile

sql statement: alter system set  audit_file_dest =  ''/u01/app/orcl/oracle/admin/new12cdb/adump'' comment= '''' scope=spfile

sql statement: alter system set  dispatchers =  ''(PROTOCOL=TCP) (SERVICE=new12cdbXDB)'' comment= '''' scope=spfile

sql statement: alter system set  memory_target =  1024M comment= '''' scope=spfile

sql statement: alter system set  memory_max_target =  1024M comment= '''' scope=spfile

sql statement: alter system set  sga_target =  0 comment= '''' scope=spfile

sql statement: alter system set  pga_aggregate_target =  0 comment= '''' scope=spfile

sql statement: alter system set  local_listener =  '''' comment= '''' scope=spfile

sql statement: alter system set  log_archive_dest_1 =  ''LOCATION=/u03/fra'' comment= '''' scope=spfile

sql statement: alter system set  log_file_name_convert =  ''/u03/fra/DUPDB/onlinelog'', ''/u03/oradata/new12cdb'' comment= '''' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2296576 bytes
Variable Size                671089920 bytes
Database Buffers             390070272 bytes
Redo Buffers                   5480448 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''DUPDB'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''NEW12CDB'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile from  '/u03/backup_dupdb/backup_db2/cntrl_c-575818374-20140619-00';
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''DUPDB'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''NEW12CDB'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2296576 bytes
Variable Size                671089920 bytes
Database Buffers             390070272 bytes
Redo Buffers                   5480448 bytes

Starting restore at 20-JUN-14
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=19 device type=DISK

channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u03/oradata/new12cdb/control01.ctl
output file name=/u03/fra/new12cdb/control02.ctl
Finished restore at 20-JUN-14

database mounted
released channel: ORA_AUX_DISK_1
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=19 device type=DISK

contents of Memory Script:
{
   set until scn  1286566;
   set newname for datafile  1 to
 "/u03/oradata/new12cdb/system01.dbf";
   set newname for datafile  2 to
 "/u03/oradata/new12cdb/sysaux01.dbf";
   set newname for datafile  3 to
 "/u03/oradata/new12cdb/undotbs01.dbf";
   set newname for datafile  4 to
 "/u03/oradata/new12cdb/users01.dbf";
   set newname for datafile  5 to
 "/u03/oradata/new12cdb/example01.dbf";
   restore
   clone database
   ;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 20-JUN-14
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u03/oradata/new12cdb/system01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u03/oradata/new12cdb/sysaux01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u03/oradata/new12cdb/undotbs01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /u03/oradata/new12cdb/users01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /u03/oradata/new12cdb/example01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u03/backup_dupdb/backup_db2/02pb86e9_1_1
channel ORA_AUX_DISK_1: piece handle=/u03/backup_dupdb/backup_db2/02pb86e9_1_1 tag=TAG20140619T153121
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:02:05
Finished restore at 20-JUN-14

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=6 STAMP=850736385 file name=/u03/oradata/new12cdb/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=7 STAMP=850736385 file name=/u03/oradata/new12cdb/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=8 STAMP=850736385 file name=/u03/oradata/new12cdb/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=9 STAMP=850736385 file name=/u03/oradata/new12cdb/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=10 STAMP=850736385 file name=/u03/oradata/new12cdb/example01.dbf

contents of Memory Script:
{
   set until scn  1286566;
   recover
   clone database
    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 20-JUN-14
using channel ORA_AUX_DISK_1

starting media recovery

channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=8
channel ORA_AUX_DISK_1: reading from backup piece /u03/backup_dupdb/backup_db2/03pb86i8_1_1
channel ORA_AUX_DISK_1: piece handle=/u03/backup_dupdb/backup_db2/03pb86i8_1_1 tag=TAG20140619T153327
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/u03/fra/1_8_850604301.dbf thread=1 sequence=8
channel clone_default: deleting archived log(s)
archived log file name=/u03/fra/1_8_850604301.dbf RECID=1 STAMP=850736387
media recovery complete, elapsed time: 00:00:00
Finished recover at 20-JUN-14
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2296576 bytes
Variable Size                671089920 bytes
Database Buffers             390070272 bytes
Redo Buffers                   5480448 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''NEW12CDB'' comment=
 ''Reset to original value by RMAN'' scope=spfile";
   sql clone "alter system reset  db_unique_name scope=spfile";
}
executing Memory Script

sql statement: alter system set  db_name =  ''NEW12CDB'' comment= ''Reset to original value by RMAN'' scope=spfile

sql statement: alter system reset  db_unique_name scope=spfile
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2296576 bytes
Variable Size                671089920 bytes
Database Buffers             390070272 bytes
Redo Buffers                   5480448 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "NEW12CDB" RESETLOGS ARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES      100
  MAXINSTANCES     8
  MAXLOGHISTORY      292
 LOGFILE
  GROUP   1 ( '/u03/oradata/new12cdb/o1_mf_1_9t3m1q2g_.log' ) SIZE 50 M  REUSE,
  GROUP   2 ( '/u03/oradata/new12cdb/o1_mf_2_9t3m1tcw_.log' ) SIZE 50 M  REUSE,
  GROUP   3 ( '/u03/oradata/new12cdb/o1_mf_3_9t3m1y6l_.log' ) SIZE 50 M  REUSE
 DATAFILE
  '/u03/oradata/new12cdb/system01.dbf'
 CHARACTER SET AL32UTF8


contents of Memory Script:
{
   set newname for tempfile  1 to
 "/u03/oradata/new12cdb/temp01.dbf";
   switch clone tempfile all;
   catalog clone datafilecopy  "/u03/oradata/new12cdb/sysaux01.dbf",
 "/u03/oradata/new12cdb/undotbs01.dbf",
 "/u03/oradata/new12cdb/users01.dbf",
 "/u03/oradata/new12cdb/example01.dbf";
   switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u03/oradata/new12cdb/temp01.dbf in control file

cataloged datafile copy
datafile copy file name=/u03/oradata/new12cdb/sysaux01.dbf RECID=1 STAMP=850736407
cataloged datafile copy
datafile copy file name=/u03/oradata/new12cdb/undotbs01.dbf RECID=2 STAMP=850736407
cataloged datafile copy
datafile copy file name=/u03/oradata/new12cdb/users01.dbf RECID=3 STAMP=850736407
cataloged datafile copy
datafile copy file name=/u03/oradata/new12cdb/example01.dbf RECID=4 STAMP=850736407

datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=850736407 file name=/u03/oradata/new12cdb/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=850736407 file name=/u03/oradata/new12cdb/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=850736407 file name=/u03/oradata/new12cdb/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=850736407 file name=/u03/oradata/new12cdb/example01.dbf
Leaving database unopened, as requested
Finished Duplicate Db at 20-JUN-14

Recovery Manager complete.

9.Open the database in reselogs upgrade mode
[oracle@ol6-112-rac1 rman]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Fri Jun 20 11:41:52 2014

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> select name,open_Mode from v$database;

NAME      OPEN_MODE
--------- --------------------
NEW12CDB  MOUNTED

SQL> alter database open resetlogs upgrade;

Database altered.

SQL> select instance_name,status,logins from v$instance;

INSTANCE_NAME    STATUS       LOGINS
---------------- ------------ ----------
new12cdb         OPEN MIGRATE RESTRICTED


10.Upgrade the database using perl script with parallelism 5
[oracle@ol6-112-rac1 trace]$ cd $ORACLE_HOME/rdbms/admin
[oracle@ol6-112-rac1 admin]$ echo $ORACLE_HOME
/u03/app/oracle/product/12.1.0/dbhome_1
[oracle@ol6-112-rac1 admin]$ nohup $ORACLE_HOME/perl/bin/perl catctl.pl -n 4 catupgrd.sql &
Analyzing file catupgrd.sql
Serial   Phase #: 0 Files: 1      Time: 292s
Serial   Phase #: 1 Files: 3      Time: 76s
Restart  Phase #: 2 Files: 1      Time: 2s
Parallel Phase #: 3 Files: 18     Time: 29s
Restart  Phase #: 4 Files: 1      Time: 0s
Serial   Phase #: 5 Files: 5      Time: 28s
Serial   Phase #: 6 Files: 1      Time: 17s
Serial   Phase #: 7 Files: 3      Time: 14s
Restart  Phase #: 8 Files: 1      Time: 0s
Parallel Phase #: 9 Files: 60     Time: 95s
Restart  Phase #:10 Files: 1      Time: 0s
Serial   Phase #:11 Files: 1      Time: 27s
Restart  Phase #:12 Files: 1      Time: 0s
Parallel Phase #:13 Files: 199    Time: 108s
Restart  Phase #:14 Files: 1      Time: 0s
Serial   Phase #:15 Files: 3      Time: 2s
Restart  Phase #:16 Files: 1      Time: 0s
Parallel Phase #:17 Files: 33     Time: 67s
Restart  Phase #:18 Files: 1      Time: 0s
Serial   Phase #:19 Files: 3      Time: 14s
Restart  Phase #:20 Files: 1      Time: 0s
Parallel Phase #:21 Files: 23     Time: 151s
Restart  Phase #:22 Files: 1      Time: 1s
Parallel Phase #:23 Files: 11     Time: 98s
Restart  Phase #:24 Files: 1      Time: 0s
Serial   Phase #:25 Files: 1      Time: 60s
Restart  Phase #:26 Files: 1      Time: 0s
Parallel Phase #:27 Files: 0      Time: 0s
Serial   Phase #:28 Files: 1      Time: 0s
Parallel Phase #:29 Files: 130    Time: 16s
Serial   Phase #:30 Files: 1      Time: 0s
Restart  Phase #:31 Files: 1      Time: 1s
Serial   Phase #:32 Files: 1      Time: 0s
Parallel Phase #:33 Files: 122    Time: 21s
Serial   Phase #:34 Files: 1      Time: 0s
Restart  Phase #:35 Files: 1      Time: 0s
Serial   Phase #:36 Files: 4      Time: 85s
Restart  Phase #:37 Files: 1      Time: 1s
Parallel Phase #:38 Files: 13     Time: 113s
Restart  Phase #:39 Files: 1      Time: 0s
Parallel Phase #:40 Files: 10     Time: 16s
Restart  Phase #:41 Files: 1      Time: 0s
Serial   Phase #:42 Files: 1      Time: 13s
Restart  Phase #:43 Files: 1      Time: 0s
Serial   Phase #:44 Files: 1      Time: 6s
Serial   Phase #:45 Files: 1      Time: 1s
Restart  Phase #:46 Files: 1      Time: 0s
Serial   Phase #:47 Files: 2      Time: 567s
Restart  Phase #:48 Files: 1      Time: 2s
Serial   Phase #:49 Files: 2      Time: 594s
Restart  Phase #:50 Files: 1      Time: 4s
Serial   Phase #:51 Files: 2      Time: 2784s
Restart  Phase #:52 Files: 1      Time: 6s
Serial   Phase #:53 Files: 1      Time: 5s
Serial   Phase #:54 Files: 1      Time: 332s
Serial   Phase #:55 Files: 1      Time: 190s
Serial   Phase #:56 Files: 1      Time: 98s
Grand Total Time: 5936s


11..Run the post upgrade fixup script created in the preupgrade step against the target database.
[oracle@ol6-112-rac1 tmp]
[oracle@ol6-112-rac2 tmp]$ scp /u01/app/orcl/oracle/cfgtoollogs/DUPDB/preupgrade/postupgrade_fixups.sql
 oracle@ol6-112-rac1:/tmp
postupgrade_fixups.sql                                                                              100% 2382     2.3KB/s   00:00
$ clear
[oracle@ol6-112-rac1 tmp]$ ls post*
postupgrade_fixups.sql
[oracle@ol6-112-rac1 tmp]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Fri Jun 20 09:22:44 2014

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> @ postupgrade_fixups.sql
Post Upgrade Fixup Script Generated on 2014-06-19 14:58:18  Version: 12.1.0.1 Build: 006
Beginning Post-Upgrade Fixups...

PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


**********************************************************************
Check Tag:     AWR_DBIDS_PRESENT
Check Summary: Verify if AWR contains inactive DBIDs
Fix Summary:   The inactive DBIDs in AWR may need additional updating after upgrading.
**********************************************************************
Fixup Returned Information:
WARNING: --> Inactive DBIDs found in AWR

     AWR contains inactive DBIDs which may need additional updating after
     upgrading.
**********************************************************************


PL/SQL procedure successfully completed.


**********************************************************************
Check Tag:     OLD_TIME_ZONES_EXIST
Check Summary: Check for use of older timezone data file
Fix Summary:   Update the timezone using the DBMS_DST package after upgrade is complete.
**********************************************************************
Fixup Returned Information:
INFORMATION: --> Older Timezone in use

     Database is using a time zone file older than version 18.
     After the upgrade, it is recommended that DBMS_DST package
     be used to upgrade the 12.1.0.1.0 database time zone version
     to the latest version which comes with the new release.
     Please refer to My Oracle Support note number 977512.1 for details.
**********************************************************************


PL/SQL procedure successfully completed.

**********************************************************************
                     [Post-Upgrade Recommendations]
**********************************************************************


PL/SQL procedure successfully completed.

                        *****************************************
                        ******** Fixed Object Statistics ********
                        *****************************************

Please create stats on fixed objects two weeks
after the upgrade using the command:
   EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;

^^^ MANUAL ACTION SUGGESTED ^^^


PL/SQL procedure successfully completed.


           **************************************************
                ************* Fixup Summary ************

 2 fixup routines generated INFORMATIONAL messages that should be reviewed.


PL/SQL procedure successfully completed.

*************** Post Upgrade Fixup Script Complete ********************

PL/SQL procedure successfully completed.


12.Upgrade the timezone version to 18;
conn / as sysdba
shutdown immediate;
startup upgrade;
set serveroutput on
 
– check if previous prepare window is ended
 
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE ‘DST_%’
ORDER BY PROPERTY_NAME;
 
– output should be
– PROPERTY_NAME VALUE
– —————————- ——————————
– DST_PRIMARY_TT_VERSION 
– DST_SECONDARY_TT_VERSION 0
– DST_UPGRADE_STATE NONE
 
purge dba_recyclebin;
 
TRUNCATE TABLE SYS.DST$TRIGGER_TABLE;
TRUNCATE TABLE sys.dst$affected_tables;
TRUNCATE TABLE sys.dst$error_table;
 
alter session set “_with_subquery”=materialize;
alter session set “_simple_view_merging”=TRUE;
 
 
EXEC DBMS_DST.BEGIN_UPGRADE(18);
- check if this select
 
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE ‘DST_%’
ORDER BY PROPERTY_NAME;
 
– gives this output:
– PROPERTY_NAME VALUE
– ————————— ——————————
– DST_PRIMARY_TT_VERSION 
– DST_SECONDARY_TT_VERSION 
– DST_UPGRADE_STATE UPGRADE
 
shutdown immediate
startup
 
alter session set “_with_subquery”=materialize;
alter session set “_simple_view_merging”=TRUE;
 
set serveroutput on
VAR numfail number
BEGIN
DBMS_DST.UPGRADE_DATABASE(:numfail,
parallel => TRUE,
log_errors => TRUE,
log_errors_table => ‘SYS.DST$ERROR_TABLE’,
log_triggers_table => ‘SYS.DST$TRIGGER_TABLE’,
error_on_overlap_time => FALSE,
error_on_nonexisting_time => FALSE);
DBMS_OUTPUT.PUT_LINE(’Failures:’|| :numfail);
END;
/
 
– ouput of this will be a list of tables like:
 
– Table list: SYSMAN.AQ$_MGMT_NOTIFY_QTABLE_S
– Number of failures: 0
 
– if there where no failures then end the upgrade.
 
VAR fail number
BEGIN
DBMS_DST.END_UPGRADE(:fail);
DBMS_OUTPUT.PUT_LINE(’Failures:’|| :fail);
END;
/
 
 
– output that will be seen:
– An upgrade window has been successfully ended.
– Failures:0
 
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE ‘DST_%’
ORDER BY PROPERTY_NAME;
 
– needed output:
– PROPERTY_NAME VALUE
– —————————- ——————————
– DST_PRIMARY_TT_VERSION 
– DST_SECONDARY_TT_VERSION 0
– DST_UPGRADE_STATE NONE
 
 
SELECT * FROM v$timezone_file;
 
FILENAME                VERSION
——————– ———-
timezlrg_14.dat              18
select TZ_VERSION from registry$database;
 
update registry$database set TZ_VERSION = (select version FROM v$timezone_file);
commit;

SQL> select * from v$timezone_file;

FILENAME                VERSION     CON_ID
-------------------- ---------- ----------
timezlrg_18.dat              18          0