Showing posts with label Unix / Linux. Show all posts
Showing posts with label Unix / Linux. Show all posts

Friday, March 29, 2024

Install Oracle Database 19c Client on Oracle Linux 9 Subsystem on Windows 11

Beginning with 19.22 Jan2024 RU, the 19c database is certified on Oracle Linux 9.x and Red Hat Enterprise Linux (RHEL) 9.x. The minimum kernel version has to be 5.15.0 with Oracle Linux 9 and 5.14.0 with RHEL.

Therefore, I want to try 19c client on my favorite  Windows Subsystem for Linux which is running Oracle Linux 9. The installation includes following steps,

 1) Update WSL kernel version
 
    It is strongly recommended to update the kernel version to 5.15 or higher which is minimum version for Oracle Database 19c on Oracle Linux 9.

 2) Install Oracle Linux 9.1 Subsystem

    You also have other choices (e.g. Oracle Linux 9.2, Oracle Linux 9.3) if you are installing from Microsoft Store instead of command line.

 3) Configure Oracle Linux 9 for Oracle Database installation

 4) Install Oracle Database 19c (19.22) Client

Saturday, February 26, 2022

Script Find the Regular Source File of the Multi-level Symbolic Link on Linux / Unix

 A bash script is used to find out the final regular source file or directory of a multi-level symbolic on Linux and Unix (AIX, Solaris) platform.

Wednesday, February 9, 2022

Configure Reverse Path Filter parameter "rp_filter" on Oracle Linux and Red Hat Enterprise Linux

When installing Oracle Grid Infrastructure (GI) 12c or higher version (18c, 19c, 21c), multiple network interfaces (NIC) can be used as private interconnection to implement inter-communication load balance and failover. However, if this configuration is adopted on Oracle Linux (OL) 6 or Red Hat Enterprise Linux (RHEL) 6 or higher, the GI installation prerequists checking shows error 

Wednesday, February 2, 2022

Oracle 19c GI installation failed with PRVG-13605 : Query of chrony daemon for its time sources could not be performed

The issue happens on Oracle Linux / Red Hat Enterprise Linux 7/8 on which chronyd is adopted as the network time protocol daemon instead of ntpd. When installing Oracle Grid Infrastructure 19c on these platform, the installation fails during prerequisit check, the message shows that

Verifying Network Time Protocol (NTP) ...FAILED
  Verifying chrony daemon is synchronized with at least one external time
  source ...FAILED
  rac01: PRVG-13605 : Query of chrony daemon for its time sources could not
         be performed on node "rac01".
         PRVG-2043 : Command "/usr/bin/chronyc sources " failed on node
         "rac01" and produced the following output:
         506 Cannot talk to daemon

  rac02: PRVG-13605 : Query of chrony daemon for its time sources could not
            be performed on node "rac02".
            PRVG-2043 : Command "/usr/bin/chronyc sources " failed on node
            "rac02" and produced the following output:
            506 Cannot talk to daemon

Friday, December 10, 2021

Mount DVD/CDROM with command on Linux CentOS / Red Hat / Oracle Linux / Ubuntu

 Minimal install is an important security for deploying Linux. It means only essential packages are installed. Therefore, GUI is usually not available. It becomes helpful to know how to mount CDROM/DVD when you need to install packages/software from DVD.

Sunday, June 20, 2021

Script Run datapatch against all running instance in parallel

This script can be used to run datapatch against all currently running instances in parallel to apply sql patches after patches are applied on Oracle homes. It is helpful for post patching operations. It works for different instances running out of different Oracle homes and different home with different owners.

Friday, June 18, 2021

Install PostgreSQL on RHEL/OL/CentOS 6/7/8

There are many ways to install PostgreSQL on Linux box. Here, I am going to use yum to install different version of PostgreSQL on Red Hat Enterprise Linux (RHEL) 7/8, it also works for Oracle Linux (OL) / CentOS 7/8.

Wednesday, June 16, 2021

Oracle 19.11 roothas.sh failed with "Out of memory" on AIX

When applying Oracle GI Release Update 19.11.0.0.210420 on AIX, command "roothas.sh -postpatch" failed with "Out of memory" as following
[root@host01]# /u01/app/oracle/product/19.0.0/grid_1/crs/install/roothas.sh -postpatch
Using configuration parameter file: /u01/app/oracle/product/19.0.0/grid_1/crs/install/crsconfig_params

Tuesday, June 15, 2021

Configure yum with proxy server on RHEL/OL/Fedora

When using yum to maintain packages on hosts running Red Hat Enterprise Linux (RHEL), Oracle Linux (OL) or Fedora, you may have to configure proxy option if the host is running behind firewall.

Wednesday, March 31, 2021

OEM 13.4 AgentPull.sh failed with '0403-011 The specified substitution is not valid for this command'

