Tags

11g (5) 12c (6) 18c (3) 19c (4) ASM (1) Critical Patch (11) Data Pump (1) Dataguard (9) Diverse (3) GRID (7) GitLab (2) Linux (8) OEM (2) ORA Errors (13) Oracle (12) RMAN (4)
Showing posts with label Oracle. Show all posts
Showing posts with label Oracle. Show all posts

Tuesday, April 19, 2022

oracle update from 12c to 19c steps

 

Upgrade Oracle 19c step by step guide

Oracle Upgrade from 12.2 to 19c

oracle update from 12c to 19c steps

Purpose of the document is to upgrade 12.2, which is running on physical server to upgrade into 19c version.

PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment.  

For more detail you can check the Oracle Doc:

Oracle 19c - Complete Checklist for Manual Upgrades to Non-CDB OracleDatabase 19c (Doc ID 2539778.1)

 

# Minimum version, which can directly upgraded.

11.2.0.4 ==>> 19c

12.1.0.2 ==>> 19c

12.2.0.1 ==>> 19c

18c      ==>> 19c

 

Source Database

 

Intermediate upgrade path

 

Target database

12.1.0.1   

-->

12.1.0.2/12.2.0.1

-->

19c

11.2.0.1/11.2.0.2/11.2.0.3

-->

11.2.0.4

-->

19c

11.1.0.6/11.1.0.7

-->

11.2.0.4

-->

19c

10.2.0.2, 10.2.0.3, 10.2.0.4, 10.2.0.5

-->

11.2.0.4/12.1.0.2

-->

19c

10.1.0.5

-->

11.2.0.4/12.1.0.2

-->

19c

9.2.0.8 or earlier

-->

11.2.0.4

-->

19c

 

# Pre-Upgrade tasks:

I am using the GUI for Installation. 

NOTE: If you don't use GRID, Then ignore following steps and start directelly with the steps "Install  DB Just Oracle Software" 

Just Installing GRID Software.

Create new Oracle_Home directory und unzip the GI files as follow.
unzip LINUX.X64_193000_grid_home.zip -d /oracle19c/product/19.3.0.0/grid

Importent NOTE: Make sure that you install latest OPATCH


Download lest OPatch from "https://updates.oracle.com/download/6880880.html"


Latest OPatch copy files.
p6880880_190000_Linux-x86-64.zip

cd $GRID_HOME
mv OPatch OPatch_old
cd $DOWNLOAD_PATCH/OPatch
cp -r OPatch $GRID_HOME

$ORACLE_HOME/OPatch/opatch version
$ORACLE_HOME/OPatch/opatch lspatches
 

Using MobaXterm for DISPLAY:
./gridSetup.sh -applyRU /JAN_PATCH_19c_2022/33567274/33509923

choose following Options
-> Upgrade Oracle Grid Infrastructure
-> No need EM
-> No need Automatically run configuration script
-> Ignore swap size

-> execute rootupgrade.sh
-> No need to overwrite
-> n
-> n
-> Finish Close

#Copy spfile+ASM.ora from 12c ASM_HOME to 19c ASM_HOME

# STOP ASM
srvctl stop asm -f
cp spfile+ASM.ora $ORACLE_HOME/dbs
srvctl modify asm -p '$ORACLE_HOME/dbs/spfile+ASM.ora'
srvctl start asm
srvctl config asm -a


Install  DB Just Oracle Software.

unzip LINUX.X64_193000_db_home.zip -d /oracle19c/product/19.3.0.0/db

Importent NOTE: Make sure that you install latest OPATCH

cd $ORACLE_HOME
mv OPatch OPatch_old
cd $DOWNLOAD_PATCH/OPatch
cp -r OPatch $ORACLE_HOME

$ORACLE_HOME/OPatch/opatch version
$ORACLE_HOME/OPatch/opatch lspatches

export DISPLAY=xx.xx.xx.xx:0.0
unset ORACLE_BASE
unset ORACLE_HOME
unset ORACLE_SID
./runInstaller -applyRU /JAN_PATCH_19c_2022/33567274/33509923

=>> Set Up Software Only
=>> Single Instance database installation
=>> Enterprise Edition
=>> keep the same Oracle Base
=>> chose the group you have.
=>> Keep as it is Uncheck "Automatically run configuration script"
=>> Click on Install

Execute the root script as root user.
/oracle19c/product/19.3.0.0/db/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /oracle19c/product/19.3.0.0/db

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Oracle Trace File Analyzer (TFA - Standalone Mode) is available at :
    /oracle19c/product/19.3.0.0/db/bin/tfactl

