Linux for the SQL Server DBA- Part I

For the Oracle DBA, Linux is life.  When I was at Oracle, Linux projects were the easy part of my job, unlike the ones on Windows, AIX, HP-UX and at times, even Solaris.  You knew the Linux ones received the most love from development, had the most time towards patching and received attention if there was a bug.

History

Linux was introduced in 1991, thanks to Linus Tovalds and has been in active (more...)

Debugging bash scripts on remote hosts using Eclipse

After installing the two plugins
it is very easy to debug scripts inside your workspace on your computer. But i was wondering, if this can work on a remote host, too.

So what has to be done?

Only these steps:
  • copy your shell scripts AND _DEBUG.sh onto your remote host
  • change the first line of _DEBUG.sh from
    exec 33<>/dev/tcp/localhost/33333
    to
    exec 33<>/dev/tcp/host_running_eclipse/33333
After that start the debugger (more...)

Oracle Linux: How to change from uek to Red Hat compatible kernel

After a standard installation of Oracle Linux the uek kernel is bootet by default (unbreakable enterprise kernel).
# uname -a
Linux localhost.localdomain 4.1.12-94.3.9.el7uek.x86_64 #2 SMP Fri Jul 14 20:09:40 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux
This behaviour can be changed with these commands:
First you have to get the linenumber of your new target kernel:
# grep ^menuentry /etc/grub2.cfg  | xargs printf '%s\n' |grep Oracle
(more...)

Virtualbox: How to use shared folders (aka gemeinsame Ordner)

If you want to use a directory inside a virtualbox vm without copying all files, you can use the shared folders.
Just choose a folder to share:

Then inside the vm type:
[root@localhost oracle]# mount -t vboxsf 12c /mnt
and that's it:
[root@localhost oracle]# df -h |grep 12c
12c                  180G    129G   52G   72% /mnt
or
[root@localhost oracle]# mount | grep 12c
12c on /mnt type vboxsf (rw,nodev,relatime)

When you are done just unmount the folder with
umount /mnt

Running Oracle Linux inside VirtualBox: Installation Virtualbox guest additions

First you have to insert the Virtualbox Guest Additions iso-image:
You can check this here:
 If this does not work, just add the iso into the IDE controller of virtualbox:

 As root you have to mount the image:


Before you can run the installer you have to get the following packages:

yum list kernel*
Take the one with "devel" which version matches:
uname -a
Linux localhost.localdomain 4.1.12-94.3.9.el7uek.x86_64 (more...)

Running Oracle Linux inside VirtualBox: Installation

After configuring the HDD, RAM, network, etc on VirtualBox (take a look here), i started the VM:

 
 Choose "Install Oracle Linux7.4":

Language settings:
 Overview (partitioning and network missing):
 Network interface:
 Partitioning:
 Start package installation:
 Configure passwords / users:
 
 Waiting for reboot:
(Installation of the virtualbox guest additions can be found here)
(Preconfiguration steps for virtualbox can be found here)

Running Oracle Linux inside Virtualbox: Preconfiguration of the virtualization engine

This is a walkthrough the VirtualBox GUI settings to install Oracle Linux. First you have to name your VM and choose Oracle Linux 64 bit:
RAM:
HDD:
HDD type:
HDD dynamic/static:
HDD size:
After these steps you have to mount the iso image:

And you should configure a network adapter. I chose the WLAN interface of my laptop:

I will post the walkthrough the installation process soon.
(Installation of the virtualbox guest additions can be found here)

How to install MongoDB

This post shows the yum command to install the MongoDB packages on Linux. More on setup and use will follow.

You install the MongoDB package with the following yum command:

yum install -y mongodb

You should see the following log file, which may also show a missing mirrored site:

Loaded plugins: langpacks, refresh-packagekit
cassandra/signature                                         |  819 B  00:00     
cassandra/signature                                         | 2.9 kB  00:00 !!! 
mysql-connectors-community                                  | 2.5 kB  00:00     
mysql-tools-community                                       | 2.5 kB   (more...)

Changes to the Oracle preinstall RPMs in OL 7.3 and OL 7.4

For quite some time now Oracle has documented the use of the so-called preinstall RPMs to prepare Oracle Linux for the installation of the Oracle database software. I think that’s a great idea if the settings applied by the RPM fit your environment. If I find the time, I’ll write a blog post about what it does specifically in a little while. It definitely fits my lab environment, and I regularly kickstart my OL 7 (more...)

How to automatically build any recent version of the Oracle database.

