The entire process of creating Oracle 10g data guard

Source: Internet
Author: User

Environment
On servers 192.168.1.89 and 90, the operating system is linux Red Hat as 5.2, Oracle 10.2.0.4 is installed, and a single instance database webdb is created respectively.
Configure the Data Guard environment with the webdb Of the 89 database as the master database and the slave database of the 90 database as the backup database.

Procedure for creating data guard physical standby
 
 
1. Create an operating system user oratt on

Useradd-m-u 1131-g oinstall-G dba, role, asmdba-d/home/oratt-s/bin/bash-c "Oracle Software Owner" oratt

2. Set the. bash_profile File

If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi
Alias ls = "ls-FA"
ORACLE_SID = webdb; export ORACLE_SID
ORACLE_UNQNAME = webdb; export ORACLE_UNQNAME
JAVA_HOME =/usr/local/java; export JAVA_HOME
ORACLE_BASE =/u01/app/oratt; export ORACLE_BASE
ORACLE_HOME = $ ORACLE_BASE/product/10.2.0/dbhome_1; export ORACLE_HOME
ORACLE_OMS_HOME = $ ORACLE_BASE/oms; export ORACLE_OMS_HOME
ORACLE_PATH =/u01/app/common/oracle/SQL; export ORACLE_PATH
ASM_HOME =/u01/app/11.2.0.3/grid; export ASM_HOME
ORACLE_TERM = xterm; export ORACLE_TERM
NLS_DATE_FORMAT = "YYYY-MM-DD HH24: MI: SS"; export NLS_DATE_FORMAT
TNS_ADMIN = $ ORACLE_HOME/network/admin; export TNS_ADMIN
ORA_NLS11 = $ ORACLE_HOME/nls/data; export ORA_NLS11
PATH =. :$ {JAVA_HOME}/bin :$ {PATH }:$ HOME/bin: $ ORACLE_HOME/bin
PATH =$ {PATH }:/ usr/bin:/usr/bin/X11:/usr/local/bin
PATH =$ {PATH}:/u01/app/common/oracle/bin
PATH =$ {PATH}:/u01/app/grid/bin
PATH = $ ORACLE_OMS_HOME/agent11g/bin: $ {PATH}
Export PATH

LD_LIBRARY_PATH = $ ORACLE_HOME/lib
LD_LIBRARY_PATH =$ {LD_LIBRARY_PATH}: $ ORACLE_HOME/mongom/lib
LD_LIBRARY_PATH =$ {LD_LIBRARY_PATH}:/lib:/usr/local/lib
Export LD_LIBRARY_PATH

CLASSPATH = $ ORACLE_HOME/JRE
CLASSPATH =$ {CLASSPATH}: $ ORACLE_HOME/jlib
CLASSPATH =$ {CLASSPATH}: $ ORACLE_HOME/rdbms/jlib
CLASSPATH =$ {CLASSPATH}: $ ORACLE_HOME/network/jlib
Export CLASSPATH

THREADS_FLAG = native; export THREADS_FLAG
Export TEMP =/tmp
Export TMPDIR =/tmp
Export LC_ALL = en

PS1 = "\ u @ 'hostname': \$ {PWD }=>\$ {ORACLE_SID} \ $"
Umask 022

3. Create the directory space used by the new user
Mkdir-p/u01/app/oratt
Chown-R oratt: oinstall/u01/app/oratt
Chmod-R 755/u01/app/oratt

Directory/u01/app/oratt is used as the oracle base to install the oracle rdbms system file.

4. Install Oracle
Install oracle rdbms on the two servers respectively. The installation directory remains the same.
The initial installation version is 10.2.0.1 and then upgraded to 10.2.0.4. There is no database, so you can directly install the upgrade package.

5. Create a database
Create a database webdb on server 89 as the master database. If a database already exists and needs to be used as the master database of data guard, you do not need to create a new database.

Create a database webdb on the 90 server as the slave database. The purpose of creating a standby database is to build a database environment, including the creation of dump directories, password files, and spfile files. The sys password of the slave database is the same as that of the master database, so that the new password file is directly the same as that of the master database. If you do not know the sys password of the master database, copy the password file of the master database to the slave database.

The creation operation is completed using the graphical tool dbca.


6. Brief Introduction to data guard

Oracle 10g data guard uses arch or lgwr to continuously transmit the logs generated in the master database to the slave database, and then the slave database system continuously transmits the logs that are passed in by applications, this allows near real-time data synchronization between the two databases.
When a physical fault occurs in the master database, such as an operating system down or disk damage, you can switch the backup database to the master database to minimize data loss and Database Availability, thus, a remote disaster recovery mechanism is implemented.

  • 1
  • 2
  • 3
  • 4
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.