This post covers the high level steps on how we can Lift and Shift on prem EBS 12.1.3 with Database 11.2.0.4 to Oracle Cloud Infrastructure using Hybrid DR methodology. This Hybrid DR methodology is used when we want to Lift and Shift EBS to OCI using minimal downtime approach. The database in Oracle Cloud Infrastructure is running on VM DB system which is Oracle Cloud Infrastructure PaaS and application server in Compute which is Oracle Cloud Infrastructure IaaS. For more information on approach you can go through the Oracle Doc Hybrid DR .
Before
starting on the steps, there are some important notes which i want to highlight
1. This
method is not certified by EBS ATG team. This was done as part of my POC
and hence if you are doing it, you are at risk of not getting support
from EBS team. Few days back, Oracle had released the manual migration approach
which you can also follow https://blogs.oracle.com/ebsandoraclecloud/ebs-to-oci-manual-migration-documents-available. I will be doing a POC on the manual approach now.
2. Please
be aware of the support policies for EBS 12.1.3 and Db 11.2.0.4 for VM Db
system.
3. Once
the migration is completed, the tablespaces should be encrypted in order of
cloud tooling to work from VM DB system and activities such as taking backups
from console etc
4. There
should be a network setup between on prem and OCI either using Fast Connect,
IPSec VPN or through public internet.
Sample
Architecture
1. Enable
Force logging in on prem db.
2.
Add the standby logs in the on prem db.
3.
Create the password file and transfer it to OCI DB home(Single node).
Delete the starter Database in OCI
[oracle@hybriddr on_prem_backup]$ srvctl config database
PROD_iad3sv
[oracle@hybriddr on_prem_backup]$
SQL> set heading off linesize 999 pagesize 0 feedback off trimspool
on
SQL> spool /tmp/files.lst
SQL> select 'asmcmd rm '||name from v$datafile
union all
select 'asmcmd rm '||name from v$tempfile
union all
select 'asmcmd rm '||member from
v$logfile; 2 3 4 5
SQL> spool off
SQL> create pfile='/tmp/PROD_iad3sv.pfile ' from spfile;
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release
11.2.0.4.0 - 64bit Production
With the Automatic Storage Management and Real Application Testing
options
[oracle@hybriddr on_prem_backup]$
Shutdown the database
First collect the configuration of the database for future reference:
[oracle@hybriddr on_prem_backup]$ srvctl config database -d PROD_iad3sv
>/tmp/PROD_iad3sv.config
Now stop the database
[oracle@hybriddr on_prem_backup]$ srvctl stop database -d PROD_iad3sv -o
immediate
[oracle@hybriddr on_prem_backup]$ chmod 777 /tmp/files.lst
Using grid user remove the unwanted lines and run the script
[grid@hybriddr ~]$ . /tmp/files.lst
Configure
static listener
Add the
following content to the listener of dbaas host
SID_LIST_LISTENER =
(SID_LIST = (SID_DESC =
(GLOBAL_DBNAME = PROD_iad3sv) (ORACLE_HOME
=/u01/app/oracle/product/11.2.0.4/dbhome_1)
(SID_NAME = PROD)
))
And reload the listener
[grid@hybriddr admin]$ lsnrctl reload
LSNRCTL for Linux: Version 19.0.0.0.0 - Production
on 27-MAY-2021 08:55:35
Copyright (c) 1991, 2020, Oracle. All rights
reserved.
Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
The command completed successfully
Configure the TNSnames.ora,
sqlnet.ora files in both on prem and OCI database
Check the
connection from on prem
[oracle@onprem-ebs admin]$ sqlplus sys/*****@PROD_IAD3SV
as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu May
27 12:07:15 2021
Copyright (c) 1982, 2013, Oracle. All rights
reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release
11.2.0.4.0 - 64bit Production
With the Automatic Storage Management and Real
Application Testing options
SQL>
From OCI VM DB
[oracle@hybriddr admin]$ sqlplus system/*****@PROD
SQL*Plus: Release 11.2.0.4.0 Production on Thu May
27 12:07:38 2021
Copyright (c) 1982, 2013, Oracle. All rights
reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release
11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real
Application Testing options
SQL>
Modify the init parameters for
redo shipping:-
In the source on prem add the below parameetrs
SQL> ALTER SYSTEM SET
log_archive_config='dg_config=(PROD,PROD_iad3sv)' SCOPE=both;
SQL> ALTER SYSTEM SET log_archive_dest_1='location=use_db_recovery_file_dest valid_for=(all_logfiles,all_roles) db_unique_name=PROD' SCOPE=both;
System altered.
SQL> ALTER SYSTEM SET log_archive_dest_2='service=PROD_iad3sv async valid_for=(online_logfiles,primary_role) db_unique_name=PROD_iad3sv' SCOPE=both;
System altered.
SQL> ALTER SYSTEM SET fal_server='PROD_iad3sv'
SCOPE=both;
System altered.
SQL> ALTER SYSTEM SET fal_client='PROD'
SCOPE=both;
System altered.
SQL> ALTER SYSTEM SET standby_file_management='AUTO'
SCOPE=both;
System altered.
SQL> alter system set
log_archive_dest_state_2=defer;
System altered.
SQL>
In dr
SQL> ALTER SYSTEM SET
standby_file_management='AUTO' SCOPE=both;
System altered.
SQL> ALTER SYSTEM SET
log_archive_config='dg_config=(PROD,PROD_iad3sv)' SCOPE=both;
take the backup of on prem database and transfer it to OCI
SQL> select open_mode,database_role from
v$database;
OPEN_MODE DATABASE_ROLE
-------------------- ----------------
MOUNTED PHYSICAL
STANDBY
In the primary
SQL> Alter system set
log_archive_dest_state_2=enable scope=both sid='*';
System altered.
In the standby
Start the mrp
alter database recover managed standby database
disconnect from session;
Database altered.
SQL> SELECT ARCH.THREAD# "Thread",
ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last
Sequence Applied", (ARCH.SEQUENCE# - APPL.SEQUENCE#)
"Difference" FROM (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE
(THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG
GROUP BY THREAD#)) ARCH, (SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE
(THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY
GROUP BY THREAD#)) APPL WHERE ARCH.THREAD# = APPL.THREAD# ORDER BY 1;
Thread Last Sequence
Received Last Sequence Applied Difference
---------- ----------------------
--------------------- ----------
1 46 46 0
Enable Autoconfig in the database
The complete step by step document is available at a price of $49. If you want the document, please contact me over samratsinha05@gmail.com/ Whatsapp-+91-8709658491