Note :
1. tfactl will use TFA Service if that service is running and user has been granted access
2. tfactl will configure TFA Standalone Mode only if user has no access to TFA Service or TFA is not installed


Backup your database before you start update

# Backup ==>> RMAN backup

 

# TNS Files

12c_Home:

cd $ORACLE_HOME/network/admin/


cp -p listener.ora sqlnet.ora tnsnames.ora /users/oracle/update19c/bkpOraFiles


 

cd $ORACLE_HOME/dbs

cp -p spfile* orapw* /users/oracle/update19c/bkpOraFiles

 

# Check for any invalid Objects

select count(*) from dba_objects where status='INVALID';

 

# Run preupgrade scrips

From Oracle 12c home:

mkdir -p /users/oracle/update19c/preupgrade

$ORACLE_HOME/jdk/bin/java -jar /oracle19c/product/19.3.0.0/db/rdbms/admin/preupgrade.jar FILE DIR /users/oracle/update19c/preupgrade

 

# View Preupgrade log files and fix the requirements

 

# verify tablespacesize for upgrade

 

# Check the current time zone version 

COL PROPERTY_NAME FOR A30
COL PROPERTY_VALUE FOR A25

select * from v$timezone_file;

select PROPERTY_NAME,PROPERTY_VALUE from database_properties where property_name ='DST_PRIMARY_TT_VERSION';

 

# Gather DICTIONARY STATS. This will reduce the total time of upgrade.

SET ECHO ON;
SET SERVEROUTPUT ON;
exec dbms_stats.gather_fixed_objects_stats;
exec dbms_stats.gather_schema_stats ('SYSTEM');
exec dbms_stats.gather_schema_stats ('SYS');
EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;


# Purge Recyclebin

PURGE DBA_RECYCLEBIN;

SQL> select count(*) from DBA_RECYCLEBIN;
  COUNT(*)
----------

         0

# Wait until all views completed refreshed.

SELECT o.name FROM sys.obj$ o, sys.user$ u, sys.sum$ s WHERE o.type# = 42 AND bitand(s.mflags, 8) =8;

 

declare
list_failures integer(3) :=0;
begin
DBMS_MVIEW.REFRESH_ALL_MVIEWS(list_failures,'C','', TRUE, FALSE);
end;

/

# Upgrade APEX: it’s recommended to upgrade it prior to upgrading the database to 19c following doc ID 1088970.1. 

select COMP_ID, VERSION, STATUS from DBA_REGISTRY where COMP_ID='APEX';

# Run preupgrade_fixups.sql

 

From Oracle 12c home::

@/users/oracle/update19c/preupgrade/preupgrade_fixups.sql

 

# Verify archive log dest size

SQL> archive log list

df -hl /fast_recovery_area

 

# Stop LISTENER

ps -ef | grep tns

lsnrctl stop LISTENER

 

# create Flashback Guaranteed Restore Point <<== optional steps

NO need to enable Flashback Database from 11.2.0.1 onwards

Database MUST be in Archive Log mode

MUST NOT change the compatible parameter to higher version

 

SQL> select flashback_on from v$database;
 
FLASHBACK_ON
------------------

NO                <<== keep it es it is.

 

select name,open_mode,log_mode from v$database;

show parameter compatible  <<== no need to change keep

                                it as it is 12.2.0

show parameter recovery

NAME                                 TYPE        VALUE

------------------------------------ ----------- -------------------

db_recovery_file_dest                string      /fast_recovery_area 

 

# Starting to create restore point

select * from V$restore_point;

create restore point pre_upgrade guarantee flashback database;

 

# verify restore point is created

col name for a20
col GUARANTEE_FLASHBACK_DATABASE for a10
col TIME for a60
set lines 190

select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;


 

# UPGRADE TASK

select name, open_mode from v$database;

shutdown immediate;

 

# Copy init and password files from 12c to 19c dbs home

# Copy following files from Oracle12c home to the Oracle19c home

cd $ORACLE_HOME/dbs

cp spfileDBNAME.ora orapwDBNAME /oracle19c/product/19.3.0.0/db/dbs

# Copy following files from Oracle12c home to the Oracle19c home

cd $ORACLE_HOME/network/admin/

cp tnsnames.ora sqlnet.ora /oracle19c/product/19.3.0.0/db/network/admin/

 

# Startup DB in Upgrade mode from 19c home

From Oracle 19c home:

sqlplus / as sysdba

SQL> startup upgrade
ORACLE instance started.

Total System Global Area 4.0534E+10 bytes
Fixed Size                  8906984 bytes
Variable Size            6174015488 bytes
Database Buffers         3.4226E+10 bytes
Redo Buffers              125308928 bytes
Database mounted.
Database opened.
SQL> select name,open_mode,cdb,version,status from v$database,v$instance;

