SlideShare a Scribd company logo
Oracle Consultant: Shahnawaz Ahmed
Oracle E-Business Suite Release 12.2 Using Oracle 11g (11gR2) Physical Standby
Database (Doc ID 1491855.1)
Please usethe below Oracle Doc ID to preparestandby databasemachine.
Oracle E-Business SuiteInstallation and UpgradeNotes Release 12 (12.2) for Linux x86-64 (Doc ID 1330701.1)
SECTIONS:
RequiredPackages =(RPM)
SELinux (SecurityEnhancedLinux) =disabled
Kernel Settings =/etc/sysctl.conf
DomainName System(DNS) ResolverParameters = /etc/resolv.conf
VerifyingHostNames =/etc/hosts
Modifyingthe Numberof OpenFile Descriptors =/etc/security/limits.conf
 Enable Forced Logging
Place the primary database in FORCE LOGGING mode by using the following SQL statement:
SQL>ALTER DATABASE FORCE LOGGING;
 Set Up Secure Connections on Primary.
$ cd <RDBMS ORACLE HOME>/dbs
$ orapwd file=orapw <SID> password= <SYS password> entries= <max privileged users> ignorecase=y
To complete the implementation of the password file, you must add the
parameter remote_login_passwordfile to your init.ora file as described in the next step.
 Set Primary Database Initialization Parameters
db_unique_name = pclone ---- You need to change this to pclones (Standby db_unique_name, for example)
when you copy this file to physical standby
log_archive_dest_1 ="LOCATION=/u01/prodclone/data/arch"
log_archive_dest_2 ="SERVICE=pclones LGWR ASYNC=20480 DB_UNIQUE_NAME=pclones OPTIONAL
REOPEN=15 MAX_FAILURE=10 NET_TIMEOUT=30"
log_archive_config='dg_config=(pclone,pclones)'
# log_archive_dest_state_2 = defer
# log_archive_dest_state_2 = enable
log_archive_min_succeed_dest = 1
Oracle Consultant: Shahnawaz Ahmed
standby_file_management = AUTO
Remote_login_passwordfile = exclusive
log_archive_format = pclone%s_%t_%r.dbf # Or can just leave as default.
# db_file_name_convert: do not need; same directory structure
# log_file_name_convert: do not need; same directory structure
fal_server = pclone
fal_client = pclones
log_file_name_convert = xx,xx # Specify dummy values to trigger log clearing
 Enable Archive Logging on Primary System
Enable archiving on the primary system if it is not already enabled.
SQL> shutdownimmediate
Database closed.
Database dismounted.
ORACLE instance shutdown.
SQL> startup mount
ORACLE instance started.
Total SystemGlobal Area 849530880 bytes
FixedSize 1339824 bytes
Variable Size 511708752 bytes
Database Buffers 331350016 bytes
RedoBuffers 5132288 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive loglist
Database log mode Archive Mode
Automaticarchival Enabled
Archive destination /u01/prodclone/data/arch
Oldestonline logsequence 25
Next logsequence to archive 27
Current log sequence 27
Oracle Consultant: Shahnawaz Ahmed
 Add Standby Redo Logs
To create standby redo log groups, as the ORACLE user on the primary database server, connect to SQL*Plus
as sysdba and issue a command like this for each standby redo log group you will create:
ALTER DATABASE ADD STANDBY LOGFILE THREAD 3
('/u01/prodclone/data/REDO3a.log','/u01/prodclone/data/REDO3b.log') SIZE 500M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 4
('/u01/prodclone/data/REDO4a.log','/u01/prodclone/data/REDO4b.log') SIZE 500M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 5
('/u01/prodclone/data/REDO5a.log','/u01/prodclone/data/REDO5b.log') SIZE 500M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 6
('/u01/prodclone/data/REDO6a.log','/u01/prodclone/data/REDO6b.log') SIZE 500M;
 Run the Application Tier and Database Tier Pre-clone Scripts
$ cd $RDBMS_ORACLE_HOME/appsutil/scripts/<context_name>/
$ perl adpreclone.pl dbTier
$ cd $INST_TOP/admin/scripts/
$ perl adpreclone.pl appsTier
Ensure that the password file copied in to standby database to Set Up Secure Connections exists under
$ORACLE_HOME/dbs
Oracle Consultant: Shahnawaz Ahmed
Creating a Physical Standby Database
 Copy the ORACLE_HOME to the Standby Database Server
 RMAN
