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

Oracle 12C Rac to Rac to build ADG

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

Share

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

1. Environmental introduction

Build a set of ADG disaster recovery environment. The main library environment is 12.1.2.0 RAC, the standby library is the same as the main library, and software patches have been installed.

2. Configuration steps

2.1 Archiving

Select log_mode from vault database; # whether it is archiving mode alter database force logging; # mandatory archiving

2.2 main library standby log

Alter database add standby logfile thread 1 group 5 ('+ DATADG') size 2048M alter database add standby logfile thread 1 group 6 ('+ DATADG') size 2048M alter database add standby logfile thread 1 group 7 ('+ DATADG') size 2048M alter database add standby logfile thread 1 group 8 ('+ DATADG') size 2048M alter database add standby logfile thread 1 group 9 ('+ DATADG') size 2048M alter database add standby logfile thread 1 group 10 ('+ DATADG') size 2048M alter database add standby logfile thread 2 group 11 ('+ DATADG') size 2048m Alter database add standby logfile thread 2 group 12 ('+ DATADG') size 2048M alter database add standby logfile thread 2 group 13 ('+ DATADG') size 2048M alter database add standby logfile thread 2 group 14 ('+ DATADG') size 2048M alter database add standby logfile thread 2 group 15 ('+ DATADG') size 2048M alter database add standby logfile thread 2 group 16 ('+ DATADG') size 2048M

3. Files

3.1 password file

Copy the password file of the master library to the slave database, and initially put it in the $ORACLE_HOME/dbs directory. After the subsequent configuration is completed, you need to store the password file in the ASM disk group and rename it. Scp orapwbmacdb IP: $ORACLE_HOME/dbs1 ASMCMD > pwcopy / u01/app/oracle/product/12.1.0/dbhome_1/dbs/orapwbmacdb1 + datadg/bmacdbdg/password/orapwbmacdbcopying / u01/app/oracle/product/12.1.0/dbhome_1/dbs/orapwbmacdb1-> + datadg/bmacdbdg/password/orapwbmacdb

3.2 Parameter Fil

Copy the parameter file of the master library to the slave library and put it in the $ORACLE_HOME/dbs directory. After the recovery is complete, you need to store the parameter file in the ASM disk group and specify its location through pfile. The content of the parameter file is as follows: * .audit _ file_dest='/u01/app/oracle/admin/bmacdb/adump'*.control_files='+DATADG/BMACDB/control01.ctl','+DATADG/BMACDB/control02.ctl'*.db_file_name_convert='+DATADG/BMACDB/DATAFILE/','+DATADG/BMACDB/DATAFILE/','+SSDDG/BMACDB/DATAFILE/','+DATADG/BMACDB/DATAFILE/','+DATADG/bmacdb/' '+ DATADG/BMACDB/DATAFILE/'*.db_unique_name='bmacdbdg'*.log_archive_config='DG_CONFIG= (bmacdb,bmacdbdg)' * .log _ archive_dest_1='LOCATION=+ARCHDG VALID_FOR= (ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=bmacdbdg'*.log_archive_dest_2='SERVICE=BMACDB1 ASYNC VALID_FOR= (ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=BMACDB'*.log_file_name_convert='+SSDDG/bmacdb/' We need to modify the above parameters of'+ LOGDG/BMACDB/ONLINELOG/'*.fal_server='BMACDB''.

3.3 Directory structure

After mkdir-p / u01/app/oracle/admin/bmacdb/adumpASM:+DATADG/BMACDB/DATAFILE+LOGDG/BMACDB/ONLINELOG has created the directory structure, start the database to the nomount state. Startup nomount

3.4 configure snooping

In the initial stage of configuring ADG, you need to register and listen in the slave database. After the construction is completed, you can delete the static registration information. Static registration information is as follows: / u01/app/12.1.0/grid/network/admin/listener.oraSID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = bmacdbdg) (ORACLE_HOME = / u01/app/oracle/product/12.1.0/dbhome_1) (SID_NAME = bmacdb1)) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL)) = IPC) (KEY = LISTENER)) (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = IP address) (PORT = 1521) start listening after configuring it The static monitoring information is as follows: Service "bmacdbdg" has 1 instance (s). Instance "bmacdb1", status UNKNOWN, has 1 handler (s) for this service... Connection string configuration of the main library tnsnames.ora adds a connection string from the main library to the standby library, and adds it to both nodes of the RAC: BMACDBDG = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = IP address) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = bmacdbdg)) after the configuration is completed Connectivity test: sqlplus sys/password@BMACDBDG as sysdbaSQL*Plus: Release 12.1.0.2.0 Production on Tue Jun 18 14:28:16 2019Copyright (c) 1982, 2014, Oracle. All rights reserved. Slave connection string configuration A connection string is added from the standby library to the main library, and the connection string is added to both nodes of the RAC: BMACDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = IP address) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = bmacdb)) after the configuration is completed Connectivity test: sqlplus sys/password@BMACDB as sysdbaSQL*Plus: Release 12.1.0.2.0 Production on Tue Jun 18 14:29:29 2019Copyright (c) 1982, 2014, Oracle. All rights reserved.

4. Restore the reserve database

Source / home/oracle/.profile rman target sys/password@BMACDB auxiliary sys/password@BMACDBDG cd $ORACLE_HOME/dbsoracle@bmacdrdb1:/u01/app/oracle/product/12.1.0/dbhome_1/dbs > cat initbmacdb1.oraspfile ='+ datadg/bmacdbdg/spfilebmacdb.ora'

7. Add resources to the library RAC

Srvctl add database-db bmacdbdg-dbname bmacdb-oraclehome / u01/app/oracle/product/12.1.0/dbhome_1-dbtype RAC-role PHYSICAL_STANDBYsrvctl add instance-db bmacdbdg-instance bmacdb1-node bmacdrdb1 srvctl add instance-db bmacdbdg-instance bmacdb2-node bmacdrdb2 srvctl modify database-db bmacdbdg-spfile'+ datadg/bmacdbdg/spfilebmacdb.ora'-pwfile'+ datadg/bmacdbdg/password/orapwbmacdb'srvctl modify database-db bmacdbdg-diskgroup DATADG LOGDG slave repository configuration information: oracle@bmacdrdb1:/home/oracle > srvctl config database-d bmacdbdgDatabase unique name: bmacdbdgDatabase name: bmacdbOracle home: / u01/app/oracle/product/12.1.0/dbhome_1Oracle user: oracleSpfile: + datadg/bmacdbdg/spfilebmacdb.oraPassword file: + datadg/bmacdbdg/password/orapwbmacdbDomain: Start options: openStop options: immediateDatabase role: PHYSICAL_STANDBYManagement policy: AUTOMATICServer pools: Disk Groups: DATADG,LOGDGMount point paths: Services: Type: RACStart concurrency: Stop concurrency: OSDBA group: dbaOSOPER group: operDatabase instances: bmacdb1,bmacdb2Configured nodes: bmacdrdb1,bmacdrdb2Database is administrator managed

8. Application log

Alter database recover managed standby database disconnect from session;alter database recover managed standby database cancel;alter database open;alter database recover managed standby database using current logfile disconnect;select open_Mode,DATABASE_ROLE from vested database: open mode DATABASE_ROLE--READ ONLY WITH APPLY PHYSICAL STANDBY

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