Tuesday, June 3, 2014

1z0-060 Upgrade to Oracle Database 12c - Use EM Express

Oracle Enterprise Manager Database Express (EM Express) is a web-based database management tool that is built inside the Oracle Database. It supports key performance management and basic database administration functions. From an architectural perspective, EM Express has no mid-tier or middleware components, ensuring that its overhead on the database server is negligible.

Using EM Express, you can perform administrative tasks such as managing user security and managing database memory and storage. You can also view performance and information about your database.

Enterprise Manager Database Control is no longer available in Oracle Database 12c. You can use Enterprise Manager Cloud Control 12c or Enterprise Manager Database Express 12c to manage your Oracle Database 12c databases.

SQL> select dbms_xdb_config.gethttpsport() from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
                          5500

SQL>  select dbms_xdb_config.gethttpport() from dual;

DBMS_XDB_CONFIG.GETHTTPPORT()
-----------------------------
                         8080

SQL>  select value from v$parameter where name='dispatchers';

VALUE
--------------------------------------------------------------------------------
(PROTOCOL=TCP) (SERVICE=orclXDB)

 

SQL> select value from v$parameter where name='local_listener';

VALUE
--------------------------------------------------------------------------------
LISTENER_ORCL


SQL> ! tnsping LISTENER_ORCL

TNS Ping Utility for Solaris: Version 12.1.0.1.0 - Production on 04-JUN-2014 05:31:14

Copyright (c) 1997, 2013, Oracle.  All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (ADDRESS = (PROTOCOL = TCP)(HOST = solaris)(PORT = 1521))
OK (80 msec)

SQL> ! lsnrctl status

LSNRCTL for Solaris: Version 12.1.0.1.0 - Production on 04-JUN-2014 05:24:12

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=solaris)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Solaris: Version 12.1.0.1.0 - Production
Start Date                04-JUN-2014 04:46:56
Uptime                    0 days 0 hr. 37 min. 15 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/solaris/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=solaris)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=solaris)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=solaris)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
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...
The command completed successfully

http://192.168.56.201:8080/em/

image


https://192.168.56.201:5500/em/


image 


Use the PL/SQL procedure DBMS_XDB_CONFIG.SETHTTPSPORT to set the HTTPS port for EM Express. This will update the HTTPS port in thexdbconfig.xml file in the Oracle XML DB Repository. You must connect as SYS / AS SYSDBA to run the procedure. For example:

SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5500);

As a database administrator, you can log in to EM Express with the SYS or SYSTEM user account to perform administrative and other tasks. Nonadministrative users may also want to log in to EM Express.


For nonadministrative users to have access to EM Express, they must be granted the EM_EXPRESS_BASIC or the EM_EXPRESS_ALL role.


The EM_EXPRESS_BASIC role enables users to connect to EM Express and to view the pages in read-only mode. The EM_EXPRESS_BASIC role includes the SELECT_CATALOG_ROLE role.


The EM_EXPRESS_ALL role enables users to connect to EM Express and use all the functionality provided by EM Express (read/write access to all EM Express features). The EM_EXPRESS_ALL role includes the EM_EXPRESS_BASIC role.


SQL> select  'Privilege' type, privilege from dba_sys_privs where grantee='&grantee'
  2  union all
  3  select  'Role' type, granted_role from dba_role_privs where grantee='&&grantee'
  4  union all
  5  select  'Object' type, owner||'.'||table_name||'('||privilege||')' from dba_tab_privs where grantee='&&grantee'
  6  order by 1,2;

TYPE       PRIVILEGE
---------- ----------------------------------------------------------------------
Object     SYS.DBMS_PERF(EXECUTE)
Object     SYS.PRVTEMX_ADMIN(EXECUTE)
Object     SYS.V_$DIAG_INCIDENT(SELECT)
Privilege  CREATE SESSION
Privilege  EM EXPRESS CONNECT
Role       SELECT_CATALOG_ROLE

SQL> select  'Privilege' type, privilege from dba_sys_privs where grantee='&&grantee'
  2  union all
  3  select  'Role' type, granted_role from dba_role_privs where grantee='&&grantee'
  4  union all
  5  select  'Object' type, owner||'.'||table_name||'('||privilege||')' from dba_tab_privs where grantee='&&grantee'
  6  order by 1,2;
Enter value for grantee: EM_EXPRESS_ALL

TYPE       PRIVILEGE
---------- ----------------------------------------------------------------------
Object     SYS.DBMS_AUTO_SQLTUNE(EXECUTE)
Object     SYS.DBMS_AUTO_TASK_ADMIN(EXECUTE)
Privilege  ADMINISTER ANY SQL TUNING SET
Privilege  ADMINISTER SQL MANAGEMENT OBJECT
Privilege  ADMINISTER SQL TUNING SET
Privilege  ADVISOR
Privilege  ALTER ANY ROLE
Privilege  ALTER PROFILE
Privilege  ALTER SYSTEM
Privilege  ALTER TABLESPACE
Privilege  ALTER USER
Privilege  CREATE CREDENTIAL
Privilege  CREATE JOB
Privilege  CREATE PROFILE
Privilege  CREATE ROLE
Privilege  CREATE TABLESPACE
Privilege  CREATE USER
Privilege  DROP ANY ROLE
Privilege  DROP PROFILE
Privilege  DROP TABLESPACE
Privilege  DROP USER
Privilege  GRANT ANY OBJECT PRIVILEGE
Privilege  GRANT ANY PRIVILEGE
Privilege  GRANT ANY ROLE
Role       EM_EXPRESS_BASIC

 


SQL> select grantee,granted_role from dba_role_privs where granted_role like 'EM_EXPRESS%' order by 2;

GRANTEE              GRANTED_ROLE
-------------------- ------------------------------
DBA                  EM_EXPRESS_ALL
SYS                  EM_EXPRESS_ALL
EM_EXPRESS_ALL       EM_EXPRESS_BASIC
SYS                  EM_EXPRESS_BASIC

image 
image 
 

No comments:

Post a Comment