There are many situations where you want to use a very specific configuration of the Oracle database, for example when a client has an issue and is still on EL5, or gets disk errors on a filesystem that is ext3, or is using ASM and gets weird IO patterns. Other examples are: you want to test the newest PSU to see if responds differently to an issue you are working on, or you want to (more...)

The full table scan direct path read decision for version 12.2

This post is about the decision the Oracle database engine makes when it is using a full segment scan approach. The choices the engine has is to store the blocks that are physically read in the buffercache, or read the blocks into the process’ PGA. The first choice is what I refer to as a ‘buffered read’, which places the block in the database buffercache so the process itself and other processes can bypass the (more...)

How to use Oracle Exadata Database Machine Exa Check (exachk)

Oracle customer who are fortunate to have an Oracle Exadata Database Machine, will need to run “exachk” from time to time, which is pronounced as Exa-Check.  This tool check your Oracle Exadata Database Machine configuration, software, critical issue and provide a Maximum Availability Architecture score.  It is required to run before and after Exadata patching and is good practice to run on frequent basis and review the recommendations.

More info here:

Oracle Exadata Database Machine exachk (more...)

How to update OPatch

When apply patches, such as PSUs or one-offs, you may need to update OPatch to meet the minimum OPatch version.  It is also recommend to update OPatch when apply any patch.

To see your current OPatch version:

[oracle@v1ex1dbadm01 ~]$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome_1
[oracle@v1ex1dbadm01 ~]$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.1.0.1.3

OPatch succeeded.
[oracle@v1ex1dbadm01 ~]$

Backup existing OPatch:

[oracle@v1ex1dbadm01 ~]$ cd $ORACLE_HOME
[ (more...)

Provide access to #WebLogic DMS Spy Servlet for readonly users

For security reasons and to prevent the configuration drift it is recommendable to use read only for analyzing problems.

For read only access of configuration and logs WebLogic provides out of the box the group Monitors. Unfortunately you cannot access DMS Spy Servlet with this group, which is useful for analyse runtime values of the server. Only users which belongs to the Administrators group and therefore have full access can access DMS Spy Servlet and (more...)

12.2 New Feature: the FLEX ASM disk group part 4

Flex Disk Group Properties

In the previous 3 parts I shared my investigation into ASM Flex Disk Groups, Quota Groups, File Groups, and how Quota Groups actually enforce space limits. What I haven’t discussed yet was changing properties of a File Group and the effects thereof. Properties I have in mind are related to the protection level, as discussed in the official documentation-Automatic Storage Management Administrator’s Guide, Administering Oracle ASM Disk Groups. There are of (more...)

How to Checksum Downloads

As a DBA, in your time, you will need to download files such as Oracle binaries, patches, etc.  As a rule of thumb, you should always checksum you downloads, to ensure they are free of corruption.  In my example, I needed to download:
Patch 25440397: QUARTERLY FULL STACK DOWNLOAD PATCH FOR EXADATA (Apr 2017 – 12.1.0.2)

This is the Quarterly Full Stack Download Patch for Exadata, which is 10 zip files that (more...)

Disable SELinux on Oracle Linux 7

Sometimes when I want to test something or write a prototype of some sort SELinux (Security-Enhanced Linux) kicks in and hinders me, given that it is enabled by default on OL 7 UEK 4. STOP! Before I let you continue to read take a mental note of my disclaimer: I am an advocate of having … Continue reading "Disable SELinux on Oracle Linux 7"

Installation of Rundeck with the Ansible plugin on Centos 7

This post shows you how to install Rundeck with the Ansible plugin on Centos 7. The installation is done with nginx as the web server and using SSL with a self signed certificate. Please read the Ansible installation script, and modify anything that should be different for your situation. You will be amazed how well readable the installation script is!

Rundeck is a web based user interface that allows you to run commands against a (more...)

Installation overview of node_exporter, prometheus and grafana

Prometheus is an open source systems monitoring and alerting toolkit originally build at Soundcloud. This blogpost shows how to install the needed components to do visualisation of linux system statistics via Grafana.

The setup consists of 3 components:
node_exporter, an exporter of system and hardware metrics.
prometheus, a metric collection and persistence layer.
grafana, the visualisation layer.

1. Preparation
The needed components are installed in the home directory of (more...)

Linux memory usage

One of the principal important configuration settings for running an Oracle database is making appropriate use of memory. Sizing the memory regions too small leads to increased IO, sizing the memory regions too big leads to inefficient use of memory and an increase in memory latency most notably because of swapping.

On Linux, there is a fair amount of memory information available, however it is not obvious how to use that information, which frequently leads (more...)