In this article, we can upgrade the 11g database to 12c with the help of DataGaurd
|Primary DB Name||Standby DB Name||Database Version||Upgrade Version|
Step 1: Install 126.96.36.199 binaries on both Primary and Standby Server.
Step 2: Shut down Primary Database.
Step 3: Shut down Standby Database.
Step 4: At standby database server copy init file and password file to new home
[oracle@localhost dbs]$ cp /u01/oracle/product/11.2.0/db_1/dbs/initupgdb.ora /u01/oracle/product/12.1.0/db_1/dbs/ [oracle@localhost dbs]$ cp /u01/oracle/product/11.2.0/db_1/dbs/orapwupgdb /u01/oracle/product/12.1.0/db_1/dbs/
Step 5: Copy listener.ora and tnsnames.ora file to new Oracle home
[oracle@localhost admin]$ cp /u01/oracle/product/11.2.0/db_1/dbs/listener.ora /u01/oracle/product/12.1.0/db_1/network/admin/ [oracle@localhost admin]$ cp /u01/oracle/product/11.2.0/db_1/dbs/tnsnames.ora /u01/oracle/product/12.1.0/db_1/network/admin/
Step 6: Change an oracle_home value in a listener.ora file
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (ORACLE_HOME = /u01/oracle/product/12.1.0/db_1) (SID_NAME =upgdb) ) )
Step 7: Start database in mount stage with new home exported
[oracle@localhost admin]$ export ORACLE_HOME=/u01/oracle/product/12.1.0/db_1 [oracle@localhost admin]$ export PATH=$ORACLE_HOME/bin:$PATH [oracle@localhost admin]$ export ORACLE_SID=upgdb [oracle@localhost admin]$ sqlplus / as sysdba SQL*Plus: Release 188.8.131.52.0 Production on Wed Jul 4 22:04:28 2018 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to an idle instance. SQL> startup mount ORACLE instance started. Total System Global Area 394264576 bytes Fixed Size 2924832 bytes Variable Size 192941792 bytes Database Buffers 192937984 bytes Redo Buffers 5459968 bytes Database mounted.
Remember database is not still upgraded so trying open database will result in the following error :
SQL> alter database open; alter database open * ERROR at line 1: ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00704: bootstrap process failure ORA-00604: error occurred at recursive SQL level 2 ORA-00904: "I"."UNUSABLEBEGINNING#": invalid identifier Process ID: 3513 Session ID: 1 Serial number: 56814
Step 8: Upgrade Primary database with DBUA
[oracle@localhost ~]$ export ORACLE_HOME=/u01/oracle/product/12.1.0/db_1 [oracle@localhost ~]$ export PATH=$ORACLE_HOME/bin:$PATH [oracle@localhost ~]$ dbua
Select a database and click next.
We can check more details by selecting a particular prerequisite and clicking on more details.
It shows we can remove em repository prior to up gradation. Run emremove file to remove em repository.
After successful removal of em repository click next.
select checkbox according to your requirement or keep them default and click on next.
Click on next.
Click on next.
Select listeners, you want to migrate to new Oracle home and click next.
Select backup policy in case of upgrade failure and click on next.
Check database upgrades summary and click on Finish Button.
Check progress of upgrade . . . . .
Once an upgrade is finished you can see upgrade results.
After successful completion of Primary database upgrade. Start recovery on a standby database.
SQL> recover managed standby database disconnect; Media recovery complete.
Standby database will be upgraded through redo apply.
After completion of all redo apply we can open a database in open mode.
Stay tuned for More articles on Oracle DataGuard
Thank you for giving your valuable time to read the above information.
If you want to be updated with all our articles send us the Invitation or Follow us:
Telegram Channel: https://t.me/helporacle
Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/
Joel Perez’s LinkedIn: Joel Perez’s Profile
LinkedIn Group: Oracle Cloud DBAAS
Facebook Page: OracleHelp
Hi, thank you for your article. Note that the error ORA-00904 is not well-explained on MOS.
How (when!) did you start the standby? I think that we need to copy listener/tnsnames and the spfile/pwd file there too, and startup mount after the upgrade of primary succeeded???