Adding a GUI to Oracle Enterprise Linux from the local install media

I’ve made this mistake a few times now.

In my excitement to get a new copy of OEL installed, I manage to forget to select the version with the GUI.  I reboot my VM, and am presented with a command-line login.

Of course I could just delete the VM and start over.  Or I could follow the instructions available from several sites and blogs that explain a simple yum command to a public repo is all I need to add the missing graphical interface:

$ yum groupinstall  "Server with GUI"

But more often than not, I am doing this in a company lab that is more locked down than Ft. Knox.  Draconian network security mandates mean no public internet access, and it would be an act of Congress to get that changed.

I am not dismissive of the need for security, it is absolutely of upmost importance and too often is overlooked, but there is also a  reason why most large IT companies can no longer innovate and must rely on M&A to acquire new ideas, and it isn’t a lack of creative engineers among their ranks.

So how do we install the missing GUI from the local install media?

First we need to mount the install media back to Linux.  If we are using VMware, we need to use vCenter to edit the VM machine and mount the install media ISO file.

Once that is done, mount the ISO media image to the OS:

$ mkdir -p /media/iso

$ mount /dev/sr0 /media/iso
mount: /dev/sr0 is write-protected, mounting read-only

We should now be able to see the contents of the ISO file:

[root@localhost ~]# ls -al /media/iso
total 1310
drwxr-xr-x. 9 root root 4096 Apr 12 2018 .
drwxr-xr-x. 3 root root 17 Mar 30 13:42 ..
drwxr-xr-x. 4 root root 2048 Apr 12 2018 addons
-rw-r--r--. 1 root root 46 Apr 12 2018 .discinfo
drwxr-xr-x. 3 root root 2048 Apr 12 2018 EFI
-rw-r--r--. 1 root root 8643 Apr 12 2018 EULA
-rw-r--r--. 1 root root 18390 Apr 12 2018 GPL
drwxr-xr-x. 3 root root 2048 Apr 12 2018 images
drwxr-xr-x. 2 root root 2048 Apr 12 2018 isolinux
drwxr-xr-x. 2 root root 2048 Apr 12 2018 LiveOS
drwxr-xr-x. 2 root root 831488 Apr 12 2018 Packages
-rw-r--r--. 1 root root 105321 Apr 12 2018 RELEASE-NOTES-U5-en
-rw-r--r--. 1 root root 349404 Apr 12 2018 RELEASE-NOTES-U5-en.html
drwxr-xr-x. 2 root root 4096 Apr 12 2018 repodata
-rw-r--r--. 1 root root 1011 Apr 12 2018 RPM-GPG-KEY
-rw-r--r--. 1 root root 1011 Apr 12 2018 RPM-GPG-KEY-oracle
-r--r--r--. 1 root root 3322 Apr 12 2018 TRANS.TBL
-rw-r--r--. 1 root root 2202 Apr 12 2018 .treeinfo

Okay, but now we need yum to be able to use these files, and not try to access the public yum repository to which we don’t have access from inside the corporate fire walls.

First let’s disable the public yum repo file:

$ cd /etc/yum.repos.d
$ mv public-yum-ol7.repo public-yum-ol7.repo.bak

Now we need to add a new repo file that points at the locally mounted ISO files:

[graham@localhost yum.repos.d]$ cat dvd.repo
[dvd]
name=Install DVD
baseurl="file:///media/iso"
gpgkey="file:///media/iso/RPM-GPG-KEY-oracle"
gpgcheck=1
enabled=0

With that done, we can now add the missing GUI as follows:

$ yum groupinstall --enablerepo=dvd "Server with GUI"

And finally:

$ systemctl set-default graphical.target

Removed symlink /etc/systemd/system/default.target
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/graphical.target.

Reboot the VM, and you should get a graphical login prompt.

Oracle Partitioning and Standard Edition

Oracle Partitioning is a great feature.

Large tables can be partitioned into smaller pieces based on data ranges, values or dates, and queries that are designed to respect the partitioning scheme can automatically discount from consideration partitions that do not contain applicable data.

Partitions can be added or removed, moved, made read only, and so on.

That is only a very brief overview of the benefits of partitioning to large database tables, and anyone who had designed a data warehouse will understand why this feature is so powerful.

But it is also very expensive.

Oracle Partitioning is only available as an add-on cost to the already expensive Enterprise Edition license.

But what about if you want to realize some of these benefits without paying for the Partitioning option?  Taking this even further could we implement some form of Partitioning with the massively less expensive Standard Edition?

Continue reading

A method to fix a corrupted SPFILE in ASM

So you’ve made some changes to your SPFILE, and since the parameters you want change cannot be made to a running instance, you used the scope=spfile clause.

Now you go to restart your database, and you find the instance won’t start!

[oracle@sio01-mgmt sql]$ srvctl start database -d dbbench
PRCR-1079 : Failed to start resource ora.dbbench.db
CRS-5017: The resource action "ora.dbbench.db start" encountered the following error:
ORA-01078: failure in processing system parameters
. For details refer to "(:CLSN00107:)" in "/u01/app/oracle/diag/crs/sio02-mgmt/crs/trace/crsd_oraagent_oracle.trc".

Continue reading

Resolving ORA-27090: Unable to reserve kernel resources for asynchronous disk I/O in Oracle 12c

I have been running into some problems recently with 12cR2 databases and Kevin Clossons’ SLOB tool.