When using Oracle Enterprise Manager 13.4 AgentPull.sh to deploy Agent 13.4 on AIX server, got following error,
./AgentPull.sh[270]: platform=${platform/\)/%29}: 0403-011 The specified substitution is not valid for this command.

Line 270 in AgentPull.sh is
platform=${platform/\)/%29}

It is a bash statement which tries to replace right parenthesis with code '%29', it works for bash but not Bourne shell (sh). The problem is that the script has directive to have Unix/Linux to run the script under bourne shell
$ head AgentPull.sh
#!/bin/sh
#
# $Header: emcore/install/unix/AgentPull.sh.template /main/30 2019/12/19 21:29:10 vbhaagav Exp $
#
# AgentPull.sh
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
#
#    NAME
#      AgentPull.sh - <one-line expansion of the name>

The script works on most Linux servers because the /bin/sh is a symbolic link file linked to /bin/bash on these servers. Unfortunately, AIX is honest :), sh is sh and bash is bash, they are different.

As workaround, replace first line of AgentPull.sh '#!/bin/sh' with '#!/bin/bash'.

Tuesday, December 1, 2020

Create Oracle ASM disks using multipath devices and udev rules on Oracle Linux / Red Hat Enterprise Linux

 Since Oracle Automatic Storage Management Filter Driver (ASMFD) was released with Oracle Database 12c, DBA has very few chance to work with udev rules when creating ASM disks. 

Fortunately, Oracle Database 19.6 introduced a new feature, Zero-Downtime Grid Infrastructure patching which brings the requirement of udev rules back to DBA. When Oracle ASMFD is used for ASM disks, Oracle patching has to update the operating system driver for ASMFD, which cannot be done in zero-downtime mode. Therefore, in order to patch Grid Infrastructure in zero-downtime mode instead of rolling mode, udev rules becomes a perfect option.

Friday, November 27, 2020

Rename / Change the Multipath Device Names on Linux

 Each multipath device has a World Wide Identifier (WWID), which is guaranteed to be globally unique and unchanging. By default, the name of a multipath device is set to its WWID. Alternately, you can set the user_friendly_names option in the multipath configuration file, which sets the alias to a node-unique name of the form mpathn.

Thursday, November 5, 2020

Oracle AHF installation failed with "AHF-00074: Perl Modules not found: Data::Dumper"

Oracle combined Trace File Analyzer (TFA) & ORAchk/EXAchk into single installer called Oracle Autonomous Health Framework (AHF).

When installing AHF on Linux platform (Red Hat Enterprise Linux / Oracle Linux), got error "AHF-00074: Perl Modules not found :  Data::Dumper"
[root@host01]# ./ahf_setup
AHF Installer for Platform Linux Architecture x86_64
AHF Installation Log : /tmp/ahf_install_202300_4904_2020_11_05-18_04_25.log
PERL : /u01/app/19.9.0/grid/perl/bin/perl
[ERROR] : AHF-00074: Perl Modules not found :  Data::Dumper

Saturday, October 31, 2020

Tuesday, October 27, 2020

Reduce number of privileged access audit files for ASM with rsyslog on Linux

This post shows how to configure rsyslog on Linux (Red Hat Enterprise Linux 7/8) to redirect ASM audit message to OS log files.

If you are looking for the information for Solaris or AIX, please check out following posts

Tuesday, October 20, 2020

Install and Configure Kerberos Authentication on Red Hat Enterprise Linux 8

The demonstration includes three installation/configuration parts,

  Part 1. Install and configure Kerberos Key Distribution Center (KDC) Server
  
     Server name: xdc01.lab.dbaplus.ca
     OS version:  Red Hat Enterprise Linux (RHEL) 8

  Part 2. Install and configure Kerberos client on application (SSH) server
  
     Server 1: host01.lab.dbaplus.ca
     Server 2: host02.lab.dbaplus.ca
     OS version:  Red Hat Enterprise Linux (RHEL) 8
  
  Part 3. Install and configure Kerberos client on workstation to test single-sign-on (SSO) for SSH authentication with Kerberos

Monday, June 10, 2019

Reduce number of privileged access audit files for ASM with syslog on AIX

ASM instance audits all privileged (log in as sysasm, sysdba or sysoper) access by creating audit file for each connection under the audit file destination directories (defined by initialization parameter audit_file_dest). The directory can grow to contain a very large number of files if they are not regularly maintained, especially when initialization parameter audit_sys_operations is true which is default from 12c.

Tuesday, January 15, 2019

Disable Transparent Hugepages on Oracle Linux / Redhat Enterprise Linux

Transparent Hugepages (THP) are similar to standard HugePages. However, while standard HugePages allocate memory at startup, Transparent Hugepages memory uses the khugepaged thread in the kernel to allocate memory dynamically during runtime, using swappable HugePages.

