Advertisement

Friday, November 29, 2019

Oracle Database 18c: Installing Latest RU (18.8.0.0.0)

In this quick blog I am going to discuss on how to apply the Release Update (18.8.0.0.0) to Database Home. 

You should 

Download the Patches First (p30112122 and Latest Opatch 6880880)

wget 'https://updates.oracle.com/Orion/Services/download/p30112122_180000_Linux-x86-64.zip?aru=23124066&patch_file=p30112122_180000_Linux-x86-64.zip' --http-user=<MOS Username> --http-password=<MOS_Password> --no-check-certificate --output-document=p30112122_180000_Linux-x86-64.zip
$ wget 'https://updates.oracle.com/Orion/Services/download/p6880880_180000_Linux-x86-64.zip?aru=23213107&patch_file=p6880880_180000_Linux-x86-64.zip' --http-user=<MOS Username> --http-password=<MOS_Password> --no-check-certificate --output-document=p6880880_180000_Linux-x86-64.zip

Next Unzip OPatch
$ cd $ORACLE_HOME
$ mv OPatch OPatch_29112019

$ unzip -qq /u01/Patch/p6880880_180000_Linux-x86-64.zip

Pre-req Check
unzip -qq p30112122_180000_Linux-x86-64.zip
$ cd 30112122
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

opatch prereq CheckConflictAgainstOHWithDetail -ph ./

Patch Apply

unzip -qq p30112122_180000_Linux-x86-64.zip
cd 30112122
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
opatch apply


Data Patch Apply (Post Patch)
cd $ORACLE_HOME/OPatch
startup;
./datapatch -verbose
sqlplus / as sysdba
@utlrp.sql

Catalog Upgrade (Post Patch)
rman catalog username/password@alias
uprade catalog;
upgrade catalog;

Tuesday, November 26, 2019

OEM 13cR3: Install Agent Using Silent Method

In this blog I am going to cover method of installing OEM agent using the silent method. 
There are 2 silent methods, but, the one which prefer is the AgentPull method. 

This can be useful specially in cases when you do not have password to oracle user and you use sudo to access it, but still want to do the installation. 

So, here is how it goes 

Step 1 : 
Download the agent Image (For Linux / Unix)

$ wget https://<hostname:port of oms>/em/install/getAgentImage --no-check-certificate
$ mv getAgentImage AgentPull.sh
$ chmod u+x AgentPull.sh

Step 2 :
Verify your required platform is present or not
$ ./AgentPull.sh -showPlatforms

Step 3 :
Create rsp file with name agent.properties
LOGIN_USER=sysman
LOGIN_PASSWORD=welcome
PLATFORM="Linux x86-64"
AGENT_REGISTRATION_PASSWORD=wel246come
AGENT_BASE_DIR=/u01/app/oracle/agent

Step 4 : 
Install the agent
$ /tmp/AgentPull.sh RSPFILE_LOC=/tmp/agent.properties AGENT_BASE_DIR=/u01/app/oracle/agent

(Log files removed for brevity)

And once it goes on the installation will complete.
Next you can go to OEM console and Add targets

Monday, November 25, 2019

OEM 13cR3: Plugin Update on OMS : OFFLINE

Following up with my previous blog, where I showed on how to apply an OEM Plugin to OMS using the ONLINE method, now I will show the method of using the Online method. 

The offline method is followed in most of the environments due to security and firewall restrictions.

So, how to do ?
Step 1 
Go To Setup --> Extensibility --> Self Update



Step 2 
Click on Plugins and Search for your plugin ( I am doing the same good old Oracle Database too in the offline method)


Step 3
Select Plugin and Click on Download. You will be presented with set of instructions which will tell you to download the plugin





You can use wget to download the plugin this way 
$ wget ‘https://updates.oracle.com/Orion/Services/download/p29555092_112000_Generic.zip?aru=22845950&patch_file=p29555092_112000_Generic.zip’ --http-user=<MOS_Username> --http-password=<MOS_Password>--no-check-certificate --output-document=filename.zip


