OracleDB

[오라클 Admin] Oracle 초기 설정 (EM 사용 중지) 본문

Oracle/Oracle Admin

[오라클 Admin] Oracle 초기 설정 (EM 사용 중지)

마포김선생 2023. 12. 8. 10:11

Oracle 19c 기초 설정 (EM Disable 방법)

 

작업 환경:
OS: Oracle Linux 8.9
DB: Oracle 19c

 

Oracle EM(Enterprise Manager)

- Oracle을 기본 설치로 진행하면 EM이 자동으로 시작됩니다.

- EM은 WEB에서 DB 상태 모니터링하거나 관리할 때 사용합니다.

- 정보 보안 측면 위험 요소가 높기 때문에 가급적 사용 안 하는 걸 추천

- EM 기본 포트: 5500

 

 

 

EM 사용 여부 확인 방법

- lsnrctl status (리스너 상태 정보 확인)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[oracle@db ~]$ lsnrctl status
 
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 08-DEC-2023 09:23:47
 
Copyright (c) 19912023, Oracle.  All rights reserved.
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                08-DEC-2023 09:22:51
Uptime                    0 days 0 hr. 0 min. 55 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /oracle/app/oracle/product/19.0.0.0/db_1/network/admin/listener.ora
Listener Log File         /oracle/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db.testserver)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=test.testserver)(PORT=5500))(Security=(my_wallet_directory=/oracle/app/oracle/admin/TEST/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "TEST" has 1 instance(s).
  Instance "TEST", status READY, has 1 handler(s) for this service...
Service "TESTDB" has 1 instance(s).
  Instance "TEST", status READY, has 1 handler(s) for this service...
The command completed successfully

 

 

EM 사용 중지

- lsnrctl status (리스너 상태 정보 확인)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
-- sqlplus / as sysdba 실행
SQL> -- EM Disable
EXEC dbms_xdb_config.sethttpsport(0);
 
PL/SQL procedure successfully completed.
 
SQL> -- EM 중지 확인(Port 0)
SELECT dbms_xdb_config.getHttpsPort() port_number FROM DUAL;
 
PORT_NUMBER
-----------
          0
 
 
 
-- Linux 실행(oracle)
[oracle@db ~]$ lsnrctl status
 
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 08-DEC-2023 10:00:47
 
Copyright (c) 19912023, Oracle.  All rights reserved.
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                08-DEC-2023 09:22:51
Uptime                    0 days 0 hr. 37 min. 55 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /oracle/app/oracle/product/19.0.0.0/db_1/network/admin/listener.ora
Listener Log File         /oracle/app/oracle/diag/tnslsnr/macdb1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db.testserver)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "TEST" has 1 instance(s).
  Instance "TEST", status READY, has 1 handler(s) for this service...
Service "TESTXDB" has 1 instance(s).
  Instance "TEST", status READY, has 1 handler(s) for this service...
The command completed successfully

 

 

EM 원복

1
2
3
4
5
6
7
8
9
10
11
SQL> -- EM Enable
exec dbms_xdb_config.sethttpsport(5500);
 
PL/SQL procedure successfully completed.
 
SQL> -- EM 원복 확인(Port 5500)
SELECT dbms_xdb_config.getHttpsPort() port_number FROM DUAL;
 
PORT_NUMBER
-----------
       5500