They may cause delays in accessing memory that can result in node restarts in Oracle RAC environments, or performance issues or delays for Oracle Database single instances. Oracle recommends to disable Transparent HugePages on Oracle database servers.

Following discussion is based on Oracle Linux / Redhat Enterprise Linux 7.5, it may be different on other Linux distributions.
Updated on Tuesday, February 1, 2022 with following,
It also works for Oracle Linux /Redhat Enterprise Linux 8.x

Thursday, March 1, 2018

How to delete archive log files using PL/SQL


Although RMAN is always the first choice for most DBAs to delete archive log files, PL/SQL could be easier for this scenario,

User wants to switch an existing database from NOARCHIVELOG mode to ARCHIVELOG mode in order to increase the database availability because the database backup job has to shut down database when running in NOARCHIVELOG mode.

Friday, February 2, 2018

Desktop Icons and Panels Missing in VNC Viewer Connection

When VNC viewer connected to Linux server (Oracle Enterprise Linux 6.4), the desktop only show the wallpaper
and the desktop icons and panels are missing. 

And the log file /home/oracle/.vnc/host01.lab.dbaplus.ca:3.log contains following:
Fri Feb  2 20:11:16 2018
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5903
 vncext:      created VNC server for screen 0
gnome-session[9361]: WARNING: Unable to find provider 'gnome-panel' of required component 'panel'
gnome-session[9361]: WARNING: Unable to find provider 'nautilus' of required component 'filemanager'

Verify if the .desktop file for each component in the error messages exists,
[oracle@host01]$ ls -l /usr/share/applications/*panel*
ls: cannot access /usr/share/applications/*panel*: No such file or directory

[oracle@host01]$ ls -l /usr/share/applications/*nautilus*
ls: cannot access /usr/share/applications/*nautilus*: No such file or directory

The files are missing. Check if the packages are installed, 
[oracle@host01]$ rpm -q gnome-nautilus
package gnome-nautilus is not installed
[oracle@host01]$  rpm -q gnome-panel
package gnome-panel is not installed

Neither is found, install them,
[root@host01]# yum install gnome-panel nautilus
<<messages are truncated>>
Installed:
  gnome-panel.x86_64 0:2.30.2-14.el6                         nautilus.x86_64 0:2.28.4-19.el6

Dependency Installed:
  exempi.x86_64 0:2.1.0-5.el6                              gnome-disk-utility-libs.x86_64 0:2.30.1-2.el6
  gnome-session-xsession.x86_64 0:2.28.0-18.el6            gvfs.x86_64 0:1.4.3-15.el6
  libatasmart.x86_64 0:0.17-4.el6_2                        libcdio.x86_64 0:0.81-3.1.el6
  libcroco.x86_64 0:0.6.2-5.el6                            libexif.x86_64 0:0.6.21-5.el6_3
  libgsf.x86_64 0:1.14.15-5.el6                            librsvg2.x86_64 0:2.26.0-5.el6_1.1
  mtools.x86_64 0:4.0.12-1.el6                             nautilus-extensions.x86_64 0:2.28.4-19.el6
  smp_utils.x86_64 0:0.94-4.el6                            udisks.x86_64 0:1.0.1-4.el6
  unique.x86_64 0:1.1.4-2.el6

Complete!

[root@host01]# rpm -q nautilus
nautilus-2.28.4-19.el6.x86_64
[root@host01]# rpm -q gnome-panel
gnome-panel-2.30.2-14.el6.x86_64

[root@host01]# ls -l /usr/share/applications/*panel*
-rw-r--r-- 1 root root 14928 Apr  7  2011 /usr/share/applications/gnome-panel.desktop
[root@host01]# ls -l /usr/share/applications/*nautilus*
-rw-r--r-- 1 root root  3393 Apr 29  2012 /usr/share/applications/gnome-nautilus-autorun-software.desktop
-rw-r--r-- 1 root root 10634 Apr 29  2012 /usr/share/applications/gnome-nautilus-browser.desktop
-rw-r--r-- 1 root root 12690 Apr 29  2012 /usr/share/applications/gnome-nautilus-computer.desktop
-rw-r--r-- 1 root root  3960 Apr 29  2012 /usr/share/applications/gnome-nautilus.desktop
-rw-r--r-- 1 root root 11229 Apr 29  2012 /usr/share/applications/gnome-nautilus-file-management-properties.desktop
-rw-r--r-- 1 root root  3058 Apr 29  2012 /usr/share/applications/gnome-nautilus-folder-handler.desktop
-rw-r--r-- 1 root root  7651 Apr 29  2012 /usr/share/applications/gnome-nautilus-home.desktop
[root@host01]#

Now, we can start vnc-viewer to create a connection with everything needed.