[12c] DataGuard builds physical standby database (Cloud Control mode)

How to Building physical standby database by RMAN Duplicate , this article will demonstrate how to use Cloud Control to ...
2.1 network configuration
2.2 creating a standby database through the graphical interface
2.3 completion and verification

How to Building physical standby database by RMAN Duplicate , this article will demonstrate how to use Cloud Control to build a physical standby database.

1 software environment
  • Oracle Linux 6.9
  • Oracle 12.1.0.2
  • Oracle Enterprise Management Cloud Control 12.1.0.4
  • Main library: odd.oracle.com ,IP: 192.168.1.105
  • Standby: even.oracle.com ,IP: 192.168.1.106
2 use Cloud Control to create a backup Library

2.1 network configuration

2.1.1 main database network configuration

1) Monitor configuration

[oracle@odd admin]$ cat listener.ora # listener.ora Network Configuration File: /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ORCL) (ORACLE_HOME = /u01/app/oracle/product/12.1.0/dbhome_1) (SID_NAME = ORCL) ) ) LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = odd.oracle.com)(PORT = 1521)) ) ADR_BASE_LISTENER = /u01/app/oracle

2) TNS configuration

[oracle@odd admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. TNS_ODD = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.105)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORCL) ) ) TNS_EVEN = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.106)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORCLDG) ) )

2.1.2 standby network configuration

1) Monitor configuration

[oracle@even admin]$ cat listener.ora # listener.ora Network Configuration File: /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ORCLDG) (ORACLE_HOME = /u01/app/oracle/product/12.1.0/dbhome_1) (SID_NAME = ORCLDG) ) ) LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = even.oracle.com)(PORT = 1521)) ) ADR_BASE_LISTENER = /u01/app/oracle

2) TNS configuration

[oracle@even admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. TNS_ODD = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.105)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORCL) ) ) TNS_EVEN = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.106)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORCLDG) ) )

2.1.3 test network

1) Main library test

[oracle@odd ~]$ tnsping tns_odd [oracle@odd ~]$ tnsping tns_even

2) Standby test

[oracle@even admin]$ tnsping tns_odd [oracle@even admin]$ tnsping tns_even

2.2 creating a standby database through the graphical interface

1) Log in to Cloud Control, enter target > database instance ORCL

2) Enter the user name and password, and click login3) Add standby database, click continue

4) Set the backup type and click Next

5) Backup option, unchecked, click Next

6) On the standby configuration page, click the search button

7) Select the host of the target standby database

8) After filling in the standby database information, click Next

9) Select the location of the standby database file as OFA, and click Customize

10) Check all file paths, make sure ORCL is replaced with ORCLDG, and click OK

11) Warning appears, click continue

12) Go back to the file location configuration page and click Next

13) On the standby configuration page, change the standby parameters and click next

14) Add the backup database review page. If there is no problem, click finish

15) Click the check job link

16) During operation

17) On the Oracle Database > job activity page, you can see that a standby database is being created

2.3 completion and verification

2.3.1 main warehouse operation

1) Querying the role information of the main database

SQL> select name,open_mode,database_role,db_unique_name,dataguard_broker from v$database; NAME OPEN_MODE DATABASE_ROLE DB_UNIQUE_NAME DATAGUAR --------- -------------------- ---------------- ------------------------------ -------- ORCL READ WRITE PRIMARY ORCL ENABLED

2) Create test data

SQL> create table scott.test(id number,name varchar2(100)); Table created. SQL> insert into scott.test values(1,'Alen'); 1 row created. SQL> commit; Commit complete.

3) query data

SQL> select * from scott.test; ID NAME ---------- ---------------------------------------------------------------------------------------------------- 1 Alen

2.3.2 standby operation

1) Querying the role information of the main database

SQL> select name,open_mode,database_role,db_unique_name,dataguard_broker from v$database; NAME OPEN_MODE DATABASE_ROLE DB_UNIQUE_NAME DATAGUAR --------- -------------------- ---------------- ------------------------------ -------- ORCL READ ONLY WITH APPLY PHYSICAL STANDBY ORCLDG ENABLED

2) query data

SQL> select * from scott.test; ID NAME ---------- ---------------------------------------------------------------------------------------------------- 1 Alen

To sum up, the whole process of building a physical standby database with Cloud Control

27 May 2020, 07:50 | Views: 8560

Add new comment

For adding a comment, please log in
or create account

0 comments