각 cdb와 pdb에서 local_listener가 null(default) 상태인 것을 확인. |
SQL> show parameter local_listener
NAME TYPE VALUE ------------------------------------ ---------------------- ------------------------------ local_listener string
SQL> alter session set container=PDB1 ;
Session altered.
SQL> show parameter local_listener
NAME TYPE VALUE ------------------------------------ ---------------------- ------------------------------ local_listener string |
LISTENER가 생성되지 않은 상태임을 확인. |
oracle@orcl:PDB1:/home/oracle $ cd $ORACLE_HOME/network/admin oracle@orcl:PDB1:/u01/app/oracle/product/19.0.0.0/dbhome_1/network/admin $ ls afiedt.buf samples shrept.lst oracle@orcl:PDB1:/u01/app/oracle/product/19.0.0.0/dbhome_1/network/admin $ oracle@orcl:PDB1:/u01/app/oracle/product/19.0.0.0/dbhome_1/network/admin $ lsnrctl start
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-JUN-2021 23:15:06
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Starting /u01/app/oracle/product/19.0.0.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 19.0.0.0.0 - Production Log messages written to /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 15-JUN-2021 23:15:06 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))) The listener supports no services The command completed successfully |
※ LISTENER 필수 파일 listener.ora가 생성되지 않았음에도 LISTENER 기동 가능.
alter system register로 default LISTENER에 서비스가 등록된 것을 확인. |
SQL> alter system register ;
System altered.
SQL> exit Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0
oracle@orcl:PDB1:/u01/app/oracle/product/19.0.0.0/dbhome_1/network/admin $ lsnrctl status
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-JUN-2021 23:15:46
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production Start Date 15-JUN-2021 23:15:06 Uptime 0 days 0 hr. 0 min. 39 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))) Services Summary... Service "c444a9d018355ea5e055000000000001" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... Service "c44502fff0f4715ee055000000000001" has 1 instance(s). Instance "orcl", status READY, has 2 handler(s) for this service... Service "c445052cfe95723be055000000000001" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... Service "orcl" has 1 instance(s). Instance "orcl", status READY, 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 "pdb1" has 1 instance(s). Instance "orcl", status READY, has 2 handler(s) for this service... Service "pdb2" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... The command completed successfully |
※ Service가 "c4..." 등의 16진수 값으로 보이는 부분은 본 DB는 Multitenant 환경이기 때문에, "DBA_PDBS" or "CDB_PDBS" 딕셔너리의 GUID 컬럼에 기재되는 PDB의 GUID가 자동 등록된 것이다. ※ status READY 로 표시된다면 동적으로 서비스에 등록되었다는 뜻이다.
정상 접속 확인 |
sqloracle@orcl:PDB1:/u01/app/oracle/product/19.0.0.0/dbhome_1/network/admin $ sqlplus pdbadmin@pdb1
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Jun 15 23:22:01 2021 Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Enter password: Last Successful login time: Tue Jun 15 2021 23:21:36 -04:00
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0
SQL> show user; USER is "PDBADMIN" SQL> show con_name
CON_NAME ------------------------------ PDB1 |
|