Environment Preparation
in my test environment, I prepared a Two CentOS7.4 virtual machines, together with ORACLE11GR2 's 11.2.0.1.0 Enterprise version of the database software, where only the primary server creates a DB instance, and the standby server installs only the Oracle database software.
Primary Database (DB1)
OS |
CentOS7.4 |
hostname |
hmdb11dg-db1 |
oracle Version |
11.2.0.1.0 |
Oracle SID |
HMDG ( a database created using the DBCA tool ) |
Standby Database (DB2)
OS |
CentOS7.4 |
hostname |
hmdb11dg-db2 |
oracle Version |
11.2.0.1.0 |
Oracle SID |
HMDG2 |
Note : The standby server only has the Oracle database software installed before you begin
oracle User environment variable configuration (~/.bash_profile)
Export Tmp=/tmpexport tmpdir= $TMPexport oracle_term=xtermexport oracle_base=/u01/app/oracleexport ORACLE_HOME=$ Oracle_base/product/11.2.0/db_1export ORACLE_SID=HMDG #DB2---> Hmdg2export path= $ORACLE _home/bin: $PATHexport LD_ Library_path= $ORACLE _home/lib:/usr/lib:/usr/lib64if [$USER = "ORACLE"];then if [$SHELL = "/bin/ksh"];then ul Imit-p 16384 ulimit-n 65536 else ulimit-u 16384-n 65536 Fifi
in the Create a new DB instance on DB1 ( primary Database )
Steps ( figure ) :
1. Open the DBCA tool ( run as oracle user )
Select Create Database
2. Enter the data DB instance name (SID) you want to create
3. database user password ( Here All user passwords are set to a uniform password, it is recommended to set a different password for each user )
4. Select the path where the database file is saved ( default is used here , it will be saved in the $ORACLE _base/oradata directory )
5. Quick Flash Back zone configuration, set the flash back area size ( set to 20G here , the actual environment should be set enough), and open the archive log
6. SGA and PGA memory Settings ( default used here )
Character Set Configuration ( in the current step )
7. Database storage related configuration ( tablespace, archive log size configuration )
Table Space allocation
Sysaux |
1G |
system |
2g |
temp |
1g |
UNDOTABS1 |
4g |
USERS |
500M |
Archive log
Here you create 4 sets of archive logs of size 500M, and the backup archive log size created later should be the same as here
8. last step, select [Finish]
Wait for installation to complete
8. Wait until the database installation is complete to see if the listener is healthy
[[Email protected] admin]$ lsnrctl status lsnrctl for linux: version 11.2.0.1.0 - Production on 22-MAR-2018 17:23:56 Copyright (c) 1991, 2009, oracle. all rights reserved. connecting to ( Description= (address= (protocol=tcp) (HOST=HMDB11DG-DB1) (port=1521)) status of the LISTENER------------------------alias LISTENERVersion tnslsnr for linux: Version 11.2.0.1.0 - ProductionStart Date 22-MAR-2018 17:21:43Uptime 0 days 0 hr. 2 min. 14 sectrace level offsecurity ON: Local OS AuthenticationSNMP offlistener parameter file /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.oralistener log file /u01/app/oracle/diag/tnslsnr/hmdb11dg-db1/ listener/alert/log.xmllistening endpoints summary... (description= (ADDRESS= (PROTOCOL=TCP) (HOST=HMDB11DG-DB1) (port=1521))) Services summary ... service "HMDG" has 1 instance (s) . instance "HMDG ", status ready, has 1 handler (s) for this service ... service "Hmdgxdb" has 1 instance (s) . instance "HMDG", status Ready, has 1 handler (s) for this service ... The command completed successfully
Now that the primary database instance has been created, the configuration of the physical standby database is next (next article)
ORACLE11G Data Guard Physical standby Database Setup and configuration (part 1th creation of the primary database instance)