Visit Counter

Thursday, April 8, 2021

MYSQL 8.0 Installation on Linux

 

Download MYSQL 8 for Linux 

https://downloads.mysql.com/archives/community/

Red Hat Enterprise Linux 7 / Oracle Linux 7 (x86, 64-bit), RPM Bundl

Remove MariaDB

[root@rac02 ~]# yum remove mariadb-libs

Loaded plugins: langpacks

Resolving Dependencies

--> Running transaction check

---> Package mariadb-libs.x86_64 1:5.5.35-3.el7 will be erased

--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: perl-DBD-MySQL-4.023-5.el7.x86_64

--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 1:qt-mysql-4.8.5-8.el7.x86_64

--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64

--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package: perl-DBD-MySQL-4.023-5.el7.x86_64

--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package: 1:qt-mysql-4.8.5-8.el7.x86_64

--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64

--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.35-3.el7 for package: 1:mariadb-server-5.5.35-3.el7.x86_64

--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.35-3.el7 for package: 1:mariadb-5.5.35-3.el7.x86_64

--> Running transaction check

---> Package mariadb.x86_64 1:5.5.35-3.el7 will be erased

---> Package mariadb-server.x86_64 1:5.5.35-3.el7 will be erased

--> Processing Dependency: mariadb-server for package: akonadi-mysql-1.9.2-4.el7.x86_64

---> Package perl-DBD-MySQL.x86_64 0:4.023-5.el7 will be erased

---> Package postfix.x86_64 2:2.10.1-6.el7 will be erased

---> Package qt-mysql.x86_64 1:4.8.5-8.el7 will be erased

--> Running transaction check

---> Package akonadi-mysql.x86_64 0:1.9.2-4.el7 will be erased

--> Finished Dependency Resolution

ol7_UEKR3/x86_64                                         | 2.5 kB     00:00     

ol7_UEKR3/x86_64/updateinfo                              | 121 kB     00:00     

ol7_UEKR3/x86_64/primary_db                              |  57 MB     00:05     

ol7_latest/x86_64                                        | 2.7 kB     00:00     

ol7_latest/x86_64/group                                  | 660 kB     00:00     

ol7_latest/x86_64/updateinfo                             | 3.2 MB     00:00     

ol7_latest/x86_64/primary_db                             |  35 MB     00:03     


Dependencies Resolved


================================================================================

 Package             Arch        Version               Repository          Size

================================================================================

Removing:

 mariadb-libs        x86_64      1:5.5.35-3.el7        @anaconda/7.0      4.4 M

Removing for dependencies:

 akonadi-mysql       x86_64      1.9.2-4.el7           @anaconda/7.0      9.6 k

 mariadb             x86_64      1:5.5.35-3.el7        @anaconda/7.0       49 M

 mariadb-server      x86_64      1:5.5.35-3.el7        @anaconda/7.0       55 M

 perl-DBD-MySQL      x86_64      4.023-5.el7           @anaconda/7.0      323 k

 postfix             x86_64      2:2.10.1-6.el7        @anaconda/7.0       12 M

 qt-mysql            x86_64      1:4.8.5-8.el7         @anaconda/7.0       74 k


Transaction Summary

================================================================================

Remove  1 Package (+6 Dependent packages)


Installed size: 121 M

Is this ok [y/N]: y

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Warning: RPMDB altered outside of yum.

  Erasing    : akonadi-mysql-1.9.2-4.el7.x86_64                             1/7 

  Erasing    : 1:mariadb-server-5.5.35-3.el7.x86_64                         2/7 

  Erasing    : 1:mariadb-5.5.35-3.el7.x86_64                                3/7 

  Erasing    : perl-DBD-MySQL-4.023-5.el7.x86_64                            4/7 

  Erasing    : 1:qt-mysql-4.8.5-8.el7.x86_64                                5/7 

  Erasing    : 2:postfix-2.10.1-6.el7.x86_64                                6/7 

  Erasing    : 1:mariadb-libs-5.5.35-3.el7.x86_64                           7/7 

  Verifying  : 2:postfix-2.10.1-6.el7.x86_64                                1/7 

  Verifying  : 1:qt-mysql-4.8.5-8.el7.x86_64                                2/7 

  Verifying  : akonadi-mysql-1.9.2-4.el7.x86_64                             3/7 

  Verifying  : 1:mariadb-libs-5.5.35-3.el7.x86_64                           4/7 

  Verifying  : 1:mariadb-server-5.5.35-3.el7.x86_64                         5/7 

  Verifying  : perl-DBD-MySQL-4.023-5.el7.x86_64                            6/7 

  Verifying  : 1:mariadb-5.5.35-3.el7.x86_64                                7/7 


Removed:

  mariadb-libs.x86_64 1:5.5.35-3.el7                                            


Dependency Removed:

  akonadi-mysql.x86_64 0:1.9.2-4.el7      mariadb.x86_64 1:5.5.35-3.el7         

  mariadb-server.x86_64 1:5.5.35-3.el7    perl-DBD-MySQL.x86_64 0:4.023-5.el7   

  postfix.x86_64 2:2.10.1-6.el7           qt-mysql.x86_64 1:4.8.5-8.el7         


Complete!

[root@rac02 ~]# 


[root@rac02 /]# ls

1     commands.sql  etc   lib64  mysqlsoft  proc  sbin  tmp  usr

bin   dev           home  media  ocfs2      root  srv   u01  var

boot  dlm           lib   mnt    opt        run   sys   u02

[root@rac02 /]# cd mysqlsoft/

Untar Bunbl file

[root@rac02 mysqlsoft]# tar -cvf Bundl

mysql-community-client-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-common-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-devel-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-embedded-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-embedded-compat-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-embedded-devel-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-libs-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-libs-compat-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-minimal-debuginfo-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-server-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-server-minimal-8.0.0-0.1.dmr.el7.x86_64.rpm

mysql-community-test-8.0.0-0.1.dmr.el7.x86_64.rpm


Follow steps

[root@rac02 mysqlsoft]# rpm -ivh mysql-community-common-8.0.0-0.1.dmr.el7.x86_64.rpm 

warning: mysql-community-common-8.0.0-0.1.dmr.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:mysql-community-common-8.0.0-0.1.################################# [100%]

[root@rac02 mysqlsoft]# 


[root@rac02 mysqlsoft]# rpm -ivh mysql-community-libs-8.0.0-0.1.dmr.el7.x86_64.rpm 

warning: mysql-community-libs-8.0.0-0.1.dmr.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:mysql-community-libs-8.0.0-0.1.dm################################# [100%]



[root@rac02 mysqlsoft]# rpm -ivh mysql-community-client-8.0.0-0.1.dmr.el7.x86_64.rpm 

warning: mysql-community-client-8.0.0-0.1.dmr.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:mysql-community-client-8.0.0-0.1.################################# [100%]



[root@rac02 mysqlsoft]# 

[root@rac02 mysqlsoft]# rpm -ivh mysql-community-libs-compat-8.0.0-0.1.dmr.el7.x86_64.rpm 

warning: mysql-community-libs-compat-8.0.0-0.1.dmr.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:mysql-community-libs-compat-8.0.0################################# [100%]

[root@rac02 mysqlsoft]# 




[root@rac02 mysqlsoft]# rpm -ivh mysql-community-server-8.0.0-0.1.dmr.el7.x86_64.rpm 

warning: mysql-community-server-8.0.0-0.1.dmr.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:mysql-community-server-8.0.0-0.1.################################# [100%]

[root@rac02 mysqlsoft]# 


Start MYSQL Services


[root@rac02 mysqlsoft]# systemctl start mysqld.service 

[root@rac02 mysqlsoft]# 


Check MYSQL Service

[root@rac02 mysqlsoft]# 

[root@rac02 mysqlsoft]# systemctl status mysqld.service 

mysqld.service - MySQL Server

   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled)

   Active: active (running) since Thu 2021-04-08 15:37:30 GST; 3min 22s ago

  Process: 5280 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)

  Process: 4944 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)

 Main PID: 5283 (mysqld)

   CGroup: /system.slice/mysqld.service

           â””─5283 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysql...


Apr 08 15:37:30 rac02.localdomain systemd[1]: Started MySQL Server.

[root@rac02 mysqlsoft]# cat /var/log/mysqld.log | grep password 

2021-04-08T11:37:21.573873Z 4 [Note] A temporary password is generated for root@localhost: &f5kdp6qo2+O

Temporary Password

[root@rac02 mysqlsoft]# mysql -uroot

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

[root@rac02 mysqlsoft]# mysql -uroot -p

Enter password: 

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 5

Server version: 8.0.0-dmr


Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> show databases;

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> 


mysql> alter user 'root'@'localhost' identified by 'Ridge@123';

Query OK, 0 rows affected (0.00 sec)


mysql> show databases;

+--------------------+

| Database           |

+--------------------+

| information_schema |

| mysql              |

| performance_schema |

| sys                |

+--------------------+

4 rows in set (0.01 sec)


mysql> exit

Bye

[root@rac02 mysqlsoft]# cat /etc/my.cnf

# For advice on how to change settings please see

# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html


[mysqld]

#

# Remove leading # and set to the amount of RAM for the most important data

# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.

# innodb_buffer_pool_size = 128M

#

# Remove leading # to turn on a very important data integrity option: logging

# changes to the binary log between backups.

# log_bin

#

# Remove leading # to set options mainly useful for reporting servers.

# The server defaults are faster for transactions and fast SELECTs.

# Adjust sizes as needed, experiment to find the optimal values.

# join_buffer_size = 128M

# sort_buffer_size = 2M

# read_rnd_buffer_size = 2M

datadir=/var/lib/mysql            -----Datadirectory     

socket=/var/lib/mysql/mysql.sock  


# Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0


log-error=/var/log/mysqld.log          ---Log file

pid-file=/var/run/mysqld/mysqld.pid    ---Process File

[root@rac02 mysqlsoft]# 


Tuesday, March 16, 2021

How to Setup OCFS2 on Oracle Linux

 

Env: Oracle Linux 7.6

Oracle Database: 18c

Application: Forms/Report/Webogic

=========================================================================

* Oracle RAC environment ASM file system save all binary files which related to Oracle database like  

   data files, archives files, rman backup etc...but application we cannot store to ASM system file. 

* Purpose to creating this OCFS2 cluster to Oracle Apps forms/reports shared on both node.


An OCFS2 installation consists of two parts, the kernel module and the tools module.

Install on both nodes.

1) Install the ocfs2-tools package.

# yum install -y kernel-uek ocfs2

# yum install -y ocfs2–tools-1.8.6–9


Note: Once you add-cluster "clusterapps" Generated cluster file under this path /etc/ocfs2/cluster.conf move this file to another node under same path...and create on root /ocfs2 folder for map drive.

/dev/sdd /ocfs2 ocfs2   _netdev,default 0 0

2) Create a cluster:

[root@rac01 ~]# o2cb add-cluster clusterapps


3) Add nodes to the cluster:

[root@rac01 ocfs2]# o2cb add-node clusterapps rac01.localdomain --ip 192.168.0.100

[root@rac01 ocfs2]# o2cb add-node clusterapps rac02.localdomain --ip 192.168.0.200

[root@rac01 ocfs2]# fdisk -l

4) Create Shared Disk

Add disk using VM's GUI.....I created disk 17GB....Shared Option 

Disk /dev/sda: 75.2 GB, 75161927680 bytes, 146800640 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0x000eada5


   Device Boot      Start         End      Blocks   Id  System

/dev/sda1            2048    40302591    20150272   83  Linux

/dev/sda2   *    40302592    64878591    12288000   83  Linux

/dev/sda3        64878592    85358591    10240000   82  Linux swap / Solaris

/dev/sda4        85358592   146800639    30721024    5  Extended

/dev/sda5        85360640   146800639    30720000   83  Linux


Disk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0xd63fe414


   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1            2048   104857599    52427776   83  Linux


Disk /dev/sdc: 53.7 GB, 53687091200 bytes, 104857600 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0x32a41691


   Device Boot      Start         End      Blocks   Id  System

/dev/sdc1            2048   104857599    52427776   83  Linux


Disk /dev/sdd: 17.1 GB, 17056710656 bytes, 33313888 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0xdc6f5ca7


   Device Boot      Start         End      Blocks   Id  System

/dev/sdd1            2048    33313887    16655920   83  Linux


Note: Add new disk path in /etc/fstab

4) Add a disk-based heartbeat to the cluster:

[root@rac01 ocfs2]# o2cb add-heartbeat cluster /dev/sdd

o2cb: Unknown code ocfs 8 while reading region on device '/dev/sdd'

If you get above error while adding hearbeat...follow below steps.

[root@rac01 ocfs2]# mkfs.ocfs2 -b 4K -C 4K -J size=4M -N 4 -L myocfs2vol --cluster-name=racapps --cluster-stack=o2cb --global-heartbeat /dev/sdd
mkfs.ocfs2 1.8.6
Cluster stack: o2cb
Cluster name: racapps
Stack Flags: 0x1
NOTE: Feature extended slot map may be enabled
Label: myocfs2vol
Features: sparse extended-slotmap backup-super unwritten inline-data strict-journal-super xattr indexed-dirs refcount discontig-bg
Block size: 4096 (12 bits)
Cluster size: 4096 (12 bits)
Volume size: 17056710656 (4164236 clusters) (4164236 blocks)
Cluster groups: 130 (tail covers 3212 clusters, rest cover 32256 clusters)
Extent allocator size: 8388608 (2 groups)
Journal size: 4194304
Node slots: 4
Creating bitmaps: done
Initializing superblock: done
Writing system files: done
Writing superblock: done
Writing backup superblock: 2 block(s)
Formatting Journals: done
Growing extent allocator: done
Formatting slot map: done
Formatting quota files: done
Writing lost+found: done
mkfs.ocfs2 successful

[root@rac01 ocfs2]# o2cb add-heartbeat clusterapps /dev/sdd


[root@rac01 init.d]# /sbin/o2cb.init configure

Configuring the O2CB driver.


This will configure the on-boot properties of the O2CB driver.

The following questions will determine whether the driver is loaded on

boot.  The current values will be shown in brackets ('[]').  Hitting

<ENTER> without typing an answer will keep that current value.  Ctrl-C

will abort.


Load O2CB driver on boot (y/n) [y]: 

Cluster stack backing O2CB [o2cb]: 

Cluster to start on boot (Enter "none" to clear) [ocfs2]: clusterapps 

Specify heartbeat dead threshold (>=7) [31]: 

Specify network idle timeout in ms (>=5000) [30000]: 

Specify network keepalive delay in ms (>=1000) [2000]: 

Specify network reconnect delay in ms (>=2000) [2000]: 

Writing O2CB configuration: OK

checking debugfs...

Setting cluster stack "o2cb": OK

Registering O2CB cluster "clusterapps": OK

Setting O2CB cluster timeouts : OK

[root@rac01 init.d]# /sbin/o2cb.init status

Driver for "configfs": Loaded

Filesystem "configfs": Mounted

Stack glue driver: Loaded

Stack plugin "o2cb": Loaded

Driver for "ocfs2_dlmfs": Loaded

Filesystem "ocfs2_dlmfs": Mounted

Checking O2CB cluster "clusterapps": Online

  Heartbeat dead threshold: 31

  Network idle timeout: 30000

  Network keepalive delay: 2000

  Network reconnect delay: 2000

  Heartbeat mode: Local

Checking O2CB heartbeat: Not active

Debug file system at /sys/kernel/debug: mounted

[root@rac01 init.d]# 

[root@rac01 init.d]# /sbin/o2cb.init online

checking debugfs...

Setting cluster stack "o2cb": OK

Cluster racapps already online

[root@rac01 init.d]# 

[root@rac01 init.d]# mkfs.ocfs2 /dev/sdd

mkfs.ocfs2 1.8.6

On disk cluster (o2cb,racapps,1) does not match the active cluster (o2cb,racapps,0).

mkfs.ocfs2 will not be able to determine if this operation can be done safely.

To skip this check, use --force or -F

[root@rac01 init.d]# systemctl enable o2cb

Created symlink from /etc/systemd/system/multi-user.target.wants/o2cb.service to /usr/lib/systemd/system/o2cb.service.

[root@rac01 init.d]# systemctl enable ocfs2

Created symlink from /etc/systemd/system/multi-user.target.wants/ocfs2.service to /usr/lib/systemd/system/ocfs2.service.

[root@rac01 init.d]# 

[root@rac01 init.d]# sysctl kernel.panic=30

kernel.panic = 30

[root@rac01 init.d]# sysctl kernel.panic_on_oops=1

kernel.panic_on_oops = 1


[root@rac01 init.d]# /sbin/o2cb.init staus

Usage: /sbin/o2cb.init {start|stop|restart|force-reload|enable|disable|configure|load|unload|online|offline|force-offline|status|online-status}

[root@rac01 init.d]# /sbin/o2cb.init status

Driver for "configfs": Loaded

Filesystem "configfs": Mounted

Stack glue driver: Loaded

Stack plugin "o2cb": Loaded

Driver for "ocfs2_dlmfs": Loaded

Filesystem "ocfs2_dlmfs": Mounted

Checking O2CB cluster "clusterapps": Online

  Heartbeat dead threshold: 31

  Network idle timeout: 30000

  Network keepalive delay: 2000

  Network reconnect delay: 2000

  Heartbeat mode: Local

Checking O2CB heartbeat: Not active

Debug file system at /sys/kernel/debug: mounted




[root@rac01 ocfs2]# df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/sda2        12G  9.0G  2.8G  77% /

devtmpfs        4.7G     0  4.7G   0% /dev

tmpfs           4.7G  148K  4.7G   1% /dev/shm

tmpfs           4.7G   58M  4.6G   2% /run

tmpfs           4.7G     0  4.7G   0% /sys/fs/cgroup

/dev/sda5        30G   25G  4.8G  84% /u02

/dev/sda1        20G  4.2G   16G  22% /u01

tmpfs           945M   20K  945M   1% /run/user/54321

/dev/sr0         59M   59M     0 100% /run/media/oracle/VBox_GAs_6.1.16

/dev/sdd         16G  852M   16G   6% /ocfs2


Help

=====

[root@rac01 ocfs2]# o2cb add-cluster --help

o2cb: Cluster name is invalid ; only alpha-numeric characters allowed

[root@rac01 ocfs2]# o2cb --help

usage: o2cb [--config-file=path] [-h|--help] [-v|--verbose] [-V|--version] COMMAND [ARGS]


The commands are:

  add-cluster         Add cluster to the config file.

  remove-cluster      Removes cluster from the config file.

  add-node            Adds a node to the cluster in the config file.

  remove-node         Removes a node from the cluster in the config file.

  add-heartbeat       Adds a heartbeat region to the cluster in the config file.

  remove-heartbeat    Removes a heartbeat region from the cluster in the config file.

  heartbeat-mode      Toggles the heartbeat mode between global and local.

  list-clusters       Lists all the cluster names in the config file.

  list-cluster        Lists all the nodes and heartbeat regions associated with the cluster in the config file.

  list-nodes          Lists all the nodes associated with the cluster in the config file. 

  list-heartbeats     Lists all the heartbeat regions associated with the cluster in the config file.

  register-cluster    Registers the cluster with configfs.

  unregister-cluster  Unregisters the cluster from configfs.

  start-heartbeat     Starts global heartbeat.

  stop-heartbeat      Stops global heartbeat.

  cluster-status      Returns 0 if cluster online, 1 otherwise.





















Wednesday, February 24, 2021

Error: [INS-44002] The Oracle home location contains directories or files on following remote nodes

 

When trying to install grid 19.3 software on RAC01 getting below error..

I had below issue..I checked with "ls -la: there hidden files.   .opatchauto_storage  .patch_storage

I removed them with their own name "rm -rf ..opatchauto_storage  .patch_storage"






Solution:

======

Goto to second rac home /u02/softw 

$ cd /u02/softw

$ ls -la

.opatchauto_storage

.patch_storage

$ rm -rf .opatchauto_storage

$ rm -rf .patch_storage




Tuesday, February 16, 2021

Oracle Linux 7:Found /var/log/messages is Empty And Not Being Updated (Doc ID 2580481.1)

 


Found /var/log/messages is empty and no logs being written eventhough Rsyslog service is running.


Misconfiguration in /etc/rsyslog.d/ignore-systemd-session-slice.conf.



Solution


Edit /etc/rsyslog.d/ignore-systemd-session-slice.conf.

if $programname == "systemd-logind" and ($msg contains "New session" or $msg contains "Removed session" or $msg contains "Removed slice" or $msg contains "Stopping") then stop

if $programname == "systemd" and ($msg contains "Started Session" or $msg contains "Starting Session" or $msg contains "Created slice" or $msg contains "Starting user-0.slice" or $msg contains "Stopping user-0.slice" or $msg contains "Removed slice user-0.slic") then stop


Need to be changed as below .

 

if $programname == "systemd-logind" and ($msg contains "New session" or $msg contains "Removed session" or $msg contains "Removed slice" or $msg contains "Stopping") then stop

if $programname == "systemd" and ($msg contains "Started Session" or $msg contains "Starting Session" or $msg contains "Created slice" or $msg contains "Starting user-0.slice" or $msg contains "Stopping user-0.slice" or $msg contains "Removed slice user-0.slic" or $msg contains "Starting User Slice" or $msg contains "Removed slice User Slice" or $msg contains "Stopping User Slice") then stop


 After this restart the service

#systemctl restart rsyslog.service

After this check /var/log/messages .