Use the 'duplicate database' command. See Appendix D: Using RMAN to Create Physical Standby
Database.
If you useRMAN to perform your backup, you do not need to placethe tablespaces in 'hot backup' mode, or manually createyou r
standby control file.Refer to the RMAN documentation in the OracleDatabaseBackup and Recovery User's Guide for more details.
RMAN restores a backup control file,and copies all necessary databasefiles and archived redo logs over the network to the standby
host. However, while RMAN recovers the standby database,it does not placeit in manual or managed recovery mode.
 Perform File-based Configurations on the Standby Database Server
After the database software copies are complete
$ cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
$ perl adcfgclone.pl dbTechStack
Answer the questions when prompted. If you receive any errors registering the new ORACLE_HOME, follow the
instructions given by the script to correct them.
$ . <STNDBY_CONTEXT>.env
 Stop the Database Listener on the Standby Database Server
The above step starts the database listener. As it is not yet completely configured, it should be stopped. As the
ORACLE user on the standby database server, enter the following command:
$ lsnrctl stop pclones
 Configure Oracle Net for Redo Transmission, Start the Listener
Oracle Consultant: Shahnawaz Ahmed
As the ORACLE user, copy the listener_ifile.ora and <CONTEXT_NAME>_ifile.ora from the primary server's
<TNS_ADMIN> directory to the standby server's <TNS_ADMIN> directory. As part of the copy, rename the
primary <CONTEXT_NAME>_ifile.ora to the standby's <STNDBY_CONTEXT>_ifile.ora matching the spelling and
case in the file name in the last line of the standby server's tns_names.ora file.
In the <STNDBY_CONTEXT>_ifile.ora, be sure the entry for the standby service's HOST parameter holds the
standby database host name and the FAL service's host name is the primary host name.
In the listener_ifile.ora file, ensure that the HOST for the standby service entry points to the standby database
host. Refer to Appendix A: Oracle Net Files for example TNS entries.
As the ORACLE user, start the database listener for the standby:
Note: tnsnames, listener, sqlnet ensure there IFILE entries pointing to <CONTEXT_NAME>_ifile.ora
tnsnames.ora
listener.ora
sqlnet.ora
Primary DB:
pclone_ebsdb01_ifile.ora
pclone=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=ebsdb01.orasol.com)(PORT=1531))
(CONNECT_DATA= (SID=pclone)
)
)
pclones=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=ebsdb02.orasol.com)(PORT=1531))
(CONNECT_DATA= (SID=pclones)
Oracle Consultant: Shahnawaz Ahmed
)
)
Standby DB:
pclone=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=ebsdb01.orasol.com)(PORT=1531))
(CONNECT_DATA= (SID=pclone)
)
)
pclones=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=ebsdb02.orasol.com)(PORT=1531))
(CONNECT_DATA= (SID=pclones)
)
)
$ lsnrctl start pclones
 Modify the Database init.ora Parameters on the Standby Server
