Sunday, December 11, 2022

How to install OCI Cloud backup module


1.       Download cloud backup module

Oracle cloud backup module can be downloaded from below link

https://www.oracle.com/database/technologies/oracle-cloud-backup-downloads.html

2.       Transfer it to corresponding OCI host using Winscp or any other utilities

Change the ownership of zip file like below

               Chown oracle:dba opc_installer.zip

3.       Unzip the installer

unzip opc_installer.zip

Above command will create following 2 directories under opc_installer directory

opc_installer

oci_installer

We need to focus on oci_installer directory which contain extracted jar file

4.       Pre-requiste before executing install command using jar

i)                    JDK 1.6 or higher must be installed in the server.We can check version like below

Java -version

ii)                  To install this we need to create an API signing keys and store under /home/oracle/.oci directory

If .oci directory is not present then create it like below

mkdir -p /home/oracle/.oci

 

Follow below procedure to create API signing key and config file

Click on the user who will be installing the cloud backup module.You can choose your user account also if you are installing.


Under resource tab click API keys link.Her you can see a key is already present which were created for this incident.



Click on add api key it will allow you to download they key in your local machine and then click on add button which will be shown in cloud console like above.Please make sure you select right region in the console for this request.



Now transfer this private key to oci host and copy under /home/oracle/.oci and rename like oci_api_keyfile.pem

Use the command chmod go-rwx /home/oracle/.oci/oci_api_keyfile.pem to set the permissions on the file so that no other user can read/write the file.

 Click on 3 dots for the API key you have created and you can see view configuration file.Copy the contents and create a file called config under /home/oracle/config and paste it.Change key_file parameter to locate right path of the key(in this case it will be /home/oracle/.oci/oci_api_key.pem).This information is required by the installer so that it can authenticate with private key we have created.

 

5.       Run the installer

 

Use below command to run the installer

It is recommended to create separate wallet directory as below highlighted directory holds wallet for TDE

oracle@phxwltdb09 oci_installer]$ java -jar oci_install.jar -host https://objectstorage.us-phoenix-1.oraclecloud.com \

-pvtKeyFile /home/oracle/.oci/oci_api_keyfile.pem \

 -pubFingerPrint **********  \

-uOCID ************************* \

 -tOCID **************************\

-walletDir /opt/oracle/dcs/commonstore/wallets \

-libDir /opt/oracle/dcs/commonstore/oss
Oracle Database Cloud Backup Module Install Tool, build 19.3.0.0.0DBBKPCSBP_2019-10-16
Oracle Database Cloud Backup Module credentials are valid.
Oracle Database Cloud Backup Module wallet created in directory /opt/oracle/dcs/commonstore/wallets
Oracle Database Cloud Backup Module initialization file /u01/app/oracle/product/19.0.0.0/dbhome_3/dbs/opc<DBNAME>.ora created.
Downloading Oracle Database Cloud Backup Module Software Library from Oracle Cloud Infrastructure.
Download complete.

 

 

 


Monday, December 5, 2022

Deploying OEM agent manually using agentDeploy.sh script

 

  1. Acquiring the Management Agent Software and Downloading it onto the OMS Host Using EM CLI.

a.  Login into OMS host and login into emcli

oracle@oem/as:$ . oraenv

ORACLE_SID = [oem] ? oem

The Oracle base remains unchanged with value oms13c2

oracle@oem/as:$ emcli login -username=sysman

Enter password :

 

Login successful

b.  Synchronize emcli

emcli sync

Synchronized successfully

c.  Identify the platform

oracle@oem/as:$ emcli get_supported_platforms

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

Version = 13.4.0.0.0

 Platform = Oracle Solaris on SPARC (64-bit)

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

Version = 13.4.0.0.0

 Platform = Linux x86-64

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

Platforms list displayed successfully.

d.  Download the Management Agent software from the Software Library to a temporary directory on the OMS host

export UNZIP_LOC= /usr/bin/unzip

Below command will fail if UNZIP_LOC is not set like above 

Extracting plugins failed.

If your agent image platform and the emcli client setup is on a different platform then you need to set the environment variable UNZIP_LOC to the absolute path of unzip utility location  which is greater than or equal to version 6.0.

emcli get_agentimage -destination=/tmp/oemcloud_linux_agent_134 -platform="Linux x86-64" -version=13.4.0.0.0

=== Partition Detail ===

Space free : 282 GB

Space required : 1 GB

Downloading /tmp/oemcloud_linux_agent_134/13.4.0.0.0_AgentCore_226.zip

File saved as /tmp/oemcloud_linux_agent_134/13.4.0.0.0_AgentCore_226.zip

Downloading /tmp/oemcloud_linux_agent_134/13.4.0.0.0_Plugins_226.zip

