Friday 30 October 2020

OEM 13c - Oracle Management Server and agent commands

OEM 13c -  OMS OMA  commands

  1. emctl start oms
  2. emctl status oms
  3. emctl stop oms -all

  1. emctl config oms -disable_bip
  2. emctl config oms -disable_bip

  1. emctl start agent
  2. emctl status agent
  3. emctl stop agent


  •  emctl start oms

[oracle@oem13c bin]$ /u01/app/oracle/middleware/bin/emctl start oms

Oracle Enterprise Manager Cloud Control 13c Release 3

Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.

Starting Oracle Management Server...

WebTier Successfully Started

Oracle Management Server Successfully Started

Oracle Management Server is Up

JVMD Engine is Up

Starting BI Publisher Server ...

BI Publisher Server Successfully Started

BI Publisher Server is Up

[oracle@oem13c bin]$

  • emctl start agent

[oracle@oem13c bin]$ /u01/app/oracle/agent/agent_inst/bin/emctl start agent

Oracle Enterprise Manager Cloud Control 13c Release 3

Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.

Starting agent ................................................................................. started.

[oracle@oem13c bin]$

  • emctl status oms

[oracle@oem13c bin]$ /u01/app/oracle/middleware/bin/emctl status oms

Oracle Enterprise Manager Cloud Control 13c Release 3

Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.

WebTier is Up

Oracle Management Server is Up

JVMD Engine is Up

BI Publisher Server is Up

[oracle@oem13c bin]$

  • emctl status agent

[oracle@oem13c bin]$ /u01/app/oracle/agent/agent_inst/bin/emctl status agent

Oracle Enterprise Manager Cloud Control 13c Release 3

Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.

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

Agent Version          : 13.3.0.0.0

OMS Version            : 13.3.0.0.0

Protocol Version       : 12.1.0.1.0

Agent Home             : /u01/app/oracle/agent/agent_inst

Agent Log Directory    : /u01/app/oracle/agent/agent_inst/sysman/log

Agent Binaries         : /u01/app/oracle/agent/agent_13.3.0.0.0

Core JAR Location      : /u01/app/oracle/agent/agent_13.3.0.0.0/jlib

Agent Process ID       : 16897

Parent Process ID      : 16790

Agent URL              : https://oem13c.example.com:3872/emd/main/

Local Agent URL in NAT : https://oem13c.example.com:3872/emd/main/

Repository URL         : https://oem13c.example.com:4903/empbs/upload

Started at             : 2020-10-21 13:18:24

Started by user        : oracle

Operating System       : Linux version 4.14.35-1902.3.2.el7uek.x86_64 (amd64)

Number of Targets      : 33

Last Reload            : (none)

Last successful upload                       : 2020-10-21 13:22:02

Last attempted upload                        : 2020-10-21 13:22:02

Total Megabytes of XML files uploaded so far : 0.07

Number of XML files pending upload           : 0

Size of XML files pending upload(MB)         : 0

Available disk space on upload filesystem    : 18.24%

Collection Status                            : Collections enabled

Heartbeat Status                             : Ok

Last attempted heartbeat to OMS              : 2020-10-21 13:21:38

Last successful heartbeat to OMS             : 2020-10-21 13:21:38

Next scheduled heartbeat to OMS              : 2020-10-21 13:22:39


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

Agent is Running and Ready

[oracle@oem13c bin]$

  • emctl config oms -disable_bip

[oracle@oem13c ~]$ /u01/app/oracle/middleware/bin/emctl config oms -disable_bip

Oracle Enterprise Manager Cloud Control 13c Release 3

Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.

Enter Enterprise Manager Root (SYSMAN) Password :

Stopping BI Publisher Server...

BI Publisher Server Successfully Stopped

BI Publisher Server is Down

BI Publisher has been disabled on this host and will not be started with the 'emctl start oms' or 'emctl start oms -bip_only' commands.

Overall result of operations: SUCCESS

[oracle@oem13c ~]$

  • emctl stop oms -all

[oracle@oem13c ~]$ /u01/app/oracle/middleware/bin/emctl stop oms -all

