Listener 위치 에서 변경 작업 진행
[oracle1@oracle admin]$ pwd
/u01/app/oracle/product/11.2.0.4/db_1/network/admin
[oracle1@oracle admin]$ sqlplus / as sysdba
방법 ① 기본 포트가 아닌 다른 포트를 이용해서 동적 서비스를 등록하는 방법
#1) local_listener 확인
SQL> show parameter local_listener
#2) 초기 파라미터 테이블 확인(동적 vs 정적) : issys_modifiable 컬럼 확인. 동적 파라미터
SELECT * FROM v$parameter WHERE NAME = 'local_listener';
#3) PORT=1522 변경
SQL> alter system set local_listener = '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oracle)(PORT = 1522)))';
#4) 변경 되었는지 확인
SQL> show parameter local_listener
#5) listener 상태 확인
[oracle1@oracle admin]$ lsnrctl status
# PORT 변경 방법 순서
#1) [oracle1@oracle admin]$ lsnrctl stop
#2) [oracle1@oracle admin]$ vi listener.ora ( vi 편집기 -> port 변경 )
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.108)(PORT = 1522) : 변경
#3) [oracle1@oracle admin]$ lsnrctl start
#4) [oracle1@oracle admin]$ sqlplus / as sysdba
#5) SQL> show parameter local_listener
#6) SQL> alter system set local_listener = '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oracle)(PORT = 1522)))';
#7) SQL> !
#8) [oracle1@oracle admin]$ lsnrctl status
# PORT=1521 로 원위치
#1) SQL> alter system set local_listener = '';
#2) SQL> show parameter local_listener
#3) [oracle1@oracle admin]$ vi listener.ora ( vi 편집기 -> port 변경 )
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.108)(PORT = 1521) : 변경
#4) [oracle1@oracle admin]$ lsnrctl stop
#5) [oracle1@oracle admin]$ lsnrctl start
#6) [oracle1@oracle admin]$ lsnrctl status
방법2) 기본 포트가 아닌 다른 포트를 이용해서 동적 서비스를 등록하는 방법
#1) [oracle1@oracle admin]$ lsnrctl stop
#2) [oracle1@oracle admin]$ vi listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle)(PORT = 1522))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
#3) [oracle1@oracle admin]$ vi tnsnames.ora
tnsnames.ora : client 용
ORA11G =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora11g)
)
)
LISTENER = (ADDRESS = (PROTOCOL = TCP)(HOST = oracle)(PORT = 1522)) <- 추가
#4) [oracle1@oracle admin]$ sqlplus / as sysdba
#5) SQL> alter system set local_listener = 'LISTENER';
System altered.
#6) SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string LISTENER
#7) [oracle1@oracle admin]$ lsnrctl start
#8) [oracle1@oracle admin]$ lsnrctl status
#) 기본포트(1521)로 설정
SQL> show user
USER is "SYS"
#1) SQL> alter system set local_listener = '';
System altered.
#2) SQL> show parameter local_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string
#3) SQL> !
#4) [oracle1@oracle admin]$ vi listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
#4) [oracle1@oracle admin]$ lsnrctl stop
#5) [oracle1@oracle admin]$ lsnrctl start
#6) [oracle1@oracle admin]$ lsnrctl status
#) HOST = IP 주소 적용
[oracle1@oracle admin]$ vi listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.108)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
[oracle1@oracle admin]$ lsnrctl stop
[oracle1@oracle admin]$ lsnrctl start
[oracle1@oracle admin]$ lsnrctl status
'Data Base > Linux' 카테고리의 다른 글
240105 Architecture_ Client - Server 환경, Database Link (0) | 2024.01.05 |
---|---|
240105 Oracle DB Linux _ Static Service 등록 (0) | 2024.01.05 |
240104 Oracle DB Linux_Oracle Network (2) | 2024.01.04 |
240104 Oralce DB Linux _ SQL LOADER (0) | 2024.01.04 |
240103 Oracle DB Liunx_데이터 이관 작업 순서(연습) (0) | 2024.01.04 |