I. Network 설정
1. 서버 Network 설정
A) 서버 정보 hosts 파일 저장
vi /etc/hosts
10.10.50.11 ora_act 10.10.50.21 ora_stb
2. Listener 설정
A) Primary의 listener.ora 파일
vi $ORACLE_HOME/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora-act)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/db_1)
(SID_NAME = orcl)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL_DGB)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/db_1)
(SID_NAME = orcl)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/db_1)
(SID_NAME = orcl)
)
)
ADR_BASE_LISTENER = /u01/app/oracle
[oracle@orcl ~]$ lsnrctl status LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 29-AUG-2018 14:33:05 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora-act)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 29-AUG-2018 14:14:09 Uptime 0 days 0 hr. 18 min. 55 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/12.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/ora-act/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora-act)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Services Summary... Service "73b889aabfcb1c67e0533301000adc78" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... Service "ORCL" has 2 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... Instance "orcl", status READY, has 1 handler(s) for this service... Service "ORCL_DGB" has 2 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... Instance "orcl", status READY, has 1 handler(s) for this service... Service "ORCL_DGMGRL" has 1 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... Service "orclXDB" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... Service "orcl_CFG" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... Service "orclpdb" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... The command completed successfully
B) Standby의 listener.ora 파일
vi $ORACLE_HOME/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora-stb)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORCL_STB)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/db_1)
(SID_NAME = orcl)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL_STB_DGB)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/db_1)
(SID_NAME = orcl)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL_STB_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/db_1)
(SID_NAME = orcl)
)
)
ADR_BASE_LISTENER = /u01/app/oracle
[oracle@orcl ~]$ lsnrctl status LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 29-AUG-2018 14:33:31 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora-stb)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 29-AUG-2018 14:14:53 Uptime 0 days 0 hr. 18 min. 37 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/12.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/ora-stb/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora-stb)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Services Summary... Service "ORCL_STB" has 1 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... Service "ORCL_STB_DGB" has 1 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... Service "ORCL_STB_DGMGRL" has 1 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully
C) tnsnames.ora 파일
vi $ORACLE_HOME/network/admin/tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora-act)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)
ORCL_STB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora-stb)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL_STB)
)
)
[oracle@orcl ~]$ tnsping ORCL TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 29-AUG-2018 14:34:09 Copyright (c) 1997, 2016, Oracle. All rights reserved. Used parameter files: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ora-act)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = ORCL))) OK (10 msec) [oracle@orcl ~]$ tnsping ORCL_STB TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 29-AUG-2018 14:34:16 Copyright (c) 1997, 2016, Oracle. All rights reserved. Used parameter files: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ora-stb)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = ORCL_STB))) OK (0 msec)
D) 리스너 기동
oracle 유저로 실행
lsnrctl start
[oracle@orcl ~]$ lsnrctl start LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 29-AUG-2018 13:31:37 Copyright (c) 1991, 2016, Oracle. All rights reserved. Starting /u01/app/oracle/product/12.2.0/db_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 12.2.0.1.0 - Production System parameter file is /u01/app/oracle/product/12.2.0/db_1/network/admin/listener.ora Log messages written to /u01/app/oracle/diag/tnslsnr/ora-act/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora-act)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora-act)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 29-AUG-2018 13:31:37 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/12.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/ora-act/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora-act)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Services Summary... Service "ORCL" has 1 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... Service "ORCL_DGB" has 1 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... Service "ORCL_DGMGRL" has 1 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully
[oracle@orcl ~]$ lsnrctl start LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 29-AUG-2018 13:31:41 Copyright (c) 1991, 2016, Oracle. All rights reserved. Starting /u01/app/oracle/product/12.2.0/db_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 12.2.0.1.0 - Production System parameter file is /u01/app/oracle/product/12.2.0/db_1/network/admin/listener.ora Log messages written to /u01/app/oracle/diag/tnslsnr/ora-stb/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora-stb)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora-stb)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 29-AUG-2018 13:31:41 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/12.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/ora-stb/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora-stb)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Services Summary... Service "ORCL_STB" has 1 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... Service "ORCL_STB_DGB" has 1 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... Service "ORCL_STB_DGMGRL" has 1 instance(s). Instance "orcl", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully