Tags

11g (5) 12c (6) 18c (3) 19c (4) ASM (1) Critical Patch (11) Data Pump (1) Dataguard (9) Diverse (3) GRID (7) GitLab (2) Linux (8) OEM (2) ORA Errors (13) Oracle (12) RMAN (4)
Showing posts with label OEM. Show all posts
Showing posts with label OEM. Show all posts

Wednesday, May 27, 2020

OEM Cloud Control 13c Installation


OEM Cloud Control 13c Installation Step by Step

Oracle Enterprise Manager Cloud Control 13c Release 3 (13.3.0.0) Installation on Red Hat Enterprise Linux Server release 7.5


PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment.

Those are basic steps for the OS level. You may need or not. It depends on your environment.

You do not need to setup environment for Oracle_home and ASM and OEM. When the Installation completed then you can set it up.

If you see yum issue, then you can try to fix issue as follow:
# subscription-manager refresh
# yum repolist all
# yum update -y

Following packages are necessary for the cloud control and Oracle Installation.

yum install -y bc binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf.i686 elfutils-libelf elfutils-libelf-devel.i686 elfutils-libelf-devel fontconfig-devel glibc.i686 glibc glibc-devel.i686 glibc-devel ksh libaio.i686 libaio libaio-devel.i686 libaio-devel libX11.i686 libX11 libXau.i686 libXau libXi.i686 libXi libXtst.i686 libXtst libgcc.i686 libgcc librdmacm-devel libstdc++.i686 libstdc++ libstdc++-devel.i686 libstdc++-devel libxcb.i686 libxcb make nfs-utils net-tools python python-configshell python-rtslib python-six smartmontools sysstat targetcli unixODBC

Database Installation (Software-Only)
I am going to use 18c Software, but the Installation will work as well as on 12c.
Allocating 200 GB Raw device for ASM
You can check via fdisk -l
....
....
Disk /dev/sdc: 214.7 GB, 214748364800 bytes, 419430400 sectors
....
....
Create a rules file for asm and save it.
vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sdc",OWNER:="oracle",GROUP:="dba",MODE:="660"
Execute the following command, which will reload the rule.
udevadm control --reload-rules && udevadm trigger

Now the device is owned by oracle:dba
# ll /dev/sdc
brw-rw---- 1 oracle dba 8, 32 Sep 17 09:23 /dev/sdc

Stop the Firewall and disable
systemctl stop firewalld.service
systemctl disable firewalld.service
iptables -L

Download Oracle Database 18c Grid Infrastructure (18.3) for Linux x86-64 and ASM
LINUX.X64_180000_grid_home.zip
Copy the above file in the grid home and unzip the file:

cd /apps/oracle/app/home/product/18.0.0/grid_18
$ unzip LINUX.X64_180000_grid_home.zip

Patching existing software with patch 28096386 (18.3) which will perform patching prior actual installation
DISPLAY=xxx.xx.xx.xx:0.0; export DISPLAY
This command will also install grid + patch.

$ ./gridSetup.sh -applyRU /download/28096386

Do not forget to install cvuqdisk-1.0.10-1.rpm
As root:
cd /apps/oracle/app/home/product/18.0.0/grid/cv/rpm
rpm -Uvh cvuqdisk-1.0.10-1.rpm
ps -fu oracle

Now you can install just Oracle 18c software.

Oracle 18c software.


cd $ORACLE_HOME
unzip LINUX.X64_180000_db_home.zip

I am using MobaXterm for xterminal.
DISPLAY=xxx.xx.xxx.xxx:0.0; export DISPLAY
./runInstaller

NOTE: The steps are straightforward. I am not going to add the screenshot.

As root user execute the script.
# /apps/oracle/app/oraInventory/orainstRoot.sh
Changing permissions of /apps/oracle/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing group name of /apps/oracle/app/oraInventory to dba.
The execution of the script is complete.
# /apps/oracle/app/home/product/18.0.0/dbhome_18/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /apps/oracle/app/home/product/18.0.0/dbhome_18

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] :
no
Oracle Trace File Analyzer (TFA - Non Daemon Mode) is available at :
    /apps/oracle/app/home/product/18.0.0/dbhome_18/suptools/tfa/release/tfa_home/bin/tfactl

Note:
1. tfactl will use TFA Daemon Mode if TFA already running in Daemon Mode and user has access to TFA
2. tfactl will configure TFA Non Daemon Mode only if user has no access to TFA Daemon mode or TFA Daemon mode is not installed
OR
Oracle Trace File Analyzer (TFA - Daemon Mode) can be installed by running this script:
    /apps/oracle/app/home/product/18.0.0/dbhome_18/suptools/tfa/release/tfa_home/install/roottfa.sh
***********ORACLE SOFTWARE INSTALLATION IS COMPLETED ***********

You must do below changes before you can continue
Recommended minimum settings.

  alter pluggable database emrep save state;
  alter system set "_allow_insert_with_update_check"=true scope=both;
  alter system set session_cached_cursors=500 scope=spfile;
  alter system set shared_pool_size=600M;

Bounce the DB

On OS Side you must configure in .bash_profile and .bashrc
export EM_THREAD_STACK_SIZE=8192
Installing now OEM
em13300_linux64-2.zip
em13300_linux64-3.zip
em13300_linux64-4.zip
em13300_linux64-5.zip
em13300_linux64-6.zip
em13300_linux64.bin

You may need to create following directories.
Setup Software Library
mkdir -p /apps/oracle/app/home/swlib
mkdir -p /apps/oracle/app/home/middleware
mkdir -p /apps/oracle/app/home/agent
DISPLAY=xxx.xx.xxx.xxx:0.0; export DISPLAY

chmod u+x em13300_linux64.bin
./em13300_linux64.bin
























OEM standard commands:

# Set env OMS
 OMS_HOME=/app/oracle/product/13.2.0/middleware/oms
# Check oms status
 $OMS_HOME/bin/emctl status oms
# Stop oms
 $OMS_HOME/bin/emctl stop oms
 # Start oms
 $OMS_HOME/bin/emctl start oms
 # Set env AGT
 AGT_HOME=/app/oracle/product/13.2.0/agent/agent_13.2.0.0.0
 # Check agent status
 $AGT_HOME/bin/emctl status agent
 # Stop agent
 $AGT_HOME/bin/emctl stop agent
 # Start agent
 $AGT_HOME/bin/emctl start agent

Saturday, March 7, 2020

Apply PSU to the OEM 13c



Apply PSU to the OEM 13c

PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment.

PSU apply to your Enterprise Manager Cloud Control 13c
How to apply patch (PSU) in Oracle Enterprise Manager 13c
1. Download the latest PSU in the MOS (My Oracle Support)
2. Download the required OPatch and OMSPatcher.

We can download the latest OPatch from the following link.
"https://updates.oracle.com/download/6880880.html"
I have downloaded the following patch Version “OPatch 13.9.3.3.0"
 p6880880_139000_Generic.zip

NOTE: 

There is no mechanism to revert only OPatch to an older version. That is why make sure that you backup your middleware home.
Make sure OMS is stopped.
'<ORACLE_HOME>/bin/emctl stop oms -all'
/u01/oracle/app/home/middleware/bin/emctl stop oms -all

export ORACLE_HOME=<EM_MW_HOME>
$ORACLE_HOME/oracle_common/jdk/bin/java –jar <PATCH_HOME>/6880880/opatch_generic.jar -silent oracle_home=$ORACLE_HOME
...
...
Logs successfully copied to /oracle/app/oraInventory/logs.

To validate the installation:
cd <ORACLE_HOME>/OPatch    
$ ./opatch version
OPatch Version: 13.9.3.3.0
OPatch succeeded.

opatch lspatches

Download the latest OMSPatcher Version.
“https://updates.oracle.com/download/19999993.html”
Unzip the new OMSPatcher version.

cd /u01/oracle/app/home/middleware/
mv OMSPatcher OMSPatcher_old
unzip /oracle/download/OPatch_middleware/p19999993_133000_Generic.zip -d /u01/oracle/app/home/middleware

Validate OMSPatcher version.
$ORACLE_HOME/OMSPatcher/omspatcher version
OMSPatcher Version: 13.8.0.0.3
OPlan Version: 12.2.0.1.6
OsysModel build: Tue Sep 04 18:15:05 PDT 2018
OMSPatcher succeeded.

Upgrade OPatch on Agent Home.
export ORACLE_HOME=<AGENT_BASE_DIR>/agent_13.x.0.0.0
$ORACLE_HOME/jdk/bin/java -jar <PATCH_HOME>/6880880/opatch_generic.jar -silent oracle_home=$ORACLE_HOME
...
...
Logs successfully copied to /oracle/app/oraInventory/logs.

Generating the property file.

Note: You will be asked to enter the credentials for the user: weblogic (Admin Server).
cd $ORACLE_HOME/OMSPatcher/wlskeys
$ORACLE_HOME/OMSPatcher/wlskeys/createkeys.sh -oh $ORACLE_HOME -location $ORACLE_HOME/OMSPatcher/wlskeys
 $ORACLE_HOME/OMSPatcher/wlskeys/createkeys.sh -oh /u01/oracle/app/home/middleware -location /u01/oracle/app/home/middleware/OMSPatcher/wlskeys

