Environment Details:
Database: TEST
Database Role: Physical Standby(DR)
DB Version: 12.1.0.2 EE 64 Bit
DB Version: 12.1.0.2 EE 64 Bit
Operating System: Redhat Enterprise Linux 7.9 64 Bit
Version to be upgraded: 19.0.0.0 with latest RU/RUR patches
12c Home: /u01/app/oracle/product/12.1.0.2/dbhome_1
19c Home: /u01/app/oracle/product/19.3.0.0/dbhome_1
- Is current Operating System certified with new DB version i.e. Oracle 19.0.0.0 ?
- Am I downloading Oracle DB software of correct version i.e. Oracle 19c ?
- Is my database certified on current Operating System ?
- Is my Operating System 32-Bit or 64-Bit? Are Database and Operating System from same architecture ?
- Is Operating System Kernel Version compatible with Oracle Database version to be installed ?
$su – oracle
$lsnrctl stop LISTENER_NAME
$sqlplus / as sysdba
SQL> shut immediate;
Create new directory structure for 19c binaries. Ensure Minimum 100 GB free space is available in /u01 mountpoint at least for installation and future use for patches.
$mkdir -p /u01/app/oracle/product/19.3.0.0/dbhome_1
$chown -R oracle:oinstall /u01/app/oracle/product/19.3.0.0/dbhome_1
$chmod -R 755 /u01/app/oracle/product/19.3.0.0/dbhome_1
$ls -ld /u01/app/oracle/product/19.3.0.0/dbhome_1
Source 19c environment variables and start 19c software binary installation:
Now 19c software is gold image copy setup. You have to directly copy setup file to ORACLE_HOME location. If you will unzip the setup then it will unzip all binaries in that location only.
Here, you have to install software with applying latest patches.
$cd /u01/app/oracle/product/19.3.0.0/dbhome_1/
$unzip setup_file.zip =====> Refer actual setup file name.
$ls -ltr
$./runInstaller -applyRU PATCH_LOCATION
i.e.
$cd /u01/app/oracle/product/19.3.0.0/dbhome_1/
./runInstaller -applyRU /bkp/patch/33192793
-applyRU : This will apply the patches during installation phase before initializing GUI screen and will start GUI screen once patches are applied.
Step 2: Copy below parameter files from OLD Home to NEW Home.
$cp -pr /u01/app/oracle/product/12.1.0.2/dbhome_1/dbs/initORACLE_SID.ora /u01/app/oracle/product/19.3.0.0/dbhome_1/dbs/initORACLE_SID.ora
$cp -pr /u01/app/oracle/product/12.1.0.2/dbhome_1/dbs/spfileORACLE_SID.ora /u01/app/oracle/product/19.3.0.0/dbhome_1/dbs/spfileORACLE_SID.ora
$cp -pr /u01/app/oracle/product/12.1.0.2/dbhome_1/dbs/orapwORACLE_SID /u01/app/oracle/product/19.3.0.0/dbhome_1/dbs/orapwORACLE_SID
$cp -pr /u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/tnsnames.ora /u01/app/oracle/product/19.3.0.0/dbhome_1/network/admin/tnsnames.ora
$cp -pr /u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora /u01/app/oracle/product/19.3.0.0/dbhome_1/network/admin/listener.ora
$cp -pr /u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/sqlnet.ora /u01/app/oracle/product/19.3.0.0/dbhome_1/network/admin/sqlnet.ora
$cp -pr crontab -l >> /backup/upgrade_19c/crontab_backup_oracle.txt =====>By oracle user
$cp -pr crontab -l >> /backup/upgrade_19c/crontab_backup_root.txt =====>By root user
Copy wallet_files from 12_HOME to 19c_HOME
Step 3: Source the 19c environment variables and start the DB.
$sqlplus / as sysdba
SQL> startup mount;
SQL> select name,open_mode,database_role,controlfile_type from v$database;
SQL> alter database recover managed standby
database disconnect from session;
Step 4: Update the listener.ora file in below directory and start the listener from 19c HOME.
$cd /u01/app/oracle/product/19.3.0.0/dbhome_1/network/admin
$vi listener.ora
$lsnrctl start LISTENER_NAME
Step 5: Enable Standby destination from Primary DB and verify archive log shipping from Primary to Standby DBs.
On Primary:
SQL> set lines 300 pages 3000
SQL> alter system set log_archive_dest_state_2=enable;
SQL> alter system switch logfile;
SQL> alter system switch logfile;
SQL> select
name,db_unique_name,database_role,log_mode,controlfile_type from v$database;
SQL> select max(sequence#) Primary from v$archived_log;
On Standby:
SQL> set lines 300 pages 3000
SQL> select
name,db_unique_name,database_role,log_mode,controlfile_type from v$database;
SQL> select max(sequence#) Standby from v$archived_log
where applied='YES' and dest_id=2;
Check alert log file for any ORA- error messages if any.
You have successfully upgraded DR(Standby) database from Oracle 12c to Oracle 19c.
Thanks for reading ! Please comment if you like this post !
Very usefull
ReplyDeleteVery Useful and descriptive, Keep up ��
ReplyDeleteGood one Rupesh
ReplyDeleteRupesh Sir, Thanks for posting such a wonderful and helpful blogs.
ReplyDelete