opatch investigations

This blogpost is about opatch and how to obtain information about the current oracle home(s), and how to obtain information about the patches to be applied.

Patches that can be applied using opatch are provided by oracle as zip files which have the following naming convention:
p[patchnumber]_[baseversion]_[platform]-[architecture].zip. The patch normally contains an XML file called ‘PatchSearch.xml’ and a directory with the patch number. Inside the patch number directory there is a README.txt (more...)

Ansible tips’n’tricks: executing related tasks together

I have recently written an ansible playbook to apply one-off patches to an Oracle Home. While doing this, I hit a little snag that needed ironing out. Before continuing this post, it’s worth pointing out that I’m on:

$ ansible --version
ansible 2.6.5

And it’s Ansible on Fedora.

Most likely the wrong way to do this …

So after a little bit of coding my initial attempt looked similar to this:

$ cat  (more...)

Preprocessing External Tables

A question that comes up now and again is there a way in Oracle Database 11g Express Edition to mimic some behavior in the Oracle Standard or Enterprise editions. Many of these questions arise because developers want to migrate a behavior they’ve implemented in Java to the Express Edition. Sometimes the answer is no but many times the answer is yes. The yes answers come with a how.

This article answers the question: “How (more...)

creating local repository yum install linux

Follow the below procedure

[root@ebs-app-xx-xx u01]# yum repolist

[root@ebs-app-xx-xx u01]# yum list installed | grep createrepo

createrepo.noarch                         0.9.9-28.el7             @anaconda/7.5

[root@ebs-app-xx-xx u01]# createrepo /u01/Packages/

 

[root@ebs-app-xx-xx u01]# cd /etc/yum.repos.d

[root@ebs-app-xx-xx yum.repos.d]# ls -tlr

total 4

-rw-r–r–. 1 root root 358 Nov  4 22:55 redhat.repo

Now, create custom repository

[root@ebs-app-xx-xx yum.repos.d]# cat custom.repo

[customrepo]

name=Custom Repository

baseurl=file:///u01/Packages/

enabled=1

gpgcheck=0

 

you can check how (more...)

Oracle Database 18c: Installation via rpm (without runInstaller.sh)

Three months after writing the post Where to find the oracle-database-ee-18c-1.0-1.x86_64.rpm package? Oracle released the rpms on their download page:


https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle18c-linux-180000-5022980.html

So let's give it a try.


First thing is to install the prerequisites:
# yum install oracle-database-preinstall-18c


...
=================================================================================================================================================
Package Arch Version Paketquelle Größe
=================================================================================================================================================
Installieren:
oracle-database-preinstall-18c x86_64 1.0-1.el7 ol7_latest 18 k
Als Abhängigkeiten installiert:
bc x86_64 1.06.95-13.el7 ol7_latest 114 k
bind-libs x86_64 32:9. (more...)

Using colplot to visualise performance data

Back in 2011 I wrote a blog post about colplot but at that time focused on running the plot engine backed by a web server. However some people might not want to take this approach, and thinking about security it might not be the best idea in the world anyway. A port that isn’t opened can’t be scanned for vulnerabilities…

So what is colplot anyway? And why this follow-up to a 7 year old post?

Some (more...)

MongoDB Update Statement

While discussing the pros and cons of MongoDB, my students wanted to know how to update a specific element in a collection. Collections are like tables in relational databases.

You create the users collection by inserting rows like this:

