Steps to create active data guard in 11g and up-gradation to 12c using manual method - III



8. Initiate 12c upgrade


i.   Copy current pfile to 12c $ORACLE_HOME/dbs on both nodes
ii. Open db in upgrade in new 12c home


[oracle@testlabdb005a ~]$ . ./.bash_profile_12c
[oracle@testlabdb005a ~]$ sqlplus "/ as sysdba"
SQL*Plus: Release 12.1.0.2.0 Production on Thu JAN 11 08:53:36 2017
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
idle> startup upgrade
ORACLE instance started.
Total System Global Area 4.8318E+10 bytes
Fixed Size 4510496 bytes
Variable Size 6174018784 bytes
Database Buffers 4.2010E+10 bytes
Redo Buffers 129703936 bytes
Database mounted.
Database opened.


iii. Run upgrade script

cd $ORACLE_HOME/rdbms/admin


nohup $ORACLE_HOME/perl/bin/perl catctl.pl -n 6 -l $ORACLE_HOME/diagnostics catupgrd.sql & -- leads to high undo / resource contention


Monitor :

/rdbms/app/oracle/12.1.0.2/db/diagnostics/catupgrd0.log


nohup $ORACLE_HOME/perl/bin/perl catctl.pl -n 2 -l $ORACLE_HOME/diagnostics catupgrd.sql &

--validate components


Set line 900 pages 900
col STATUS for a12
col COMP_NAME for a50
select COMP_ID,COMP_NAME,VERSION,STATUS,PROCEDURE,STARTUP from dba_registry;


$sqlplus "/as sysdba"
SQL> spool fix_cat_logfile.txt
SQL> startup upgrade
SQL > @?/rdbms/admin/utlrp.sql
SQL > @?/rdbms/admin/catalog.sql -- Incase components are still invalid post utlrp
SQL > @?/rdbms/admin/catproc.sql

Post check:

SQL> startup
SQL> @?/rdbms/admin/utlu121s.sql

If all components valid then proceed


SQL>@?/rdbms/admin/catuppst.sql
SQL>@?/rdbms/admin/utlrp.sql

iv. Postupgrade scripts


SQL>@/golden/app/oracle/11.2.0.3.0/db/cfgtoollogs/TESTDBPRD/preupgrad/postupgrade_fixups.sql



9. Time zone upgrade


DBMS_DST_scriptsV1.9 setup script to be used


SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;

PROPERTY_NAME VALUE
--------------- ---------------------------------
DST_PRIMARY_TT_VERSION 14
DST_SECONDARY_TT_VERSION 4
DST_UPGRADE_STATE DATAPUMP(4)

SQL> ALTER SESSION SET EVENTS '30090 TRACE NAME CONTEXT FOREVER, LEVEL 32';


SQL> exec dbms_dst.unload_secondary;
Session altered.


[oracle@testlabdb005a DBMS_DST_scriptsV1.9]$ pwd
/oradump/software/12c/DBMS_DST_scriptsV1.9

[oracle@testlabdb005a DBMS_DST_scriptsV1.9]$ ls -lrt
total 68
-rw-r--r--. 1 oracle oinstall 31010 Aug 22 2014 upg_tzv_check.sql
-rw-r--r--. 1 oracle oinstall 19502 Aug 22 2014 upg_tzv_apply.sql
-rw-r--r--. 1 oracle oinstall 6294 Jan 8 2015 countstarTSTZ.sql
-rw-r--r--. 1 oracle oinstall 6909 Jan 8 2015 countstatsTSTZ.sql


SQL> @upg_tzv_check.sql
INFO: Starting with RDBMS DST update preparation.
INFO: NO actual RDBMS DST update will be done by this script.
INFO: If an ERROR occurs the script will EXIT sqlplus.
INFO: Doing checks for known issues ...
INFO: Database version is 12.1.0.2 .
INFO: Database RDBMS DST version is DSTv14 .
INFO: No known issues detected.
INFO: Now detecting new RDBMS DST version.
A prepare window has been successfully started.
INFO: Newest RDBMS DST version detected is DSTv18 .
INFO: Next step is checking all TSTZ data.
INFO: It might take a while before any further output is seen ...
A prepare window has been successfully ended.
INFO: A newer RDBMS DST version than the one currently used is found.
INFO: Note that NO DST update was yet done.
INFO: Now run upg_tzv_apply.sql to do the actual RDBMS DST update.
INFO: Note that the upg_tzv_apply.sql script will
INFO: restart the database 2 times WITHOUT any confirmation or prompt.
SQL>


SQL>SHUT IMMEDIATE;

SQL>STARTUP UPGRADE

SQL> @upg_tzv_apply.sql