Once you are done with your download, then as the process states, you need to import it 

$ ./emcli import_update -omslocal -file=/u01/Template/p29555092_112000_Generic.zip

Processing update: Plug-in - Enterprise Manager for Oracle Database provides comprehensive management for Oracle Database and related targets such as Real Application Cluster, Automatic Storage Management (ASM) etc.

Successfully uploaded the update to Enterprise Manager. Use the Self Update Console to manage this update.

Now, you are done with the process of doing the import - The update will be visible in the OEM console, all you need now is to apply it.
From this step it is similar to what we did in ONLINE mode. 

You can follow my blog here for the complete process
You need to start from the step where you need to deploy the plugin on OMS Server. 
The step with text (Next Go To Setup --> Extensibility --> Plug-ins)


And you are done applying a Plugin in the OFFLINE way. 

OEM 13cR3: Plugin Update on OMS : ONLINE

Now, in this blog I start with Plugin Update on OMS - but in Online manner
(Remember 2 steps for Online,Enable Online in Setup --> Provisioning & Patching --> Offline and set the credentials in Setup --> My Oracle Support --> Set Credentials)

So, now that you are ready 
Step 1 is to go to our good old page  Setup --> Extensibility --> Self Update  

(I will do my favourite here Oracle Database Plugin)
Select Plugins and Search for Oracle Database.

Select the "Available" Plugin and Click Download. 



Select Immediate



Click on Job Details and (Navigate to Job Details) Use  Refresh till the job completes

TIP: you can see the directory where it is downloading the patch. You can navigate to the directory and see the patch number if you want (nerds)



Next Go To Setup --> Extensibility --> Plug-ins 
Select the Plugin and Click Deploy on "Management Servers"



Click Next (Ensure you do the Pre-req check every-time - Best Practice)


Wait for the Pre-req to complete. 
If it fails one of the reasons might be 
EM13c : Plug-in Deployment Failed at "Install Software" Prerequisite Step (Doc ID 2455748.1)





Click Next and Enter the sys Credentials
You must ensure backup of DB and EM has been taken as specified


Click Next (OMS will go down in installation)



Now Monitor on the host using 

$ emctl status oms -details (emctl of MW Home)

Wait Till Completion depending on size the time varies - this one generally completes within 10-15 minutes.

One of the ways to grep for Status is to use a small script like this  - 

PWD=<sysman_password>
echo $PWD | emctl status oms -details | egrep 'Success|Running|Step'

And you will get output like this 
Step                                     Start Time                End Time                  Status
Submit job for deployment                11/25/19 9:29:35 AM UTC   11/25/19 9:29:35 AM UTC   Success
Initialize                               11/25/19 9:29:37 AM UTC   11/25/19 9:29:42 AM UTC   Success
Install software                         11/25/19 9:29:42 AM UTC   11/25/19 9:29:43 AM UTC   Success
Validate plug-in home                    11/25/19 9:29:45 AM UTC   11/25/19 9:29:45 AM UTC   Success
Perform custom preconfiguration          11/25/19 9:29:45 AM UTC   11/25/19 9:29:45 AM UTC   Success
Check mandatory patches                  11/25/19 9:29:45 AM UTC   11/25/19 9:29:45 AM UTC   Success
Generate metadata SQL                    11/25/19 9:29:45 AM UTC   11/25/19 9:29:45 AM UTC   Success
Preconfigure Management Repository       11/25/19 9:29:45 AM UTC   11/25/19 9:29:45 AM UTC   Success
Preregister DLF                          11/25/19 9:29:45 AM UTC   11/25/19 9:29:45 AM UTC   Success
Stop management server                   11/25/19 9:29:46 AM UTC   11/25/19 9:31:27 AM UTC   Success
Register DLF                             11/25/19 9:31:27 AM UTC   11/25/19 9:33:40 AM UTC   Success
Configure Management Repository          11/25/19 9:31:27 AM UTC   N/A                       Running
Configure middle tier                    11/25/19 9:31:27 AM UTC   11/25/19 9:34:52 AM UTC   Success