Wednesday, February 10, 2021

Failed to load SELinux Policy Freezing



Scenario 1

I facing  below error while I copy data from host computer to Virtual Machine the host computer drive full. The virtual machine stuck...Once I restart the Virtual machine...it's given this error.


"Failed to load SELinux policy, freezing."


Solution:

=======

  • Press “e” at the boot screen to edit the startup parameters.

  • Modify the line that starts with “linux16” and append “selinux=0” to the end
  • Press “ctrl+x” to boot.

This allows us to boot with SELinux disabled. We can now re-edit the SELinux configuration file and fix our typo.


Scenario 2

Failed to load SELinux policy freezing. Well, that’s a new one – at least for me. So what went wrong?

While performing some configuration changes on one of my Linux hosts, I needed to temporarily disable SELinux to test. Easy enough, right? Edit /etc/selinux/config and change SELINUX to disabled.

Changes made, host rebooted. I go off to perform another task, and when I come back to check on it I cannot log in. I load up the console and it’s stuck at loading CentOS. When I pull up the console logs, I see this:

Failed to load SELinux policy freezing. Well, that’s a new one – at least for me. So what went wrong?

While performing some configuration changes on one of my Linux hosts, I needed to temporarily disable SELinux to test. Easy enough, right? Edit /etc/selinux/config and change SELINUX to disabled.

Changes made, host rebooted. I go off to perform another task, and when I come back to check on it I cannot log in. I load up the console and it’s stuck at loading CentOS. When I pull up the console logs, I see this:






Monday, February 1, 2021

Upgrade Oracle 11g to 19c using Expdp/Impdp

 

Upgrade Oracle 11.2.4 to 19.3.0 Using Expdp / Impdp


Example of Using Oracle Data Pump The steps for using Oracle Data Pump to upgrade or migrate a database have not changed from previous releases. If you would like to migrate with Oracle Data Pump using conventional dump files, the steps would be as follows: 

SQL> create directory bkup_dir as '/u02/oradb/bkup';

1. Export the source database to a dump file:

2.$ expdp srcadmin/password  DIRECTORY=bkup_dir DUMPFILE=expfulldb.dmp LOGFILE=expfulldb.log FULL=Y METRICS=Y PARALLEL=4 EXCLUDE=STATISTICS 

3. Make the dump file available on the destination system, either by copying it to the destination           

   system or placing it on a network-mounted disk. 

4. Create a CDB on the destination system, including a PDB into which you will import the source 

    database. 

5. In the destination PDB, create a directory object for the dump file to be imported.

6. SQL> create directory bkup_dir as '/u02/oradb/bkup'';

7. SQL> create user test identified by test123

 8. Import the Data Pump dump file into the destination PDB: 

$ impdp test/test123@pdb DIRECTORY=bkup_dir DUMPFILE=expfulldb.dmp LOGFILE=expfulldb.log PARALLEL=4 METRICS=Y LOGTIME=ALL 

In this example, we take advantage of Oracle Data Pump features such as the PARALLEL parameter to improve performance. In other cases, you might use network mode to eliminate the need for a dump file. Oracle Data Pump is fully documented in Oracle Database Utilities Guide.

Tuesday, January 26, 2021

Upgrade Oracle Application Express (APEX) manually.

I facing this error because running this scripts using full path like below example.

SQL>@/u02/app/oracle/product/11/db_home1/apex/apexins.sql SYSAUX SYSAUX temp /i/

(sp2-0310 unable to open file "coreins.sql")


First you have to go the apex directory and then run directly from SQL prompt

 cd /u02/app/oracle/product/11/db_home1/apex

sqlplus / as sysdba

SQL>@apexins.sql SYSAUX SYAAUX TEMP /i/


Recommendation 4: Upgrade Oracle Application Express (APEX) manually.

To upgrade to latest Application Express, download the latest version from the below link here

Upgrading APEX

Check the current APEX Version

SQL> Select Comp_name, status, Version

     From Dba_Registry

     where comp_id='APEX';

 

COMP_NAME                                STATUS       VERSION

---------------------------------------- ------------ ------------------------------

Oracle Application Express               VALID        3.2.1.00.12

 

SQL>

From the directory which holds the APEX unzipped software, connect to sqlplus as SYS user and run apexins.sql

cd /u01/app/oracle/product/11/db_home1/apex

sqlplus /as sysdba

SQL> @apexins.sql SYSAUX SYSAUX TEMP /i/