Create initialization parameter file for standby. Run the following command on the primary:
SQL>create pfile from spfile
Copy init_<SID>.ora from the primary to the standby.
Update the following parameters:
DB_UNIQUE_NAME should be updated to a name different from the primary: for example, pclones
$vi initpclones.ora
*.db_unique_name='pclones'
Oracle Consultant: Shahnawaz Ahmed
*.log_archive_dest_2='SERVICE=pclones LGWR ASYNC=20480 DB_UNIQUE_NAME=pclone OPTIONAL
REOPEN=15 MAX_FAILURE=10 NET_TIMEOUT=30'
Connect as sysdba and issue the following command to start up but not mount the standby.
SQL>startup nomount pfile= <pfile created in above step>
Using RMAN toCreate Physical Standby Database
Connect to target and auxiliary databases using RMAN:
$ rman target sys/****@pclone auxiliary sys/****@pclones
(In this example, pclone = primary service name and pclones = standby service name)
Recovery Manager: Release 11.2.0.3.0 - Production on Sep 20 03:16:56 2015 Copyright (c) 1982, 2009, Oracle
and/or its affiliates. All rights reserved.
connected to target database: pclone (DBID=3753412759)
connected to auxiliary database: pclone (not mounted)
RMAN>
RMAN>DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE
DORECOVER
NOFILENAMECHECK;
In the above example, RMAN automatically copies the server parameter file to the standby host and then
starts the auxiliary instance with this file.
Put the standby database in 'managed recover' mode.
SQL>alter database recover managed standby database disconnect from session;
Start Shipping Redo From the Primary to the Standby Database Server
As the ORACLE user on the primary database server, set log_archive_dest_state_2 to enable in the database
initialization file.
alter systemset log_archive_dest_state_2=enable scope=both;
Oracle Consultant: Shahnawaz Ahmed
On standby.
SQL>alter database recover managed standby database cancel;
SQL>shutdown immediate;
SQL>startup mount;
SQL>alter database open;
SQL>alter database recover managed standby database using current logfile disconnect;
SQL>select * from v$archive_dest_status where status != 'INACTIVE';
On each database server, this query will show the which logs have been sent /received and applied:
SQL>select sequence#, applied, to_char(first_time, 'mm/dd/yy hh24:mi:ss') first from v$archived_log order by
first_time;

More Related Content

PDF
Access control system
PPTX
Unit-III.pptx
PPTX
Flip flop& RAM ROM
PPTX
Instrumentation & Measurement: An Introduction about Measurement Systems
DOCX
Creating a physical standby database 11g on windows
DOC
Oracle data guard configuration in 12c
PPT
2011 384 hackworth_ppt
PPT
Adventures in Dataguard
Access control system
Unit-III.pptx
Flip flop& RAM ROM
Instrumentation & Measurement: An Introduction about Measurement Systems
Creating a physical standby database 11g on windows
Oracle data guard configuration in 12c
2011 384 hackworth_ppt
Adventures in Dataguard

Similar to Physical_Standby_Database_R12.2.4 (20)

PDF
oracle upgradation
TXT
oracle dba
PPT
Less04 Instance
PPTX
Data Guard New Features
PPTX
Convert single instance to RAC
PDF
Installing oracle grid infrastructure and database 12c r1
PDF
Database decommission process
PDF
Oracle 11g Installation With ASM and Data Guard Setup
PDF
Enable oracle database vault
PDF
Oracle applications 11i hot backup cloning with rapid clone
DOC
Oracle applications 11i hot backup cloning with rapid clone
DOCX
Enable archivelod mode in oracle rac12cR1 with asm location
PDF
How To Control IO Usage using Resource Manager
PPTX
Oracle-12cData-Guard-Broker-Session-4.pptx
PDF
Kp.3 pengaturan sistem dan user
PDF
FIXING BLOCK CORRUPTION (RMAN) on 11G
 
DOCX
Oracle 12cR2 RAC Database Software Installation and Create Database
PDF
How to create a non managed standby database
DOCX
Change DB Name
DOC
br_test_lossof-datafile_10g.doc
oracle upgradation
oracle dba
Less04 Instance
Data Guard New Features
Convert single instance to RAC
Installing oracle grid infrastructure and database 12c r1
Database decommission process
Oracle 11g Installation With ASM and Data Guard Setup
Enable oracle database vault
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
Enable archivelod mode in oracle rac12cR1 with asm location
How To Control IO Usage using Resource Manager
Oracle-12cData-Guard-Broker-Session-4.pptx
Kp.3 pengaturan sistem dan user
FIXING BLOCK CORRUPTION (RMAN) on 11G
 
Oracle 12cR2 RAC Database Software Installation and Create Database
How to create a non managed standby database
Change DB Name
br_test_lossof-datafile_10g.doc
Ad

Physical_Standby_Database_R12.2.4

  • 1. Oracle Consultant: Shahnawaz Ahmed Oracle E-Business Suite Release 12.2 Using Oracle 11g (11gR2) Physical Standby Database (Doc ID 1491855.1) Please usethe below Oracle Doc ID to preparestandby databasemachine. Oracle E-Business SuiteInstallation and UpgradeNotes Release 12 (12.2) for Linux x86-64 (Doc ID 1330701.1) SECTIONS: RequiredPackages =(RPM) SELinux (SecurityEnhancedLinux) =disabled Kernel Settings =/etc/sysctl.conf DomainName System(DNS) ResolverParameters = /etc/resolv.conf VerifyingHostNames =/etc/hosts Modifyingthe Numberof OpenFile Descriptors =/etc/security/limits.conf  Enable Forced Logging Place the primary database in FORCE LOGGING mode by using the following SQL statement: SQL>ALTER DATABASE FORCE LOGGING;  Set Up Secure Connections on Primary. $ cd <RDBMS ORACLE HOME>/dbs $ orapwd file=orapw <SID> password= <SYS password> entries= <max privileged users> ignorecase=y To complete the implementation of the password file, you must add the parameter remote_login_passwordfile to your init.ora file as described in the next step.  Set Primary Database Initialization Parameters db_unique_name = pclone ---- You need to change this to pclones (Standby db_unique_name, for example) when you copy this file to physical standby log_archive_dest_1 ="LOCATION=/u01/prodclone/data/arch" log_archive_dest_2 ="SERVICE=pclones LGWR ASYNC=20480 DB_UNIQUE_NAME=pclones OPTIONAL REOPEN=15 MAX_FAILURE=10 NET_TIMEOUT=30" log_archive_config='dg_config=(pclone,pclones)' # log_archive_dest_state_2 = defer # log_archive_dest_state_2 = enable log_archive_min_succeed_dest = 1
  • 2. Oracle Consultant: Shahnawaz Ahmed standby_file_management = AUTO Remote_login_passwordfile = exclusive log_archive_format = pclone%s_%t_%r.dbf # Or can just leave as default. # db_file_name_convert: do not need; same directory structure # log_file_name_convert: do not need; same directory structure fal_server = pclone fal_client = pclones log_file_name_convert = xx,xx # Specify dummy values to trigger log clearing  Enable Archive Logging on Primary System Enable archiving on the primary system if it is not already enabled. SQL> shutdownimmediate Database closed. Database dismounted. ORACLE instance shutdown. SQL> startup mount ORACLE instance started. Total SystemGlobal Area 849530880 bytes FixedSize 1339824 bytes Variable Size 511708752 bytes Database Buffers 331350016 bytes RedoBuffers 5132288 bytes Database mounted. SQL> alter database archivelog; Database altered. SQL> alter database open; Database altered. SQL> archive loglist Database log mode Archive Mode Automaticarchival Enabled Archive destination /u01/prodclone/data/arch Oldestonline logsequence 25 Next logsequence to archive 27 Current log sequence 27
  • 3. Oracle Consultant: Shahnawaz Ahmed  Add Standby Redo Logs To create standby redo log groups, as the ORACLE user on the primary database server, connect to SQL*Plus as sysdba and issue a command like this for each standby redo log group you will create: ALTER DATABASE ADD STANDBY LOGFILE THREAD 3 ('/u01/prodclone/data/REDO3a.log','/u01/prodclone/data/REDO3b.log') SIZE 500M; ALTER DATABASE ADD STANDBY LOGFILE THREAD 4 ('/u01/prodclone/data/REDO4a.log','/u01/prodclone/data/REDO4b.log') SIZE 500M; ALTER DATABASE ADD STANDBY LOGFILE THREAD 5 ('/u01/prodclone/data/REDO5a.log','/u01/prodclone/data/REDO5b.log') SIZE 500M; ALTER DATABASE ADD STANDBY LOGFILE THREAD 6 ('/u01/prodclone/data/REDO6a.log','/u01/prodclone/data/REDO6b.log') SIZE 500M;  Run the Application Tier and Database Tier Pre-clone Scripts $ cd $RDBMS_ORACLE_HOME/appsutil/scripts/<context_name>/ $ perl adpreclone.pl dbTier $ cd $INST_TOP/admin/scripts/ $ perl adpreclone.pl appsTier Ensure that the password file copied in to standby database to Set Up Secure Connections exists under $ORACLE_HOME/dbs
  • 4. Oracle Consultant: Shahnawaz Ahmed Creating a Physical Standby Database  Copy the ORACLE_HOME to the Standby Database Server  RMAN Use the 'duplicate database' command. See Appendix D: Using RMAN to Create Physical Standby Database. If you useRMAN to perform your backup, you do not need to placethe tablespaces in 'hot backup' mode, or manually createyou r standby control file.Refer to the RMAN documentation in the OracleDatabaseBackup and Recovery User's Guide for more details. RMAN restores a backup control file,and copies all necessary databasefiles and archived redo logs over the network to the standby host. However, while RMAN recovers the standby database,it does not placeit in manual or managed recovery mode.  Perform File-based Configurations on the Standby Database Server After the database software copies are complete $ cd <RDBMS ORACLE_HOME>/appsutil/clone/bin $ perl adcfgclone.pl dbTechStack Answer the questions when prompted. If you receive any errors registering the new ORACLE_HOME, follow the instructions given by the script to correct them. $ . <STNDBY_CONTEXT>.env  Stop the Database Listener on the Standby Database Server The above step starts the database listener. As it is not yet completely configured, it should be stopped. As the ORACLE user on the standby database server, enter the following command: $ lsnrctl stop pclones  Configure Oracle Net for Redo Transmission, Start the Listener
  • 5. Oracle Consultant: Shahnawaz Ahmed As the ORACLE user, copy the listener_ifile.ora and <CONTEXT_NAME>_ifile.ora from the primary server's <TNS_ADMIN> directory to the standby server's <TNS_ADMIN> directory. As part of the copy, rename the primary <CONTEXT_NAME>_ifile.ora to the standby's <STNDBY_CONTEXT>_ifile.ora matching the spelling and case in the file name in the last line of the standby server's tns_names.ora file. In the <STNDBY_CONTEXT>_ifile.ora, be sure the entry for the standby service's HOST parameter holds the standby database host name and the FAL service's host name is the primary host name. In the listener_ifile.ora file, ensure that the HOST for the standby service entry points to the standby database host. Refer to Appendix A: Oracle Net Files for example TNS entries. As the ORACLE user, start the database listener for the standby: Note: tnsnames, listener, sqlnet ensure there IFILE entries pointing to <CONTEXT_NAME>_ifile.ora tnsnames.ora listener.ora sqlnet.ora Primary DB: pclone_ebsdb01_ifile.ora pclone= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=ebsdb01.orasol.com)(PORT=1531)) (CONNECT_DATA= (SID=pclone) ) ) pclones= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=ebsdb02.orasol.com)(PORT=1531)) (CONNECT_DATA= (SID=pclones)
  • 6. Oracle Consultant: Shahnawaz Ahmed ) ) Standby DB: pclone= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=ebsdb01.orasol.com)(PORT=1531)) (CONNECT_DATA= (SID=pclone) ) ) pclones= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=ebsdb02.orasol.com)(PORT=1531)) (CONNECT_DATA= (SID=pclones) ) ) $ lsnrctl start pclones  Modify the Database init.ora Parameters on the Standby Server Create initialization parameter file for standby. Run the following command on the primary: SQL>create pfile from spfile Copy init_<SID>.ora from the primary to the standby. Update the following parameters: DB_UNIQUE_NAME should be updated to a name different from the primary: for example, pclones $vi initpclones.ora *.db_unique_name='pclones'
  • 7. Oracle Consultant: Shahnawaz Ahmed *.log_archive_dest_2='SERVICE=pclones LGWR ASYNC=20480 DB_UNIQUE_NAME=pclone OPTIONAL REOPEN=15 MAX_FAILURE=10 NET_TIMEOUT=30' Connect as sysdba and issue the following command to start up but not mount the standby. SQL>startup nomount pfile= <pfile created in above step> Using RMAN toCreate Physical Standby Database Connect to target and auxiliary databases using RMAN: $ rman target sys/****@pclone auxiliary sys/****@pclones (In this example, pclone = primary service name and pclones = standby service name) Recovery Manager: Release 11.2.0.3.0 - Production on Sep 20 03:16:56 2015 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. connected to target database: pclone (DBID=3753412759) connected to auxiliary database: pclone (not mounted) RMAN> RMAN>DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE DORECOVER NOFILENAMECHECK; In the above example, RMAN automatically copies the server parameter file to the standby host and then starts the auxiliary instance with this file. Put the standby database in 'managed recover' mode. SQL>alter database recover managed standby database disconnect from session; Start Shipping Redo From the Primary to the Standby Database Server As the ORACLE user on the primary database server, set log_archive_dest_state_2 to enable in the database initialization file. alter systemset log_archive_dest_state_2=enable scope=both;
  • 8. Oracle Consultant: Shahnawaz Ahmed On standby. SQL>alter database recover managed standby database cancel; SQL>shutdown immediate; SQL>startup mount; SQL>alter database open; SQL>alter database recover managed standby database using current logfile disconnect; SQL>select * from v$archive_dest_status where status != 'INACTIVE'; On each database server, this query will show the which logs have been sent /received and applied: SQL>select sequence#, applied, to_char(first_time, 'mm/dd/yy hh24:mi:ss') first from v$archived_log order by first_time;