File saved as /tmp/oemcloud_linux_agent_134/13.4.0.0.0_Plugins_226.zip

Downloading /tmp/oemcloud_linux_agent_134/unzip

File saved as /tmp/oemcloud_linux_agent_134/unzip

Executing command: /usr/bin/unzip /tmp/oemcloud_linux_agent_134/13.4.0.0.0_Plugins_226.zip -d /tmp/oemcloud_linux_agent_134

Exit status is:0

Agent Image Download completed successfully.



2.      Transfer the Management Agent Software to the Destination Host.



3.      Install agent using agentdeploy script in destination host

a.      On destination host extract conetents of the zip file

cd /tmp/oemcloud_linux_agent_134

[oracle@tuslpmdmoda02a oemcloud_linux_agent_134]$ unzip 13.4.0.0.0_AgentCore_226.zip

Archive:  13.4.0.0.0_AgentCore_226.zip

  inflating: agentcore.bin

  inflating: agent.rsp

  inflating: agentDeploy.sh

  inflating: agentimage.properties

  inflating: unzip

  inflating: zip

   creating: plugins/

  inflating: plugins/oracle.sysman.si.discovery.plugin-13.4.1.0.0.farb

  inflating: plugins/oracle.sysman.db.discovery.plugin-13.4.1.0.0.farb

  inflating: plugins/oracle.fmw.gg.discovery.plugin-13.4.1.0.0.farb

  inflating: plugins/oracle.sysman.emas.discovery.plugin-13.4.1.0.0.farb

  inflating: plugins/oracle.sysman.xa.discovery.plugin-13.4.1.0.0.farb

  inflating: plugins/oracle.sysman.oh.agent.plugin-13.4.0.0.0.farb

  inflating: plugins/oracle.sysman.oh.discovery.plugin-13.4.0.0.0.farb

  inflating: plugins.txt




b.  Edit the response file agent.rsp

OMS_HOST=<OMS host name>

EM_UPLOAD_PORT=7799 (Use same post used by OMS)

AGENT_REGISTRATION_PASSWORD=<sysman password>

Note:Below process will fail to register with OMS if agent registration password is wrong.If you don’t know agent registration password create new one

c.  Invoke the deployment script and pass the response file

./agentDeploy.sh AGENT_BASE_DIR=/u01/app/oracle/em/agent RESPONSE_FILE=/tmp/oemcloud_linux_agent_134/agent.rsp

We can see below messages from installation log

Agent Configuration completed successfully

The following configuration scripts need to be executed as the "root" user. Root script to run : /u01/app/oracle/em/agent/agent_13.4.0.0.0/root.sh

/u01/app/oracle/em/agent/agent_13.4.0.0.0/cfgtoollogs/agentDeploy/agentDeploy_2021-05-04_14-20-30-PM.log

Waiting for agent targets to get promoted...

Successfully Promoted agent and its related targets to Management Agent



4.       run root script as indicated in the deploy messages

 



5.      Check agent status and update oset file under /usr/local/bin

emctl status agent

Oracle Enterprise Manager Cloud Control 13c Release 4

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

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

Agent Version          : 13.4.0.0.0

OMS Version            : 13.4.0.0.0

Protocol Version       : 12.1.0.1.0

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

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

Agent Binaries         : /u01/app/oracle/em/agent/agent_13.4.0.0.0

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

Agent Process ID       : 54859

Parent Process ID      : 54722

Agent URL              : https://tuslpmdmoda02a.unisource.corp:3872/emd/main/

Local Agent URL in NAT : https://tuslpmdmoda02a.unisource.corp:3872/emd/main/

Repository URL         : https://tusspoem02.unisource.corp:1159/empbs/upload

Started at             : 2021-05-04 14:20:54

Started by user        : oracle

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

Number of Targets      : 3

Last Reload            : (none)

Last successful upload                       : 2021-05-04 14:32:12

Last attempted upload                        : 2021-05-04 14:32:12

Total Megabytes of XML files uploaded so far : 0.4

Number of XML files pending upload           : 0

Size of XML files pending upload(MB)         : 0

Available disk space on upload filesystem    : 71.39%

Collection Status                            : Collections enabled

Heartbeat Status                             : Ok

Last attempted heartbeat to OMS              : 2021-05-04 14:32:57

Last successful heartbeat to OMS             : 2021-05-04 14:32:57

Next scheduled heartbeat to OMS              : 2021-05-04 14:33:57

 

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

Agent is Running and Ready



6.      Add other non-host targets like below

From OEM console setup>Add target>Configure auto discovery

You can see list of hosts

 

Click on the corresponding cell under discovered targets column and click on promote button for your desired targets and it will be automatically added.




When SQL plan baseline is not used

 Thank you very much for your interest. Problem Statement: Lets assume you are reported about an application query running slow in one envir...