Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Construction of Oracle 11g DG under Linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Environment: simulate the creation of the main library using install option in the graphical interface options launched by DBCA-> Select create and configure a database

The creation of the simulation standby library uses install option in the graphical interface options launched by DBCA-> Select install database software only

Preparation uses the RMAN function of Oracle 11g to clone the database (database cloning ensures that the primary and standby libraries are identical in software)

Main Library (porcl 192.168.1.11)

Modify parameter db_unique_name

Show parameter db_unique_name;alter system set db_unique_name='porcl' scope=spfile;shutdown immediate

Turn on database archiving mode

Startup mountalter database archivelog;alter database open

Configure a static network (here uses the graphical interface of netmgr)

Add database service

Porcl sorcl porcl_DGMGRL

/ u01/app/oracle/11g / u01/app/oracle/11g / u01/app/oracle/11g

Orcl orcl orcl

Restart monitoring

Configure local naming resolution tnsnames.ora

Orcl-> 192.168.1.11

Porcl-> 192.168.1.11

Sorcl-> 192.168.1.10

Create a parameter file

Create pfile from spfile

Copy the parameter file and password file to the standby host

Scp initorcl.ora orapworcl 192.168.1.10:/u01/oracle/11g/dbs/

Increase the database log

Alter database add standby logfile group 10 alter database add standby logfile group 11 alter database add standby logfile group 12 alter database add standby logfile group 13

Reserve Library (sorcl 192.168.1.10)

Configure a static network

Add database service

Porcl sorcl sorcl_DGMGRL

/ u01/app/oracle/11g / u01/app/oracle/11g / u01/app/oracle/11g

Orcl orcl orcl

Restart monitoring

Configure local naming resolution tnsnames.ora

Orcl-> 192.168.1.10

Porcl-> 192.168.1.11

Sorcl-> 192.168.1.10

Modify parameter file (remotely copied initorcl.ora)

Set db_unique_name to sorcl

(delete spfileorcl.ora from the parameter file directory, if any)

Establish the necessary folders

Grep "/ U01" initupdb.oramkdir / u01/oracle/admin/updb/adump / u01/oracle/oradata/updb / u01/oracle/fast_recovery_area/updb-p

Set the environment variable ORACLE_SID

Export ORACLE_SID=orcl

Boot to the nomount state using initorcl.ora

Startup nomount

Generate spfile

Create spfile from pfile

Reboot to nomount state

Startup force nomount

Increase the database log

Alter database add standby logfile group 10 alter database add standby logfile group 11 alter database add standby logfile group 12 alter database add standby logfile group 13

Clone a standby library from the main library

Rman target sys/oracle@pupdb auxiliary sys/oracle@supdbduplicate target database for standby from active database nofilenamecheck;exit

Implement DG

Setting (both main and standby libraries) parameter dg_broker_Start=true

Alter system set dg_broker_Start=true

Use the dgmgrl command to create and take effect a profile

Dgmgrl sys/oracle@pupdbcreate configuration dgc as primary database is pupdb;add database supdb as connect identifier is supdb maintained as physical;enable configuration;show configuration

Possible problems

When using rman to connect to the master / slave database, you are prompted to report an error due to lack of permissions-> error in the network connection between the master library and the slave library. Please re-check the network configuration and local naming resolution.

The show configuration slave prompt warns that there is a problem with the setting of one of the properties of the slave, but there is no problem with the check-> restart the slave.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report