Oracle Dg configuration process

Chapter One: Dg theory about
Data Guard (abbreviation: Dg) is a tool oracle high-availability system. Dg to provide the data protection redundant data, the log Dg synchronization mechanism to ensure that the primary and redundant data before the data synchronization, the synchronization may be real-time, delay, synchronous, asynchronous forms. Dg commonly used in high availability and remote disaster recovery programs in small businesses. Dg read-only queries may be performed on a standby machine, thereby dispersing performance pressure primary database.
Dg in the environment, there are at least two databases, one in the open state to provide services, the database is called the primary database. The second is in the recovery state, called the standby database. Primary database runtime services provide external user performs an operation on the primary database, the operation is recorded in the online and archive logs, these logs transmitted over the network to the standby database. This log will repeat itself on a standby database, enabling data primary database and standby database synchronization.

Chapter: Dg architecture
Dg architecture can be functionally divided into three parts:
1) the log transmission (Send the redo)
2) log received (the receive the redo)
. 3) Log application (Apply the redo)
1, the transmission log:
Process of the database operation Primary It will produce a steady stream of redo logs that need to be sent to the standby database. This action can be done by sending the primary database LGWR or ARCH process, different archiving destination can use different methods, but for a destination, can only choose one method. Select which process is very different from the availability of protection and database system
1) using the ARCH process:
Primary Database continues to generate redo log, these logs are written to the online log LGWR process;
when a group online log is full, the log will happen handover and triggers local archive;
after completion of the local archive, online log can be covered reused;
the ARCH process sends the log file to the RFS process standby database by NET;
RFS process Standby database end of the received log writes archive log;
MRP process ends Standby database processes or application of these LSP logs in standby database, and thus synchronization data.
2) Use the LGWR process:
Log Primary database generated simultaneously written to a log file and network. That LGWR process of writing to a local log file but also sent to the local LNSn process, then the logs sent by LNSn process through the network to remote destinations;
LGWR must wait for the write operation to a local log file and sent through the network successfully LNSn process, the transaction can only be submitted on the primary database;
log switch Standby database will trigger log switch on the standby database, standby database and archive of standby redo_log then triggers the MRP or LSP standby database archive log recovery process.
2, journal receiver:
RFS process receives the Standby database logs, the log is written to put the archived log or standby redo log files, which file specific written, depending on the location of the log shipping way primary and standby database of. If the file is written to standby redo log, when the primary database log switch occurs, will trigger standby on the standby database redo log of the log switch, and this standby redo log archiving. If you wrote archived log, then this action itself can be seen as an archive operation.
3. Application Log:
Log application services, is a repeat primary database logs on the standby database, enabling data from two databases in sync.
Chapter III: Dg configuration process
1, the first set to force the source library archive mode:
access to the database through sqlplus / AS sysdba
Oracle Dg configuration process
2, source library archive mode is set to the current time to establish a database instance has been set.
Oracle Dg configuration process
3, the source repository, add the following parameters associated with dg added after the completion of all database instances restart:
Oracle Dg configuration process
Oracle Dg configuration process
Oracle Dg configuration process
Oracle Dg configuration process
Oracle Dg configuration process
Oracle Dg configuration process
Oracle Dg configuration process
Oracle Dg configuration process
Oracle Dg configuration process
Oracle Dg configuration process

4、查看logfile(每个为500M)和创建standby_logfile
Oracle Dg configuration process
Oracle Dg configuration process
Oracle Dg configuration process
Oracle Dg configuration process
Oracle Dg configuration process
Oracle Dg configuration process
5、Rman备份整个源库,备份完成后将备份文件复制到源库对应目录
Oracle Dg configuration process
Oracle Dg configuration process
6、创建standby库的pfile,(该过程从源库中备份过去并进行相关的修改)
Oracle Dg configuration process
Oracle Dg configuration process
7、修改后的参数如下:
Oracle Dg configuration process
Oracle Dg configuration process
8、修改源库的tnsname.ora,同时复制到目标库对应位置。
Oracle Dg configuration process
9、dg服务器上创建所需的目录:
oracle下:
mkdir -p /u01/app/oracle/admin/easdb_dg/adump
mkdir -p /oradata/easdb_dg/controlfile/
mkdir -p /oradata/easdb_dg/standbylog/
mkdir -p /oradata/easdb_dg/onlinelog/
mkdir -p /u01/app/oracle/diag/rdbms/easdb_dg/oem/trace/cdump
root下:
mkdir /backup
chown oracle:oinstall /backup
Oracle Dg configuration process
Oracle Dg configuration process
Oracle Dg configuration process
10、统一源和目标库的密码:
Oracle Dg configuration process
Oracle Dg configuration process
11、Dg库nomount启动
Oracle Dg configuration process

12, Source and Sink: rman establish dataguard database
RMAN target / Auxiliary SYS / kingdee123 @ easdb_dg
DUPLICATE the TARGET DATABASE the FOR STANDBY NOFILENAMECHECK;
Oracle Dg configuration process
13, after the restoration is complete, will create pfile file target library currently used for the current spfile, then start the database to mount model
Oracle Dg configuration process
14, the target library to log recovery mode
Oracle Dg configuration process

We're done!

Guess you like

Origin blog.51cto.com/12777507/2402737
Recommended