The SLOB setup.sh script allows for the concurrent loading of multiple schemas, and if you are loading a large amount of data, being able to load concurrently is a significant time saver.

With LOAD_PARALLEL_DEGREE set to 8, I got the following error:

ORA-27090: Unable to reserve kernel resources for asynchronous disk I/O
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 3
Additional information: 128
Additional information: 140728056780720

These servers were new Dell R630s with plenty of horsepower, so the idea that just 8 parallel threads would cause this type of a failure was puzzling.

Further investigation of the trace file showed that the problem occured on the index shrink command:

SQL> SQL> ALTER INDEX i_cf1 SHRINK SPACE COMPACT
*
ERROR at line 1:
ORA-12801: error signaled in parallel query server P13L, instance
sio04-mgmt.asp.lab.mcl:slob4 (4)

After some time investigating, it seems Oracle 12c has a much higher target for PARALLEL_MAX_SERVERS and PARALLEL_SERVERS_TARGET.  In my case, PARALLEL_MAX_SERVERS had defaulted to 2240.

Since the SLOB data load uses the parallel query option, Oracle was spawning thousands of slave processes all trying to issue ASYNC IO.

So I set the numbers to what I considered more reasonable:

SQL> alter system set parallel_max_servers=400 sid='*';

System altered.

SQL> alter system set parallel_min_servers=40 sid='*';

System altered.

SQL> alter system set parallel_servers_target=400 sid='*';

System altered.

Now SLOB was able to load data with eight concurrent processes.

Restore an RMAN backup to a different host

 

Oracle RMAN is a powerful tool with many features for recovering datafiles, tablespaces or even single blocks, as well as cloning databases for non production uses.  However restoring a database to an entirely different server (or set of servers) it was backed up from is a somewhat cumbersome process.

In this post we will restore an RMAN backup to a new host, keeping the same database name and datafile names.

Continue reading

RMAN Restore fails with “PSDRPC returns significant error 3113”

When using RMAN to restore a database to a new host, the recover database step fails with:

Crosschecked 43 objects
PSDRPC returns significant error 3113.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/18/2017 19:31:23
ORA-03113: end-of-file on communication channel

Continue reading

EMC Unity Storage Performance testing with Oracle ASM and SLOB

I’ve been testing the new EMC Unity 600F all-flash storage array with an Oracle database to determine the impact of storage compression on Oracle I/O performance.  To do this I have been using Kevin Closson’s SLOB tool.

SLOB is an excellent tool for testing I/O performance as seen by Oracle.  Unlike Swingbench which mimics a real application and therefore spends much of its execution cycle on the server CPU, SLOB concentrates exclusively on generating I/O from the Oracle stack.

Conversely, don’t expect SLOB to generate meaningful data to test ranking or sorting operations inside of Oracle.  SLOB generates entirely synthetic data that is meaningless from an application standpoint.

The following posts covers using SLOB to test I/O performance, and what was learned from the testing against the Unity 600F all-flash array.

Continue reading

Experimenting with ASM Filter Drivers

Oracle is moving away from ASMlib, and introducing ASM Filter Drivers as a replacement.

ASM Filter Drivers will handle consistent device naming and permissions, as well as filter out illegal IO to ASM devices to protect against rogue dd commands corrupting ASM disks.

Future plans include support for TRIM commands to enable thinly provisioned disks to reclaim deleted blocks without having to resort to the massively dangerous ASRU tool.

ASM Filter Drivers were introduced with Oracle 12.1.0.2, but the implementation is currently one massive kludge.  By default on 12.1.0.2, OEL7 is not supported without a patch (patch 21053000).  OEL6 UEK is also not supported without a patch (patch 18321597).

Note that the patches require OPatch 12.1.0.2, but Oracle Grid Infrastructrue 12.1.0.2 installs OPatch 12.1.0.1.3 so you have to patch the patcher (patch 6880880), so you can patch the Oracle software, to make Oracle ASM Filter Drivers work with Oracle’s own operating system kernel.  Clear?  Good!

You cannot install Filter Drivers by default.  You have to migrate to them from UDEV or ASMlib.

Oracle 12.2 should hopefully fix this mess and make Filter Drivers actually usable, but in the meantime it might be fun to play with the new technology and see what it can do.

Continue reading

ASM Filter Drivers – disks not filtering on reboot

 

 

You’ve enabled ASM Filter Drivers, migrated your existing disks, and then after you reboot you see this:

[oracle@oel6solo ~]$ asmcmd afd_lsdsk
--------------------------------------------------------------------------------
Label Filtering Path
================================================================================
DATA2 DISABLED /dev/sdc
DATA4 DISABLED /dev/sde
DATA3 DISABLED /dev/sdd
DATA1 DISABLED /dev/sdb

You check the ASM Filter Driver state and it says it is loaded and filtering:

[oracle@oel6solo ~]$ asmcmd afd_state
ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'DEFAULT' on host 'oel6solo.comp-lab.sc'

There is one more step that much of the documenation is missing:

[oracle@oel6solo ~]$ $ORACLE_HOME/bin/asmcmd afd_filter -e

Now the ASM FD filtering will survive a reboot:

[oracle@oel6solo ~]$ asmcmd afd_lsdsk
--------------------------------------------------------------------------------
Label Filtering Path
================================================================================
DATA2 ENABLED /dev/sdc
DATA4 ENABLED /dev/sde
DATA3 ENABLED /dev/sdd
DATA1 ENABLED /dev/sdb