The last step generally is to Start OMS and Recover Middle Tier, OMS will come back up and you will have your OMS Plugin version update.

You can verify either from console or like this
$ emcli login -username=sysman
$ emcli sync
$ emcli list_plugins_on_server 

OMS name is vineet-sandbox:4889_Management_Service
Plug-in Name                                 Plugin-id                     Version [revision]
Oracle Database                              oracle.sysman.db              13.3.2.0.0

DevOps: GIT - How to Sync Fork with Master or Pull Upstream

In this blog I am going to discuss about how to Sync your forked branch to the master branch. 
If you have followed my previous blog on Fork Workflow  then this blog is (somewhat) a continuation of that blog. 

Now if you have performed your steps properly then 


Check if you added upstream
$ git remote -v

If you have then good, else refer my previous blog. 

Update with master

$ git pull upstream master

That's it your fork is synced with master fork.

In case you want to break it down into multiple steps, you can use below
https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork

Friday, November 22, 2019

OEM 13cR3: OEM Catalog Updation OFFLINE

In almost every environment the outside world access is restricted. 
So, in that case what do you do if you want to upload the OEM Catalog.

You follow the offline way. (Remember in Provisioning and Patching you must set the mode to offline)

How? 
Go to Setup --> Extensibility --> Self Update 


Then click on the Check Updates Button

And viola you get your steps on what needs to be done. 

So, I download the file on my server 

https://updates.oracle.com/Orion/Download/download_patch/p9348486_112000_Generic.zip
and you can download like this

$ wget https://updates.oracle.com/Orion/Download/download_patch/p9348486_112000_Generic.zip --http-user=MOS_USERNAME --http-password=MOS_PASS --no-check-certificate --output-document=p9348486_112000_Generic.zip

Next is simple just impor the file directly into your Database using emcli 

$ ./emcli login -username=sysman

./emcli sync
./emcli import_update_catalog -file=/u01/Templates/p9348486_112000_Generic.zip -omslocal

And after about 2 minutes it should be over, you should have now refreshed your Catalog Updation. 

The log is below for your nerdy reference and comparison 


Processing catalog for Agent Software
Processing catalog for Middleware Profiles and Gold Images
Processing catalog for Data Masking and Subsetting templates
Processing catalog for Extensibility Development Kit
Processing catalog for Plug-in
Processing catalog for Management Connector
Processing catalog for Compliance Content
Processing catalog for Informational
Processing catalog for Provisioning Bundle
Processing catalog for Event Monitoring Service
Processing catalog for ORAchk Metadata
Processing catalog for Diagnostic Tools

Successfully uploaded the Self Update catalog to Enterprise Manager. Use the Self Update Console to view and manage updates.
Time taken for import catalog is 29.921 seconds.

OEM 13cR3: OEM Catalog Updation ONLINE

In this blog I am going to go over the steps where we will be updating the OEM Catalog in Online Mode. 

Online Mode requires you to have your MOS credentials to be put in the OEM console and then you can do the updates by yourself. 



Step 1: Set the credentials 

Go to Setup --> Provisioning and Patching --> Offline Patching
Set the Mode to Online 


Next Go To Setup --> My Oracle Support --> Set Credentials
Set your Oracle Support Credentials
When you do that you should see something like this  and it will automatically Update your Catalog and OPatch.




Else you will have to do it manually. 

If tomorrow after few months you have to do it by yourself then 
Next Go To Setup --> Extensibility --> Self Update 

Once in the Self Update Page -

Click on Self Update and it will do the self update (You can see the details of Job by click on the the Job details button)

Once the jobs will succeed your Catalog will be auto refreshed.