Oracle Enterprise Manager Cloud Control 13c Release 3

Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.

Stopping Oracle Management Server...

WebTier Successfully Stopped

Oracle Management Server Successfully Stopped

Oracle Management Server is Down

JVMD Engine is Down

Stopping BI Publisher Server...

BI Publisher Server Successfully Stopped

AdminServer Successfully Stopped

BI Publisher Server is Down

[oracle@oem13c ~]$

  • emctl stop agent

[oracle@oem13c bin]$ /u01/app/oracle/agent/agent_inst/bin/emctl stop agent

Oracle Enterprise Manager Cloud Control 13c Release 3

Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.

Stopping agent ... stopped.

[oracle@oem13c bin]$

Thursday 29 October 2020

OEM 13c - Schedule RMAN Backup using OEM13c Console

 

Scenario Preview : We are scheduling rman automated backup on regular basis using OEM13c . Remmebr expdp backup is not scheduled using OEM console 

Database name : OEMDB

Rman  Backup location : /u01/rmanbkp

Operating System : OEL 7.7 


1. Go to database console then select schecduled backup database in our case it is OEMDB. In coming blog we going to schedule backup using recovery catalog option so in all target database repository detailed stored on it. In our production console we have done the same as using recovery catalog.  

Availability  > Backup & Recovery > Schedule Backup >  


2.  Select Schedule Customized Backup  select  options in our case we select Whole Database 



3. Select Backup type | Backup mode | Advanced option    

                                    

4. Select Disk or Tape option 



5.  Set Jobs scheduling options describes on screenshots




6. We can customized  rman backup script  as well. on RMAN script window TEXT Box.


7. After Submitting  job we can check on Job Activity 



8.  After execution of job we can check Job is  successful or failed status we can check on job activity
 

9. We can check job report as well as job backup logs.

Availability  > Backup & Recovery >  Backup Report >  



Friday 23 October 2020

OEM13c - Add agents on remote target host server




Here we add monitoring on OMR database and after that add host on target database server and add monitoring on it using EM 13c Console .

OMR database and OEM 13c are in same server so agent already installed at the time of installation so we add monitoring on server.
  1. Add Discovery target on OMR database
  2. Add OEM agent on target host and add discovery target 
OMR Database : OEMDB

Hostname : oem13c.example.com

New Target host name : srv3.example.com

Target Database : SMRCDB

OEM Console URL : 


 Enterprise Manager Cloud Control URL: https://oem13c.example.com:7803/em also ( https://192.168.56.71:7803/em)

 Admin Server URL: https://oem13c.example.com:7102/console

BI Publisher URL: https://oem13c.example.com:9803/xmlpserver/servlet/home


STEP 1 : Login OEM console and go to setting and add target manually 



STEP 2 : choose 2nd option (Add Non-Host Targets Using Guided Process )



STEP 3 : As default oracle database and listener automatically set on discovery target types.


STEP 4: Target already installed so we select OMR database server oem13c.example.com


STEP 5: OEM will discover host at there end .
 

STEP 6 : Select on checkbox OEMDB database and add password of dbsnmp schema. By default it is locked.
SQL> alter user dbsnmp account unlock identified by dbsnmp;

User altered.

SQL> select USERNAME,DEFAULT_TABLESPACE,ACCOUNT_STATUS from dba_users where username='DBSNMP';

USERNAME                                 DEFAULT_TABLESPACE             ACCOUNT_STATUS
---------------------------------------- ------------------------------ --------------------------------
DBSNMP                                   SYSAUX                         OPEN
 


STEP 7 :  Discovery Target Review



STEP 8 : Target confirmation 
 

STEP 9 :  OEMDB  database and listener Successfully on console. 




Adding OEM Agent on target server  and discover target for monitoring

OS NAME : srv3.example.com

STEP 1: Select add host targets


STEP 2 : Add host targets.

 



STEP 3 : Add named credential of oracle user and then  root (optional) user .


STEP 4 : Add  agent base directory /u01/app/oracle/agents . Instance directory will be automatically created.
Default port is 3872.


STEP 5 : Review Agent target hosts


STEP 6: Deploy agent Summary process 