NAME      OPEN_MODE            CDB VERSION           STATUS
--------- -------------------- --- ----------------- ------------
TSTDB     READ WRITE           NO  19.0.0.0.0        OPEN MIGRATE


# Regulair upgrade command

cd $ORACLE_HOME/rdbms/admin

$ORACLE_HOME/perl/bin/perl catctl.pl -n 8 catupgrd.sql

 

OR

cd $ORACLE_HOME/bin/

ls -al dbupgrade

nohup ./dbupgrade &

jobs -l

disown

ps -ef | grep -i catctl.pl

 

# Monitore upgrades Logs

ll $ORACLE_HOME/cfgtoollogs/upgrade*

cd $ORACLE_HOME/bin

more nohup.out

 

# Starup DB from 19c home

From Oracle 12c home:

srvctl remove database -d tstdb

From Oracle 19c home:

srvctl add database -d [db_unique_name] -dbname [DB_NAME] -o $ORACLE_HOME -p '$ORACLE_HOME/dbs/spfileDBNAME.ora'


srvctl config database -d DBNAME

sqlplus / as sysdba
startup;

NOTE: You may need to change the follwoing parameters:
show parameter diagnostic_dest;
show parameter audit_file_dest;

alter system set audit_file_dest='NEW_LOCATION' scope=spfile;
alter system set diagnostic_dest='NEW_LOCATION' scope=spfile;

shutdown immediate;
startup;

SQL> select name,open_mode,cdb,version,status from v$database,v$instance;

NAME      OPEN_MODE            CDB VERSION           STATUS
--------- -------------------- --- ----------------- ------------
TSTDB     READ WRITE           NO  19.0.0.0.0        OPEN

 
col COMP_ID for a10
col COMP_NAME for a40
col VERSION for a15
set lines 180
set pages 999

select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry;


 

# POST-UPGRADE TASKS WHEN DBUA USING  <<== I am not using those steps 

# Run utlrp.sql

$ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp.sql 

OR

cd $ORACLE_HOME/rdbms/admin
nohup sqlplus "/ as sysdba" @utlrp.sql > /users/oracle/update19c/utlrp.out 2>&1 &
 
select count(*) from dba_objects where status='INVALID';
select count(*) from dba_objects where status='INVALID' and owner in ('SYS','SYSTEM');

@ORACLE_HOME/rdbms/admin/utlrp.sql
 
select count(*) from dba_objects where status='INVALID';

 

# Run postupgrade_fixups.sql  <<== I am using following steps 

@/users/oracle/update19c/preupgrade/postupgrade_fixups.sql

 

# Upgrade Timezone

For 19c, time zone scripts are included in the binary.

cd /$ORACLE_HOME/rdbms/admin/

ls -lthr utltz*

 

SELECT version FROM v$timezone_file;

@?/rdbms/admin/utltz_countstar.sql

@?/rdbms/admin/utltz_upg_check.sql

@?/rdbms/admin/utltz_upg_apply.sql

 

SQL> select TZ_VERSION from registry$database;

TZ_VERSION
----------
        32

SQL> SELECT * FROM v$timezone_file;

FILENAME                VERSION     CON_ID
-------------------- ---------- ----------
timezlrg_32.dat              32          0



# Run utlusts.sql

Note: utluNNNs.sql is replaced by utlusts.sql in 19c version

Note: In 19c Earlier version utluNNNs.sql is replaced by utlusts.sql

*** Run utlusts.sql as many times as you want, at any time after the upgrade is completed.

*** utlusts.sql reads the view called dba_registry_log and displays the upgrade results for the       database components.

 

@$ORACLE_HOME/admin/utlusts.sql TEXT

 

# Caution: If you use manual upgrade, and you do not run catuppst.sql, then later can your database suffers performance issue.

 

@$ORACLE_HOME/rdbms/admin/catuppst.sql

 

# Re-Run postupgrade_fixups.sql

@/users/oracle/update19c/preupgrade/postupgrade_fixups.sql

exec DBMS_STATS.GATHER_DICTIONARY_STATS (estimate_percent => 100, degree => 8);

exec DBMS_STATS.GATHER_FIXED_OBJECTS_STATS(NULL);

exec DBMS_STATS.GATHER_SYSTEM_STATS;

# Verify again INVALID OBJECTS

select count(*) from dba_objects where status='INVALID';

 

# Drop Restore point

col name for a20

col GUARANTEE_FLASHBACK_DATABASE for a10
col TIME for a60
set lines 190
select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;
 
