Cross platform Oracle Database Migration and upgradation from 12c to 19c on New Build Server
This note describes the procedure used to perform a minimal downtime platform migration from existing HP-UX to Linux-Red Hat Enterprise Linux 8 (New Build Server) as well as a database upgrade from Oracle 12c to Oracle 19c .
Database (12.1.0.2)
Migration(Cross Platform) from
HPUX to RHEL -Pre requisite
Pre-Requisite Phase-1
Red Hat Enterprise Linux 8 (Red Hat Enterprise Linux 8: 4.18.0-80.el8.x86_64 or later)
SSH Requirement (OpenSSH is installed on servers)
Check Kernel parameters using cat /etc/sysctl.conf
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500 #/sbin/sysctl -p (to apply above parameter)
vi /etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
install Linux packages which are required for ORACLE installation
bc,binutils,elfutils-libelf,elfutils-libelf-devel
,fontconfig-devel,glibc,glibc-devel,ksh,libaio
,libaio-devel,libXrender,libX11,libXau,libXi,libXtst,libgcc,libnsl
,librdmacm,libstdc++,libstdc++-devel,libxcb,libibverbs,make,policycoreutils
,policycoreutils-python-utils,smartmontools,sysstat
User and group
groupadd
-g 1001 oinstall
groupadd -g 1002 dba
groupadd -g 1003 oper
useradd -u 1001 -g oinstall -G dba,oper oracle
set Oracle user password=passwd oracle
Set SELinux = permissive and Disable firewall
vi /etc/selinux/config
SELINUX=permissive
# systemctl disable firewalld
Mount point for Oracle Binaries 12.1.0.2 and 19c /oracle02 100G
Mount point for Datafile /oradata 3.3 TB, /femarch_12c 200G , /femredo_12c 30G , /backup 800G
Create Oracle Home Directory,Datafile and grant Permission
mkdir -p /u01/app/oracle/product/12.1.0/dbhome_1
chown -R oracle:oinstall /oracle02
chmod -R 775 /oracle02
chown -R oracle:oinstall /oradata
chmod -R 775 /oradata
Set Profile for Oracle setup
download Oracle Binaries for 12.1.0.2 (Linux 64 bit) from edelivery.oracle.com
Copy Binary at RHEL mount point /u01/database
Install Oracle Binaries using Oracle Installer
Apply Latest availabe patches Patch 34057742 jul-22
Migration Activity Phase-1 ( offline Activity In Downtime Required)
1) Shutdown Database ,startup database in read only mode
2) RMAN backup (full) along with controlfile
3) Transfer RMAN backup from source to target database (NFS Mount point Required at both end)
4) Restore controfile file
5) Catalog RMAN Backup
6) Restore database
7) Cross platform Conversion rollback segment(SYSTEM and UNDO datafiles)
8) startup mount
9) alter database open reset logs;
10) Post migration Validate database objects and components
11) Listener start for application
12) Handover database to Application team for testing
Database Upgrade from 12.1.0.2 to 19c Phase-2
Pre-Requisite Phase-2
1) download Oracle Binaries for 19c (Linux 64 bit) from edelivery.oracle.com
2) Create new home for 19c
3) Oracle 19c Binary copy at New Oracle Home
4) cp tns and listner and spfile from old oracle Home to New 19c home
5) Install 19c Binaries
6)Apply Latest patch on 19c (19.16.0.0.0) N-1
Steps to be follow as per Outcome from pre-upgrade log
purge recycle bin "purge recyclebin;
purge dba_recylebin;"
Move system.aud$ table to other tablespace or truncate system.aud$
SELECT count(*) FROM system.aud$; truncate table system.aud$;
JOB Queue Cleanup alter system set JOB_QUEUE_PROCESSES=0 scope=both;
SELECT * FROM sys.dba_2pc_pending; "delete from sys.pending_trans$ where local_tran_id ='';
delete from sys.pending_sessions$ where local_tran_id ='';
delete from sys.pending_sub_sessions$ where local_tran_id ='';
commit;"
Remove OLAP Catalog sqlplus / as sysdba @$ORACLE_HOME/olap/admin/catnoamd.sql
uninstall Label Security sqlplus / as sysdba @$ORACLE_HOME/rdbms/admin/catnools.sql
Recompile Invalid Object sta ?/rdbms/admin/utlrp.sql
Execute Gather State EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;
Run Preupgrade fixup sql /oracle/preupgrade/preupgrade_fixups.sql
Check Object Status select count(*),status from dba_objects group by status;
shutdown 12c database shut immediate
Upgrade Activities
set Oracle NEW HOME export ORACLE_HOME=/oracle/app/oracle/product/19.0.0/dbhome_1
set PATH export PATH=$ORACLE_HOME/bin:$PATH
Create Direcory for upgrade mkdir -p /oracle19c/WHILEUPGRADE1/
database starup upgrade from 19c Binary startup upgrade
check status of database select instance_name,status from v$instance;
exit from sqlprompt sql>exit
Roll Back Plan
Downgrading database to previous version using Flashback database (FALLBACK PLAN)
Set New Home environment; /oracle19c_bc/app1/oracle/product/19.0.0/dbhome_1;
shutdown immediate; startup mount
restore guaranteed point; flashback database to restore point before_upgrd19c; shutdown immedaite
Set OLD home environment; /oracle/app/oracle/product/12.2.0/dbhome_1; startup mount
Open database using reset log; alter database open resetlogs;
Validate DBA Registery View; select comp_name, version, status from dba_registry;
Start Listener Services
Database Handover Application Team
Rollback Plan
Rollback Plan
No comments:
Post a Comment