Sei sulla pagina 1di 5

Getting Started with Oracle Enterprise Manager Express

you can use Oracle Enterprise Manager Database Express (EM Express) to manage non-
CDBs, multitenant container databases (CDBs), and pluggable databases (PDBs). EM
Express uses an HTTPS port to connect to and manage non-CDBs, CDBs, and PDBs.

Starting EM Express for a CDB


If you do not know the HTTPS port number for the CDB, go to the root and issue the
following SQL statement, which returns the port that is configured for EM Express:

alter session set container=CDB$ROOT;

Session altered

select dbms_xdb_config.gethttpsport() from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()

------------------------------

5500

If a value of 0 is returned by this statement, it means that an HTTPS port is not configured
for the CDB. In this case, you must manually configure an HTTPS port for this CDB

3.4.3 Starting EM Express for a PDB

To start EM Express for a PDB, ensure that the PDB is open in read/write mode and then try
one of the following methods described in this topic (in the order shown):

1. Connect to the CDB$ROOT container for the CDB that includes the PDB, and issue
the following SQL statement to configure the global port for the CDB:
SQL> exec dbms_xdb_config.setglobalportenabled(TRUE);

PL/SQL procedure successfullsety completed.

2. Then, in a web browser, enter the EM Express URL provided by Database


Configuration Assistant (DBCA) when it configured the CDB that includes the PDB.

By default, the HTTPS port that DBCA configures for a CDB can also be used for the
PDBs in that CDB.

3. When the EM Express login screen appears, specify your administrator credentials
and enter the name of the PDB that you want to connect to in the Container Name
field.
The advantage of using a global port is that you do not need to configure a port for each
PDB. (In a large site, there can be thousands of PDBs.) With a global port, you configure
one port and then set EM Express to point to it. A second advantage is that you do not need
to look up the port number for this PDB; this configuration automatically routes requests to
theIf EM Express does not connect to the PDB, try the next method:

Connect to the PDB that you want to manage (PDB1 in this example) and use the
gethttpsport procedure to determine whether an HTTPS port is configured for EM Express:
SQL> alter session set container=ORCLPDB;
Session altered.

1. select dbms_xdb_config.gethttpsport() from dual;


If a value other than 0 is returned by the gethttpsport procedure, the returned value is
the port that you should use to connect to the PDB using EM Express.
si la consulta da un error puede que la base de datos no este abierta

SQL> select status from v$instance;

STATUS
------------
MOUNTED

SQL> alter pluggable database ORCLPDB open;

Pluggable database altered.


selec
SQL> select status from v$instance;

STATUS
------------
OPEN

SQL> select dbms_xdb_config.gethttpsport() from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
0

2. If 0 is returned by the gethttpsport procedure, then you must manually configure an


HTTPS port for this PDB

To manually configure the HTTPS port for EM Express:

1. Configure and start the Oracle Net Listener (the listener). You can use lsnrctl to start,
stop, and view the status of the listener.
2. If the listener is running on a nonstandard port (for example, not 1521), then the
init.ora file for the database you want to manage using EM Express must contain a
local_listener entry so that the HTTPS port can register with the correct listener. The
local_listener entry references a TNSNAMES entry that points to the correct listener.
For example:
local_listener=inst1

where inst1 is a TNSNAMES entry defined in tnsnames.ora that points to the listener. For
example:

inst1=
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)(PORT=1234))

(CONNECT_DATA=(SERVICE_NAME=service_name)(SERVER=DEDICATED)))

In this example, 1234 is the nonstandard port on which the listener has been
configured to listen.

3. Use the PL/SQL procedure DBMS_XDB_CONFIG.SETHTTPSPORT to set the


HTTPS port for EM Express for the database to a port that is not in use. This will
update the HTTPS port in the xdbconfig.xml file in the Oracle XML DB Repository.
You must connect as SYS / AS SYSDBA to run the procedure.

SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5501);


PL/SQL procedure successfully completed.

Use the following command to confirm that the port has registered with the listener

C:\Windows\system32>lsnrctl status

LSNRCTL for 64-bit Windows: Version 18.0.0.0.0 - Production on 06-


SEP-2019 10:04:18

Copyright (c) 1991, 2018, Oracle. All rights reserved.

Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version
18.0.0.0.0 - Production
Start Date 06-SEP-2019 07:02:05
Uptime 0 days 3 hr. 2 min. 31 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\Oracle18C\network\admin\listener.ora
Listener Log File
C:\app\Oracle18c\diag\tnslsnr\MSEDGEWIN10\listener\alert\log.x
ml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ip
c)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=MSEDGEWIN10)(PORT=5500))(
Security=(my_wallet_directory=C:\APP\ORACLE18C\admin\orcl\xdb_wallet
))(Presentation=HTTP)(Session=RAW))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=MSEDGEWIN10)(PORT=5501))(
Security=(my_wallet_directory=C:\APP\ORACLE18C\admin\orcl\xdb_wallet
))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "552481274f4a4092b1fd5dfe21ee0b84" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this
service...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this
service...
Service "c339ef8b56004da8b1e3b9d7dd26e22c" 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 "orclpdb" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this
service...
The command completed successfully

test URL
https://localhost:5501/em/

Potrebbero piacerti anche