db.users.insert(
[
  { contact_account: "CA_20170321_0001"
  , first_name: "Jonathan"
  , middle_name: "Eoin"
  , last_name: "MacGregor"
  , addresses:
    {
      street_address: ["1111 Broadway","Suite 101"]
    , city: "Oakland"
    , state: "CA"
    , zip: "94607" 
    }
  }
, {  (more...)

Linux mongod Service

The installation of MongoDB doesn’t do everything for you. In fact, the first time you start the mongod service, like this as the root user or sudoer user with the command:

service mongod start

A sudoer user will be prompted for their password, like

A typical MongoDB instance raises the following errors:

Redirecting to /bin/systemctl start mongod.service
[student@localhost cit425]$ mongo
MongoDB shell version v3.4.11
connecting to: mongodb://127.0.0.1:27017
MongoDB server  (more...)

Remove this file if there is no X server

Try to start VNC, you may get the below error

 

[root@fusiondev ~]# vncserver

Warning: fusiondev.xxxxx.com:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server fusiondev.xxxx.com:1

New ‘fusiondev.xxxxx.com:2 (root)’ desktop is fusiondev.xxxxx.com:2

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/fusiondev.xxxxx.com:2.log

 

Solution :

[root@fusiondev tmp]# rm -rf /tmp/.X1-lock

[root@fusiondev tmp]# rm -rf /tmp/.X11-unix/X1

(more...)

jconsole/visualvm/java applications without fonts over ssh forwarding (characters displayed as boxes)

On servers which run java applications sometimes you need to run jconsole or jvisualvm.
This is typically no problem - ssh -X and you are done.

But in some rare circumstances you will get something like this:


??

Following some other sources, you end up with tweaking xorg parameter without any success. The solution is very easy:
apt-get install ttf-dejavu
And then:


Running orachk as part of TFA with support tools bundle

I have previously written a number of posts about OSWatcher integration in Tracefile Analyzer (TFA) w/support tools bundle (available from My Oracle Support Document ID 1513912.1). Thus far I have neglected another useful tool available to administrators in the same package: orachk.

Summary of the environment

My lab system used for this post uses Oracle Restart 12.1.0.2 on top of Oracle Linux 7.4. I installed TFA 18.3 to /opt/tfa. (more...)

Oracle wait event ‘TCP Socket (KGAS)’

I was asked some time ago what the Oracle database event ‘TCP socket (KGAS)’ means. This blogpost is a deep dive into what this event times in Oracle database 12.1.0.2.180717.

This event is not normally seen, only when TCP connections are initiated from the database using packages like UTL_TCP, UTL_SMTP and the one used in this article, UTL_HTTP.

A very basic explanation is this event times the time that a database (more...)

Little things worth knowing: OSWatcher Analyser Dashboard

I have written a few articles about Tracefile Analyzer (TFA) in the recent past. As you may recall from these posts, a more comprehensive TFA version than the one provided with the installation media is available from My Oracle Support (MOS for short). As part of this version, you get a lot of useful, additional tools, including OSWatcher. I love OSWatcher, simply because it gives me insights that would be very hard to get with (more...)

Enable X11 on Oracle Cloud Infrastructure

Today my colleague was starting with the installation of Oracle Database on the Oracle Cloud Infrastrcture, for a customer. He phoned me for help on enabling VNC to have a graphical UI to install the database.

Install an ssh client with XServer emulator

Most of my co-workers of around my age, have grown up with Putty. And apparently we as computer consultants are quite hooked to our tools. I know, only yesterday I mentioned it (more...)

Java: Slow java with server.policy enabled – how to fix this issue

If you use Java security manager for hardening your java processes, you have to add the following JVM options:
-Djava.security.manager
-Djava.security.policy=server.policy 
Create a server.policy file (you can use jdkXXX/jre/lib/security/java.policy as a tamplate) and add the following line:
permission java.net.SocketPermission "localhost:*", "listen, accept, connect, resolve"; 
Now create a small java program, which listens on a port (like this example).

If you send a message with netcat
(more...)

Resolving Slow Performance, Skipped Checks and Timeouts on Exa Check (exachk)

Background

For more information with regards to Exa Check, please read the following post:
How to use Oracle Exadata Database Machine Exa Check (exachk)

Slow Performance, Skipped Checks and Timeouts

When running the latest exachk (at time of writing, version 18.3.0_20180808), you may notice it takes a long time to run compared to the past.  This is due to the vast amount of additional checks carried out by the tool.  Due to (more...)

Repairing a Linux host with disk/filesystem issues

This is a writeup on some scenario’s for disk issues that you could encounter when running linux systems. The linux systems I am talking about are centos/redhat/oracle (EL) version 7 systems. This is just a writeup for myself to know how to deal with different scenario’s, hopefully other people find this interesting too. I don’t believe there is any difference for the below scenario’s and resolutions between running physical/bare metal, virtualised or in the cloud, (more...)

Linux: journalctl and systemd – better than /var/log/messages?

Nearly 8 years ago systemd was introduced on some Linux distribution (s. here). Last week i discovered some helpful commands, which i share with you.

If you want to take a look at kernel message (for example system boot), you command is
dmesg
The new equivalent is
journalctl -k
Ok - not really amazing.
But all of you know the message
See "systemctl status nginx.service" and "journalctl -xe" for details.
You can run (more...)

Missing directory in /var/run or /run – tmpfiles.d

Sometimes is happens, that an application/demon refuses to start because of missing files/directories in /var/run.
The first solution is:
  • Create the directory in /var/run
  • Change the permissions
and everything is fine.

Not really.

After the next reboot, the directory is missing again and you have to go for the "first" solution again.

The right solution works like this:
Inside /usr/lib/tmpfiles.d create a myexample.conf file with this content:
        d /var/run/myexample  (more...)

Extending the root LVM Partition on Exadata

On an Oracle Exadata Database Machine, the ‘/’ (root) is defaulted to a size of 30Gb, which can easily fill up.  Luckily this is just a Logical Volume and there’s normally lots of space available on the Logical Volume Group which is usually untapped.

Extending ‘/’

Identify how much space is used and free on ‘/’ using df:

[root@v1ex1dbadm01 ~]# df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VGExaDb-LVDbSys1
                       30G   22G   (more...)