ls -al /fast_recovery_area/TSTDB01/flashback
 
drop restore point PRE_UPGRADE;
 
select NAME,GUARANTEE_FLASHBACK_DATABASE,TIME from V$restore_point;
 

ls -al /fast_recovery_area/TSTDB01/flashback


 

#  Set COMPATIBALE parameter value to 19.0.0 on DB

show parameter COMPATIBLE
ALTER SYSTEM SET COMPATIBLE = '19.0.0' SCOPE=SPFILE;
shutdown immediate;

startup;

show parameter COMPATIBLE;

From GRID 19c home on ASM: 

 
 sqlplus / as sysasm
 col COMPATIBILITY form a10
 col DATABASE_COMPATIBILITY form a10
 col NAME form a20
select group_number, name, compatibility, database_compatibility from v$asm_diskgroup;

alter diskgroup DATA01 set attribute 'compatible.rdbms'='19.0.0.0.0';

alter diskgroup DATA01 set attribute 'compatible.rdbms'='19.0.0';

Restart DB and ASM:

crsctl stop res -all

crsctl start res -all


# Verify DBA_REGISTRY

col COMP_ID for a10
col COMP_NAME for a40
col VERSION for a15
set lines 180
set pages 999
select COMP_ID,COMP_NAME,VERSION,STATUS from dba_registry;


# Add TNS Entries in 19c TNS home

cd $ORACLE_HOME/network/admin
cat listener.ora
cat tnsnames.ora
cat sqlnet.ora
 

lsnrctl start LISTENER

# Password File – orapw*

show parameter password

 

# Edit oratab File

 

# Back Up the Database

#You can Install new Oracle Patch. Use following Linkf for the steps:

January Patch 19c 2022

 Need to Fix the BUG:

OPATCHAUTO-72050: System instance creation failed.
OPATCHAUTO-72050: Failed while retrieving system information.
OPATCHAUTO-72050: Please check log file for more details.

# You will see folloing error in the logfile:
Failed to retrieve instance list for database TSTDB
PRCR-1055 : Cluster membership check failed for node

SOLUTION:
crsctl modify resource "ora.tstdb.db"  -attr "HOSTING_MEMBERS=" -unsupported
crsctl stop has
crsctl start has


Let me know if something missing !

Your comments are most valuable and it would help me to come up with better posts. 

Wednesday, August 26, 2020

Increase the sessions parameter in oracle

 

How to increase the sessions parameter in oracle

Increase sessions value.

PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment. 

You can check the current value as follow

sql> show parameter sessions

sql> show parameter processes

sql> show parameter transactions

Note: Required DB restart.

You can calculate the value as follow using the formula.

processes=x

sessions=x*1.1+5

transactions=sessions*1.1

Example:

 

sql> alter system set processes=500 scope=spfile;

sql> alter system set sessions=555 scope=spfile;

sql> alter system set transactions=610 scope=spfile; 

restart DB:


Monday, August 24, 2020

Create Oracle Catalog DB

 

 

Create Oracle Catalog DB


PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment. 

Creating tablespace

CREATE TABLESPACE CAT_DB BLOCKSIZE 16384 DATAFILE  '/data/KARDBPRD1/01/cat_db.dbf' SIZE 200M REUSE EXTENT MANAGEMENT LOCAL  AUTOALLOCATE  ONLINE PERMANENT  SEGMENT SPACE MANAGEMENT AUTO;

 

Creating User and grant them required grants.

 

CREATE USER RMAN_CAT IDENTIFIED BY passwd DEFAULT TABLESPACE CAT_DB TEMPORARY TABLESPACE TEMP;

GRANT UNLIMITED TABLESPACE TO RMAN_CAT;

GRANT CONNECT TO RMAN_CAT;

GRANT RESOURCE TO RMAN_CAT;

GRANT RECOVERY_CATALOG_OWNER TO RMAN_CAT;

GRANT DBA TO RMAN_CAT;

ALTER USER RMAN DEFAULT ROLE ALL;

 

Login into the RMAN as follow, create catalog, and register database.

 

rman target /

 

RMAN> connect catalog rman_cat/passwd@kardbprd01

 

connected to recovery catalog database

 

RMAN> create catalog;

 

recovery catalog created

 

RMAN> register database;

 

database registered in recovery catalog

starting full resync of recovery catalog

full resync complete

 


Saturday, June 27, 2020

Switchover oracle database 19c



Switchover oracle database 19c

Oracle 19c-Step by Step Manual Switchover



PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment. 