STEP 7: Agent successfully added on target server.


Add Discovery target on srv3.example.com agent

STEP 1: Choose 2nd option ( Add using guided process  and then further select default oracle database and listener option)



STEP 2 : Add host target details.




STEP 3: Add password dbsnmp user on database discovery results in this server we have CDB database so details will automatically fetch by discovery.



STEP 4: Database discovery review


STEP 5: Configuration of  database and listener target saved successfully.



STEP 6 : Successfully done 



STEP 7: OEM 13c Console Summary dashboard




OEM 13c : Oracle Enterprise manager Installation 13c on linux 64 bit OS.

OMR Database : OEMDB

OMS OEM Console : 13c

Oprerating System : OEL 7.7 64 bit

 OMR Database : 12.2.0.1 

links :  OMR Database minimum recommended parameter


  • Download and install oem 13c  ( we have downloaded OEM 13c already), Here OMR database and OEM13c are in same hosts we can install OMR database and OEM 13c server on different server as well.

[oracle@oem13c oem]$ ll

total 9497096

-rwxrwxr-x. 1 oracle oinstall 1278491093 Oct 20 19:21 em13300_linux64-2.bin

-rwxrwxr-x. 1 oracle oinstall 1742204641 Oct 20 19:22 em13300_linux64-2.zip

-rwxrwxr-x. 1 oracle oinstall 2090882426 Oct 20 19:23 em13300_linux64-3.zip

-rwxrwxr-x. 1 oracle oinstall 2117436260 Oct 20 19:24 em13300_linux64-4.zip

-rwxrwxr-x. 1 oracle oinstall  694002559 Oct 20 19:24 em13300_linux64-5.zip

-rwxrwxr-x. 1 oracle oinstall 1801995711 Oct 20 19:25 em13300_linux64-6.zip

  • Execute /em13300_linux64.bin to begin installation.

[oracle@oem13c oem]$ ./em13300_linux64.bin

STEP 1: skip the security update option :



STEP 2 :
Skip software update 


STEP 3 : Fix warning  in my case i proceed further as kernel parameter and memory is sufficient for installation.


STEP 4 : In my case Proceed with option simple option


STEP 5 : Middleware home location | agent base directory | hostname


STEP 6 :  Provide sysman password which is used for OEM console. and provide OMR database details.


STEP 7:  Disable ( Configure a shared location for oracle BI publisher ) on next screenshot.



STEP 8: Review installation process details.


STEP 9 : After 4-5 hr depends on OS configuration run ./allroot.sh from middleware home.


STEP 10 : Installation complete so copy URL from console https://oem13c.example.com:7102/em

DNS configuration not installed on system for dns visit link :  or use host IP address https://192.168.56.71:7102/em



STEP 11 :
Login OEM console using ip address  user name is sysman
 


STEP 12 :
OEM Console 


This information is also available at: 


/u01/app/oracle/middleware/install/setupinfo.txt


See the following for information pertaining to your Enterprise Manager installation:



Use the following URL to access:


1. Enterprise Manager Cloud Control URL: https://oem13c.example.com:7803/em

2. Admin Server URL: https://oem13c.example.com:7102/console

3. BI Publisher URL: https://oem13c.example.com:9803/xmlpserver/servlet/home


 https://192.168.56.71:7803/em

The following details need to be provided while installing an additional OMS:


1. Admin Server Host Name: oem13c.example.com

2. Admin Server Port: 7102


You can find the details on ports used by this deployment at : /u01/app/oracle/middleware/install/portlist.ini



 NOTE:

 An encryption key has been generated to encrypt sensitive data in the Management Repository. If this key is lost, all encrypted data in the Repository becomes unusable. 


 A backup of the OMS configuration is available in /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/backup on host oem13c.example.com. See Cloud Control Administrators Guide for details on how to back up and recover an OMS.


 NOTE: This backup is valid only for the initial OMS configuration. For example, it will not reflect plug-ins installed later, topology changes like the addition of a load balancer, or changes to other properties made using emctl or emcli. Backups should be created on a regular basis to ensure they capture the current OMS configuration. Use the following command to backup the OMS configuration:

/u01/app/oracle/middleware/bin/emctl exportconfig oms -dir <backup dir> 



EM13c - OMR Database minimum recommended parameters

  •  Create OMR database 

Database Name: OEMDB

Operating system : Linux OEL 7.7 64 bit

Database Version : 12.2.0.1.0

  • OMR database minimum recommended parameter values needs to be set before installing OEM 13c Console.

set "_allow_insert_with_update_check"=true

set session_cached_cursors=200

alter system set sga_target=800M 

set session_cached_cursors=200

[oracle@oem13c ~]$ ps -ef |grep pmon

oracle   17149     1  0 19:02 ?        00:00:00 ora_pmon_OEMDB

oracle   18459 17501  0 19:14 pts/3    00:00:00 grep --color=auto pmon

[oracle@oem13c ~]$ sqlplus / as sysdba


SQL*Plus: Release 12.2.0.1.0 Production on Tue Oct 20 19:14:34 2020


Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production


SQL> alter system set "_allow_insert_with_update_check"=true scope=both;


System altered.


SQL> alter system set session_cached_cursors=200 scope=spfile;


System altered.


SQL> alter system set sga_target=800M scope=both;


System altered.


SQL> alter system set pga_aggregate_target=450M scope=both;


System altered.


SQL> shut immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.


Total System Global Area  838860800 bytes

Fixed Size                  8626240 bytes

Variable Size             461377472 bytes

Database Buffers          364904448 bytes

Redo Buffers                3952640 bytes

Database mounted.

Database opened.

  • Download OEM 13c binary from oracle.com

https://www.oracle.com/enterprise-manager/downloads/linux-x86-64-13c-downloads.html

[oracle@oem13c oem]$ ll

total 9497096

-rwxrwxr-x. 1 oracle oinstall 1278491093 Oct 20 19:21 em13300_linux64-2.bin

-rwxrwxr-x. 1 oracle oinstall 1742204641 Oct 20 19:22 em13300_linux64-2.zip

-rwxrwxr-x. 1 oracle oinstall 2090882426 Oct 20 19:23 em13300_linux64-3.zip

-rwxrwxr-x. 1 oracle oinstall 2117436260 Oct 20 19:24 em13300_linux64-4.zip

-rwxrwxr-x. 1 oracle oinstall  694002559 Oct 20 19:24 em13300_linux64-5.zip

-rwxrwxr-x. 1 oracle oinstall 1801995711 Oct 20 19:25 em13300_linux64-6.zip

[oracle@oem13c oem]$ 

OEM : Add OEM 12c express edition console on database



Database Name: SMRPATCH7 ( standalone test database )

Hostname :  srv1.example.com

Operating System : SUSE 12 SP5 64 bit 

Note: Even we have configured EM Express with on of on our live  RAC 2 node machine  using scan DNS name. Due to free licience issue we have to configure free oem express edition  on that database. 
  •  Login database and Check port configuration information for EM express edition console.

SQL> SELECT DBMS_XDB_CONFIG.gethttpport FROM dual;

GETHTTPPORT
-----------
          0
  • Configure EM express port. In our case we have provided 5500

SQL> EXEC DBMS_XDB_CONFIG.sethttpsport(5500);

PL/SQL procedure successfully completed.

  • Check EM configuration port.

SQL> SELECT DBMS_XDB_CONFIG.gethttpsport FROM dual;

GETHTTPSPORT
------------
        5500

  • Check dispatcher entry , in some database i have seen no entry on dispatchers so OEM console didn't run even configuring port.


SQL>
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dispatchers                          string      (PROTOCOL=TCP) (SERVICE=SMRPATCH7XDB)                      
max_dispatchers                      integer

  • You can add entry on pfile  or dynamically below.
*.dispatchers='(PROTOCOL=TCP) (SERVICE=SMRPATCH7XDB)'



alter system set dispatchers = '(address=(protocol=tcp)(host=srv1.example.com))(dispatchers=40)(service=SMRPATCH7)(listener=listener_name)';

  • Login EM express edition OEM console below.

https://srv1.example.com:5500/em/