INFO: If an ERROR occurs the script will EXIT sqlplus.
INFO: The database RDBMS DST version will be updated to DSTv18 .
WARNING: This script will restart the database 2 times
WARNING: WITHOUT asking ANY confirmation.
WARNING: Hit control-c NOW if this is not intended.
INFO: Restarting the database in UPGRADE mode to start the DST upgrade.
Database closed.
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.
Total System Global Area 4.8318E+10 bytes
Fixed Size 4510496 bytes
Variable Size 1.0737E+10 bytes
Database Buffers 3.7447E+10 bytes
Redo Buffers 129703936 bytes
Database mounted.
Database opened.
INFO: Starting the RDBMS DST upgrade.
INFO: Upgrading all SYS owned TSTZ data.
INFO: It might take time before any further output is seen ...
An upgrade window has been successfully started.
INFO: Restarting the database in NORMAL mode to upgrade non-SYS TSTZ data.
Database closed.
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.
Total System Global Area 4.8318E+10 bytes
Fixed Size 4510496 bytes
Variable Size 1.0737E+10 bytes
Database Buffers 3.7447E+10 bytes
Redo Buffers 129703936 bytes
Database mounted.
Database opened.
INFO: Upgrading all non-SYS TSTZ data.
INFO: It might take time before any further output is seen ...
INFO: Do NOT start any application yet that uses TSTZ data!
INFO: Next is a list of all upgraded tables:
Table list: "SYSMAN"."MGMT_PROV_OPERATION"

Number of failures: 0

Table list: "SYSMAN"."MGMT_PROV_BOOTSERVER"
Number of failures: 0
Table list: "SYSMAN"."MGMT_PROV_DEFAULT_IMAGE"
Number of failures: 0
Table list: "SYSMAN"."MGMT_PROV_RPM_REP"
Number of failures: 0
Table list: "SYSMAN"."MGMT_PROV_STAGING_DIRS"
Number of failures: 0
Table list: "SYSMAN"."MGMT_PROV_NET_CONFIG"
Number of failures: 0
Table list: "SYSMAN"."MGMT_PROV_IP_RANGE"
Number of failures: 0
Table list: "SYSMAN"."MGMT_PROV_CLUSTER_NODES"
Number of failures: 0
Table list: "SYSMAN"."MGMT_PROV_SUITE_INST_MEMBERS"
Number of failures: 0
Table list: "SYSMAN"."MGMT_CONFIG_ACTIVITIES"
Number of failures: 0
Table list: "SYSMAN"."MGMT_PROV_ASSIGNMENT"
Number of failures: 0
Table list: "SYSMAN"."AQ$_MGMT_NOTIFY_QTABLE_S"
Number of failures: 0
Table list: "SYSMAN"."AQ$_MGMT_NOTIFY_QTABLE_L"
Number of failures: 0
Table list: "SYSMAN"."AQ$_MGMT_LOADER_QTABLE_S"
Number of failures: 0
Table list: "SYSMAN"."AQ$_MGMT_LOADER_QTABLE_L"
Number of failures: 0
Table list: "ASC_ACE_TX"."NCCM_ACEDATAMIGRATIONLOG"
Number of failures: 0
Table list: "SQLTXPLAIN"."SQLT$_SQL_STATEMENT"
Number of failures: 0
Table list: "SQLTXPLAIN"."SQLT$_DBA_OPTSTAT_OPERATIONS"
Number of failures: 0
Table list: "SQLTXPLAIN"."SQLT$_DBA_SCHEDULER_JOBS"
Number of failures: 0
Table list: "SQLTXPLAIN"."SQLT$_OPTSTAT_USER_PREFS$"
Number of failures: 0
Table list: "SQLTXPLAIN"."SQLT$_DBA_TAB_STATS_VERSIONS"
Number of failures: 0
Table list: "SQLTXPLAIN"."SQLT$_DBA_IND_STATS_VERSIONS"
Number of failures: 0
Table list: "SQLTXPLAIN"."SQLT$_DBA_COL_STATS_VERSIONS"
Number of failures: 0
Table list: "SQLTXPLAIN"."SQLT$_DBA_HISTGRM_STATS_VERSN"
Number of failures: 0
Table list: "SQLTXPLAIN"."SQLT$_WRI$_OPTSTAT_AUX_HISTORY"
Number of failures: 0
Table list: "SQLTXPLAIN"."SQLT$_DBA_AUTOTASK_CLIENT_HST"
Number of failures: 0
Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S"
Number of failures: 0
Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L"
Number of failures: 0
INFO: Total failures during update of TSTZ data: 0 .
An upgrade window has been successfully ended.
INFO: Your new Server RDBMS DST version is DSTv18 .
INFO: The RDBMS DST update is successfully finished.
INFO: Make sure to exit this sqlplus session.
INFO: Do not use it for timezone related selects.

SQL> select * from v$timezone_file;

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


No comments:

Post a Comment