Use full commands you may need throw the process.
-- shutdown Applications which are running and connection to the DB.
-- backup crontab
-- select database_role from v$database; #check DB role
-- select name, open_mode, database_role from v$database; # above or this command
-- ALTER SYSTEM SWITCH LOGFILE;
-- SELECT SWITCHOVER_STATUS FROM V$DATABASE; -- check --
-- alter system set log_archive_dest_state_2='ENABLE' scope=both;
-- select process, status, sequence# from v$managed_standby; #check the MRP0 or MRP process is running
-- ALTER DATABASE RECOVER  managed standby database  cancel;   #Cancel managed recovery operations.
-- alter database recover managed standby database using current logfile disconnect from session; # online redolog apply via redologs
-- ALTER DATABASE RECOVER  managed standby database  parallel 10 disconnect;   #logapply via arcive log
-- lsnrctl start LISTENER
-- Always see the logfile when you start DB to check whether the parameters are correct or not.
-- NOTE: when you add tempfiles in the Primary database, new tempfiles will not added automatically in the Physical Standby database.
-- The tempfile will NOT automatically be created in the physical standby.

Following parameters are related to the Primary and Standby database. Verify the parameter before you start with Switch Over.
show parameter service_names;
show parameter instance_name;
show parameter log_archive_dest_2;
show parameter fal_server;
show parameter fal_client;
show parameter db_file_name_convert;
show parameter log_file_name_convert;

select name, open_mode, database_role from v$database;

NAME      OPEN_MODE            DATABASE_ROLE
--------- -------------------- ----------------
EDUDB     READ WRITE           PRIMARY

select name, open_mode, database_role from v$database;

NAME      OPEN_MODE            DATABASE_ROLE
--------- -------------------- ----------------
EDUDB     MOUNTED              PHYSICAL STANDBY

STEP 1  
Starting with Switchover.
Run the following steps on Primary:

Alter system switch logfile;
select switchover_status from v$database;
alter database commit to switchover to physical standby with session shutdown;
shutdown immediate;
startup mount;

STEP 2
Run this on standby:

select switchover_status from v$database;
alter database commit to switchover to primary with session shutdown;
shutdown immediate;
startup

NOTE:
You can stop listener and modify it and start it again, If need it. Make sure that you have correct entry in tnsname.ora. Better if you test with command tnsping.

STEP 3
Execute following command on Standby:

alter database recover managed standby database using current logfile disconnect from session ;

select name,db_unique_name,database_role from v$database;

NAME      DB_UNIQUE_NAME                 DATABASE_ROLE
--------- ------------------------------ ----------------
EDUDB     EDUDB02                        PHYSICAL STANDBY

select process, status, sequence# from v$managed_standby;
PROCESS   STATUS        SEQUENCE#
--------- ------------ ----------
ARCH      CONNECTED             0
DGRD      ALLOCATED             0
DGRD      ALLOCATED             0
ARCH      CONNECTED             0
ARCH      CONNECTED             0
ARCH      CONNECTED             0
RFS       IDLE                274
RFS       IDLE                  0
RFS       IDLE                  0
MRP0      WAIT_FOR_LOG        274

At this Point, we are done with switchover:

Extra steps:
STEP 4
Check whether the standby is in sync:

On both Primary and Standby:

On Primary:
SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last Sequence Applied"
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
---------- ---------------------- ---------------------
         1                    273                   273
         1                    273                   273

select max(sequence#) from v$log_history;

MAX(SEQUENCE#)
--------------
           273

On Standby:

SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last Sequence Applied"
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
---------- ---------------------- ---------------------
         1                    273                   273

select max(sequence#) from v$log_history;

MAX(SEQUENCE#)
--------------
           273

SELECT THREAD# "Thread",SEQUENCE# "Last Sequence Generated"
 FROM V$ARCHIVED_LOG
          WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)
          ORDER BY 1;     2    3    4

    Thread Last Sequence Generated
---------- -----------------------
1                                     273

Trouble shooting standard check:
1)
Make sure the parameter is enabled on both Primary and Standby.
--alter system set log_archive_dest_state_2=defer;
alter system set log_archive_dest_state_2=enable;

2)
-- required for jdbc connection. You can set the value anyway it doesn't harm
SQL> alter system set instance_name='edudb' scope=spfile;

3)
Test connection with tnsping on both direction.

4)
-- check the service_name parameter before and edit the value as follow. You can alter multiple service_name as follow, if required.

alter system set service_names=' edudb01',' edudb01.th.com',' edudb02' ,' edudb02.th.com' scope = both;

physical standby without duplicate command

physical standby without duplicate command create a physical standby database using RMAN without using duplicate command PURPOSE:   All docu...