Unzip the file and check prerequisites.
Download Base Platform OMS home.
EM BP Patch Set Update 13.3.0.0.200114 Patch 30592540
p30592540_133000_Generic.zip

We need to know required hostname and port. We can get the correct detail as follow.
/u01/oracle/app/home/middleware/bin/emctl status oms -details
 ...
 ...
WLS Domain Information
Domain Name            : GCDomain
Admin Server Host      : oradbprd01.th.com
Admin Server HTTPS Port: 7102
...
...

Create property file:
more property_file
AdminServerURL=t3s:// oradbprd01.th.com:7102
AdminConfigFile=/u01/oracle/app/home/middleware/OMSPatcher/wlskeys/config
AdminKeyFile=/u01/oracle/app/home/middleware/OMSPatcher/wlskeys/key
 
cd <PATCH_TOP_DIR>/30592540
/u01/oracle/app/home/middleware/OMSPatcher/omspatcher apply -analyze -property_file /u01/oracle/app/home/middleware/OMSPatcher/wlskeys OMSPatcher.OMS_DISABLE_HOST_CHECK=true

If you get this error.
OMSPatcher failed with error code 231

Try with the following command with –bitonly option: OMS (Doc ID 2257840.1)

/u01/oracle/app/home/middleware/OMSPatcher/omspatcher apply -bitonly -analyze -property_file /u01/oracle/app/home/middleware/OMSPatcher/wlskeys/ OMSPatcher.OMS_DISABLE_HOST_CHECK=true

Stopping and Applying the patch in the OMS Server.
$ORACLE_HOME/bin/emctl stop oms

/u01/oracle/app/home/middleware/OMSPatcher/omspatcher apply -bitonly -property_file /u01/oracle/app/home/middleware/OMSPatcher/wlskeys/ OMSPatcher.OMS_DISABLE_HOST_CHECK=true

OMSPatcher Automation Tool
Copyright (c) 2017, Oracle Corporation.  All rights reserved.

OMSPatcher version : 13.8.0.0.3
OUI version        : 13.9.1.0.0
Running from       : /u01/oracle/app/home/middleware
Log file location  : /u01/oracle/app/home/middleware/cfgtoollogs/omspatcher/opatch2020-02-07_16-41-50PM_1.log

OMSPatcher log file: /u01/oracle/app/home/middleware/cfgtoollogs/omspatcher/30592540/omspatcher_2020-02-07_16-41-53PM_deploy.log

WARNING: OMSPatcher has been invoked with 'bitonly' option but the System patch provided has deployment metadata.
Invocation in 'bitonly' mode will prevent OMSPatcher from deploying artifacts.

Do you want to proceed? [y|n]
y
User Responded with: Y

Running apply prerequisite checks for sub-patch(es) "30592540" and Oracle Home "/u01/oracle/app/home/middleware"...
Sub-patch(es) "30592540" are successfully analyzed for Oracle Home "/u01/oracle/app/home/middleware"

To continue, OMSPatcher will do the following:
[Patch and deploy artifacts]   :

Do you want to proceed? [y|n]
y
User Responded with: Y

Applying sub-patch(es) "30592540"
Please monitor log file: /u01/oracle/app/home/middleware/cfgtoollogs/opatch/opatch2020-02-07_16-41-53PM_1.log

Complete Summary
================
All log file names referenced below can be accessed from the directory "/u01/oracle/app/home/middleware/cfgtoollogs/omspatcher/2020-02-07_16-41-50PM_SystemPatch_30592540_1"

Patching summary:
-----------------
Binaries of the following sub-patch(es) have been applied successfully:

                        Featureset   Sub-patches                                     Log file
                        ----------   -----------                                     --------
  oracle.sysman.top.oms_13.3.0.0.0      30592540   30592540_opatch2020-02-07_16-41-53PM_1.log
--------------------------------------------------------------------------------
The following warnings have occurred during OPatch execution:
1)  OMSPatcher has been invoked with 'bitonly' option but the System patch provided has deployment metadata.
Invocation in 'bitonly' mode will prevent OMSPatcher from deploying artifacts.
--------------------------------------------------------------------------------
OMSPatcher Session completed with warnings.
Log file location: /u01/oracle/app/home/middleware/cfgtoollogs/omspatcher/30592540/omspatcher_2020-02-07_16-41-53PM_deploy.log

OMSPatcher completed with warnings.

Start OMS Server after apply patch.

$ORACLE_HOME/bin/emctl start oms

Patch Installation is completed.



physical standby without duplicate command

physical standby without duplicate command create a physical standby database using RMAN without using duplicate command PURPOSE:   All docu...