Search This Blog

Total Pageviews

Saturday, 25 December 2021

bash: xclock: command not found...

xclock: command not found...


[root@ora19c dbhome_1]# ssh -X oracle@192.168.1.160
oracle@192.168.1.160's password:
Last login: Sat Dec 25 18:28:16 2021 from 192.168.1.160
[oracle@ora19c ~]$ xclock
bash: xclock: command not found...
Similar command is: 'clock'
[oracle@ora19c ~]$ xeye
bash: xeye: command not found...
[oracle@ora19c ~]$ xeye
bash: xeye: command not found...

if required set 
export DISPLAY=:0
[root@ora19c ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.5 (Ootpa)


bash: xclock: command not found...


[root@ora19c ~]# yum whatprovides xclock
Last metadata expiration check: 1:18:01 ago on Sat 25 Dec 2021 17:11:26 GMT.


[root@ora19c ~]# yum groupinstall "X Window System"
Last metadata expiration check: 0:02:25 ago on Sat 25 Dec 2021 18:34:50 GMT.
Module or Group 'X Window System' is not available.
Error: Nothing to do.


[root@ora19c ~]# yum list | grep -i xorg


yum list | grep -i xorg
xorg-x11-docs.noarch                                   1.7.1-7.el8                                           @ol8_appstream
xorg-x11-drivers.x86_64                                7.7-30.el8                                            @ol8_appstream
xorg-x11-drv-ati.x86_64                                19.1.0-1.el8                                          @AppStream
xorg-x11-drv-dummy.x86_64                              0.3.7-6.el8.1                                         @ol8_appstream
xorg-x11-drv-evdev.x86_64                              2.10.6-2.el8                                          @ol8_appstream
xorg-x11-drv-evdev-devel.x86_64                        2.10.6-2.el8                                          @ol8_appstream
xorg-x11-drv-fbdev.x86_64                              0.5.0-2.el8                                           @AppStream
xorg-x11-drv-intel.x86_64                              2.99.917-39.20200205.el8                              @AppStream
xorg-x11-drv-libinput.x86_64                           0.29.0-1.el8                                          @AppStream
xorg-x11-drv-nouveau.x86_64                            1:1.0.15-4.el8.1                                      @AppStream
xorg-x11-drv-qxl.x86_64                                0.1.5-11.el8                                          @AppStream
xorg-x11-drv-v4l.x86_64                                0.3.0-2.el8                                           @ol8_appstream
xorg-x11-drv-vesa.x86_64                               2.4.0-3.el8                                           @AppStream
xorg-x11-drv-vmware.x86_64                             13.2.1-8.el8                                          @AppStream
xorg-x11-drv-wacom.x86_64                              0.38.0-1.el8                                          @AppStream
xorg-x11-drv-wacom-serial-support.x86_64               0.38.0-1.el8                                          @AppStream
xorg-x11-font-utils.x86_64                             1:7.5-41.el8                                          @ol8_appstream
xorg-x11-fonts-100dpi.noarch                           7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-75dpi.noarch                            7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-ISO8859-1-100dpi.noarch                 7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-ISO8859-1-75dpi.noarch                  7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-ISO8859-14-100dpi.noarch                7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-ISO8859-14-75dpi.noarch                 7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-ISO8859-15-100dpi.noarch                7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-ISO8859-15-75dpi.noarch                 7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-ISO8859-2-100dpi.noarch                 7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-ISO8859-2-75dpi.noarch                  7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-ISO8859-9-100dpi.noarch                 7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-ISO8859-9-75dpi.noarch                  7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-Type1.noarch                            7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-cyrillic.noarch                         7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-ethiopic.noarch                         7.5-19.el8                                            @ol8_appstream
xorg-x11-fonts-misc.noarch                             7.5-19.el8                                            @ol8_appstream
xorg-x11-proto-devel.noarch                            2020.1-3.el8                                          @ol8_appstream
xorg-x11-server-Xdmx.x86_64                            1.20.11-2.el8                                         @ol8_appstream
xorg-x11-server-Xephyr.x86_64                          1.20.11-2.el8                                         @ol8_appstream
xorg-x11-server-Xnest.x86_64                           1.20.11-2.el8                                         @ol8_appstream
xorg-x11-server-Xorg.x86_64                            1.20.11-2.el8                                         @ol8_appstream
xorg-x11-server-Xspice.x86_64                          0.1.5-11.el8                                          @ol8_appstream
xorg-x11-server-Xvfb.x86_64                            1.20.11-2.el8                                         @ol8_appstream
xorg-x11-server-Xwayland.x86_64                        21.1.1-6.el8                                          @ol8_appstream
xorg-x11-server-common.x86_64                          1.20.11-2.el8                                         @ol8_appstream
xorg-x11-server-utils.x86_64                           7.7-27.el8                                            @AppStream
xorg-x11-utils.x86_64                                  7.5-28.el8                                            @AppStream
xorg-x11-xauth.x86_64                                  1:1.0.9-12.el8                                        @AppStream
xorg-x11-xbitmaps.noarch                               1.1.1-13.el8                                          @ol8_appstream
xorg-x11-xinit.x86_64                                  1.3.4-18.el8                                          @AppStream
xorg-x11-xinit-session.x86_64                          1.3.4-18.el8                                          @AppStream
xorg-x11-xkb-utils.x86_64                              7.7-28.el8                                            @AppStream
abrt-addon-xorg.x86_64                                 2.10.9-21.0.1.el8                                     ol8_appstream
xorg-sgml-doctools.noarch                              1.11-6.el8                                            ol8_appstream
xorg-sgml-doctools.src                                 1.11-6.el8                                            ol8_appstream
xorg-x11-apps.src                                      7.7-21.el8                                            ol8_codeready_builder
xorg-x11-apps.x86_64                                   7.7-21.el8                                            ol8_codeready_builder <<<<<<<<<< install this one !!!!!!!!!!!!!!!!!!!!!!
xorg-x11-docs.src                                      1.7.1-7.el8                                           ol8_appstream
xorg-x11-drivers.src                                   7.7-30.el8                                            ol8_appstream
xorg-x11-drv-ati.src                                   19.1.0-1.el8                                          ol8_appstream
xorg-x11-drv-dummy.src                                 0.3.7-6.el8.1                                         ol8_appstream
xorg-x11-drv-evdev.src                                 2.10.6-2.el8                                          ol8_appstream
xorg-x11-drv-evdev-devel.i686                          2.10.6-2.el8                                          ol8_appstream
xorg-x11-drv-fbdev.src                                 0.5.0-2.el8                                           ol8_appstream
xorg-x11-drv-intel.i686                                2.99.917-39.20200205.el8                              ol8_appstream
xorg-x11-drv-intel.src                                 2.99.917-39.20200205.el8                              ol8_appstream
xorg-x11-drv-libinput.src                              0.29.0-1.el8                                          ol8_appstream
xorg-x11-drv-libinput.src                              0.29.0-1.el8                                          ol8_codeready_builder
xorg-x11-drv-libinput-devel.i686                       0.29.0-1.el8                                          ol8_codeready_builder
xorg-x11-drv-libinput-devel.x86_64                     0.29.0-1.el8                                          ol8_codeready_builder
xorg-x11-drv-nouveau.src                               1:1.0.15-4.el8.1                                      ol8_appstream
xorg-x11-drv-qxl.src                                   0.1.5-11.el8                                          ol8_appstream
xorg-x11-drv-v4l.src                                   0.3.0-2.el8                                           ol8_appstream
xorg-x11-drv-vesa.src                                  2.4.0-3.el8                                           ol8_appstream
xorg-x11-drv-vmware.src                                13.2.1-8.el8                                          ol8_appstream
xorg-x11-drv-wacom.src                                 0.38.0-1.el8                                          ol8_appstream
xorg-x11-drv-wacom.src                                 0.38.0-1.el8                                          ol8_codeready_builder
xorg-x11-drv-wacom-devel.i686                          0.38.0-1.el8                                          ol8_codeready_builder
xorg-x11-drv-wacom-devel.x86_64                        0.38.0-1.el8                                          ol8_codeready_builder
xorg-x11-font-utils.src                                1:7.5-41.el8                                          ol8_appstream
xorg-x11-fonts.src                                     7.5-19.el8                                            ol8_appstream
xorg-x11-proto-devel.src                               2020.1-3.el8                                          ol8_appstream
xorg-x11-server.src                                    1.20.11-2.el8                                         ol8_appstream
xorg-x11-server.src                                    1.20.11-2.el8                                         ol8_codeready_builder
xorg-x11-server-Xwayland.src                           21.1.1-6.el8                                          ol8_appstream
xorg-x11-server-devel.i686                             1.20.11-2.el8                                         ol8_codeready_builder
xorg-x11-server-devel.x86_64                           1.20.11-2.el8                                         ol8_codeready_builder
xorg-x11-server-source.noarch                          1.20.11-2.el8                                         ol8_codeready_builder
xorg-x11-server-utils.src                              7.7-27.el8                                            ol8_appstream
xorg-x11-util-macros.noarch                            1.19.2-1.el8                                          ol8_codeready_builder
xorg-x11-util-macros.src                               1.19.2-1.el8                                          ol8_codeready_builder
xorg-x11-utils.src                                     7.5-28.el8                                            ol8_appstream
xorg-x11-xauth.src                                     1:1.0.9-12.el8                                        ol8_appstream
xorg-x11-xbitmaps.src                                  1.1.1-13.el8                                          ol8_appstream
xorg-x11-xinit.src                                     1.3.4-18.el8                                          ol8_appstream
xorg-x11-xkb-utils.src                                 7.7-28.el8                                            ol8_appstream
xorg-x11-xkb-utils.src                                 7.7-28.el8                                            ol8_codeready_builder
xorg-x11-xkb-utils-devel.i686                          7.7-28.el8                                            ol8_codeready_builder
xorg-x11-xkb-utils-devel.x86_64                        7.7-28.el8                                            ol8_codeready_builder
xorg-x11-xtrans-devel.noarch                           1.4.0-1.el8                                           ol8_codeready_builder
xorg-x11-xtrans-devel.src                              1.4.0-1.el8                                           ol8_codeready_builder


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

[root@ora19c ~]# yum install xorg-x11-apps.x86_64
Last metadata expiration check: 0:03:18 ago on Sat 25 Dec 2021 18:34:50 GMT.
Dependencies resolved.
=============================================================================================================================================================================================================
 Package                                          Architecture                              Version                                           Repository                                                Size
=============================================================================================================================================================================================================
Installing:
 xorg-x11-apps                                    x86_64                                    7.7-21.el8                                        ol8_codeready_builder                                    334 k
Installing dependencies:
 libSM                                            x86_64                                    1.2.3-1.el8                                       ol8_appstream                                             47 k
 libXxf86vm                                       x86_64                                    1.1.4-9.el8                                       ol8_appstream                                             19 k

Transaction Summary
=============================================================================================================================================================================================================
Install  3 Packages

Total download size: 400 k
Installed size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): libXxf86vm-1.1.4-9.el8.x86_64.rpm                                                                                                                                      47 kB/s |  19 kB     00:00
(2/3): libSM-1.2.3-1.el8.x86_64.rpm                                                                                                                                          106 kB/s |  47 kB     00:00
(3/3): xorg-x11-apps-7.7-21.el8.x86_64.rpm                                                                                                                                   471 kB/s | 334 kB     00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                        542 kB/s | 400 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                     1/1
  Installing       : libXxf86vm-1.1.4-9.el8.x86_64                                                                                                                                                       1/3
  Installing       : libSM-1.2.3-1.el8.x86_64                                                                                                                                                            2/3
  Installing       : xorg-x11-apps-7.7-21.el8.x86_64                                                                                                                                                     3/3
  Running scriptlet: xorg-x11-apps-7.7-21.el8.x86_64                                                                                                                                                     3/3
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored

  Verifying        : libSM-1.2.3-1.el8.x86_64                                                                                                                                                            1/3
  Verifying        : libXxf86vm-1.1.4-9.el8.x86_64                                                                                                                                                       2/3
  Verifying        : xorg-x11-apps-7.7-21.el8.x86_64                                                                                                                                                     3/3

Installed:
  libSM-1.2.3-1.el8.x86_64                                        libXxf86vm-1.1.4-9.el8.x86_64                                        xorg-x11-apps-7.7-21.el8.x86_64

Complete!




xclock
Warning: Missing charsets in String to FontSet conversion

[oracle@oem2 ~]$ export LC_ALL=C
[oracle@oem2 ~]$ xclock








oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm Error: Error: rpmdb failed to list provides. Try: rpm --rebuilddb
Error: Error: rpmdb failed to list provides. Try: rpm --rebuilddb

Download from ... 

https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/

	oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm
        oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm
	oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm


curl -o oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm


curl -o oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm


curl -o oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm



dnf install -y oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm
Error: Error: rpmdb failed to list provides. Try: rpm --rebuilddb

[root@ora19c /]# ps aux | grep -E 'rpm|yum'
root       79568  0.0  0.0  12128  1100 pts/1    R+   17:06   0:00 grep --color=auto -E rpm|yum

[root@ora19c /]# rm /var/lib/rpm/__db*
rm: remove regular file '/var/lib/rpm/__db.001'? y
rm: remove regular file '/var/lib/rpm/__db.002'? y
rm: remove regular file '/var/lib/rpm/__db.003'? y
[root@ora19c /]# dnf install -y oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm
Error: Error: rpmdb failed to list provides. Try: rpm --rebuilddb


[root@ora19c /]# rpm --rebuilddb
[root@ora19c /]# yum clean all
558 files removed



[root@ora19c /]# dnf install -y oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm
Oracle Linux 8 BaseOS Latest (x86_64)                                                                                                                                        3.7 MB/s |  41 MB     00:11
Oracle Linux 8 Application Stream (x86_64)                                                                                                                                   3.6 MB/s |  31 MB     00:08
Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux 8 (x86_64)                                                                                                   3.6 MB/s |  31 MB     00:08
Last metadata expiration check: 0:00:18 ago on Sat 25 Dec 2021 17:10:01 GMT.
Dependencies resolved.
=============================================================================================================================================================================================================
 Package                                                   Architecture                      Version                                                      Repository                                    Size
=============================================================================================================================================================================================================
Installing:
 oracle-database-preinstall-19c                            x86_64                            1.0-2.el8                                                    @commandline                                  31 k
Installing dependencies:
 findutils                                                 x86_64                            1:4.6.0-20.el8                                               ol8_baseos_latest                            528 k
 glibc-devel                                               x86_64                            2.28-164.0.1.el8                                             ol8_baseos_latest                            1.0 M
 ksh                                                       x86_64                            20120801-254.0.1.el8                                         ol8_appstream                                927 k
 libaio-devel                                              x86_64                            0.3.112-1.el8                                                ol8_baseos_latest                             19 k
 libnsl                                                    x86_64                            2.28-164.0.1.el8                                             ol8_baseos_latest                            104 k
 libstdc++-devel                                           x86_64                            8.5.0-4.0.1.el8_5                                            ol8_appstream                                2.1 M
 libxcrypt-devel                                           x86_64                            4.1.1-6.el8                                                  ol8_baseos_latest                             25 k
 lm_sensors-libs                                           x86_64                            3.4.0-23.20180522git70f7e08.el8                              ol8_baseos_latest                             59 k
 make                                                      x86_64                            1:4.2.1-10.el8                                               ol8_baseos_latest                            498 k
 net-tools                                                 x86_64                            2.0-0.52.20160912git.el8                                     ol8_baseos_latest                            322 k
 sysstat                                                   x86_64                            11.7.3-6.0.1.el8                                             ol8_appstream                                425 k
 unzip                                                     x86_64                            6.0-45.el8_4                                                 ol8_baseos_latest                            195 k
 util-linux                                                x86_64                            2.32.1-28.el8                                                ol8_baseos_latest                            2.5 M

Transaction Summary
=============================================================================================================================================================================================================
Install  14 Packages

Total size: 8.6 M
Total download size: 8.6 M
Installed size: 33 M
Downloading Packages:
(1/13): findutils-4.6.0-20.el8.x86_64.rpm                                                                                                                                    1.3 MB/s | 528 kB     00:00
(2/13): libnsl-2.28-164.0.1.el8.x86_64.rpm                                                                                                                                   1.6 MB/s | 104 kB     00:00
(3/13): libxcrypt-devel-4.1.1-6.el8.x86_64.rpm                                                                                                                               829 kB/s |  25 kB     00:00
(4/13): lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64.rpm                                                                                                           1.1 MB/s |  59 kB     00:00
(5/13): glibc-devel-2.28-164.0.1.el8.x86_64.rpm                                                                                                                              1.5 MB/s | 1.0 MB     00:00
(6/13): make-4.2.1-10.el8.x86_64.rpm                                                                                                                                         2.1 MB/s | 498 kB     00:00
(7/13): net-tools-2.0-0.52.20160912git.el8.x86_64.rpm                                                                                                                        2.0 MB/s | 322 kB     00:00
(8/13): unzip-6.0-45.el8_4.x86_64.rpm                                                                                                                                        2.2 MB/s | 195 kB     00:00
(9/13): ksh-20120801-254.0.1.el8.x86_64.rpm                                                                                                                                  1.8 MB/s | 927 kB     00:00
(10/13): util-linux-2.32.1-28.el8.x86_64.rpm                                                                                                                                 2.0 MB/s | 2.5 MB     00:01
(11/13): libstdc++-devel-8.5.0-4.0.1.el8_5.x86_64.rpm                                                                                                                        2.2 MB/s | 2.1 MB     00:00
(12/13): sysstat-11.7.3-6.0.1.el8.x86_64.rpm                                                                                                                                 1.8 MB/s | 425 kB     00:00
(13/13): libaio-devel-0.3.112-1.el8.x86_64.rpm                                                                                                                               4.3 kB/s |  19 kB     00:04
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                        2.0 MB/s | 8.6 MB     00:04
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                     1/1
  Installing       : libxcrypt-devel-4.1.1-6.el8.x86_64                                                                                                                                                 1/14
  Installing       : glibc-devel-2.28-164.0.1.el8.x86_64                                                                                                                                                2/14
  Running scriptlet: glibc-devel-2.28-164.0.1.el8.x86_64                                                                                                                                                2/14
  Installing       : libstdc++-devel-8.5.0-4.0.1.el8_5.x86_64                                                                                                                                           3/14
  Installing       : ksh-20120801-254.0.1.el8.x86_64                                                                                                                                                    4/14
  Running scriptlet: ksh-20120801-254.0.1.el8.x86_64                                                                                                                                                    4/14
  Installing       : util-linux-2.32.1-28.el8.x86_64                                                                                                                                                    5/14
warning: /etc/adjtime created as /etc/adjtime.rpmnew

  Running scriptlet: util-linux-2.32.1-28.el8.x86_64                                                                                                                                                    5/14
  Installing       : unzip-6.0-45.el8_4.x86_64                                                                                                                                                          6/14
  Installing       : net-tools-2.0-0.52.20160912git.el8.x86_64                                                                                                                                          7/14
  Running scriptlet: net-tools-2.0-0.52.20160912git.el8.x86_64                                                                                                                                          7/14
  Installing       : make-1:4.2.1-10.el8.x86_64                                                                                                                                                         8/14
  Running scriptlet: make-1:4.2.1-10.el8.x86_64                                                                                                                                                         8/14
  Installing       : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                                                                             9/14
  Running scriptlet: lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                                                                             9/14
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored

  Installing       : libnsl-2.28-164.0.1.el8.x86_64                                                                                                                                                    10/14
  Installing       : libaio-devel-0.3.112-1.el8.x86_64                                                                                                                                                 11/14
  Installing       : findutils-1:4.6.0-20.el8.x86_64                                                                                                                                                   12/14
  Running scriptlet: findutils-1:4.6.0-20.el8.x86_64                                                                                                                                                   12/14
  Installing       : sysstat-11.7.3-6.0.1.el8.x86_64                                                                                                                                                   13/14
  Running scriptlet: sysstat-11.7.3-6.0.1.el8.x86_64                                                                                                                                                   13/14
  Running scriptlet: oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                                                                   14/14
  Installing       : oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                                                                   14/14
  Running scriptlet: oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                                                                   14/14
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored

  Verifying        : findutils-1:4.6.0-20.el8.x86_64                                                                                                                                                    1/14
  Verifying        : glibc-devel-2.28-164.0.1.el8.x86_64                                                                                                                                                2/14
  Verifying        : libaio-devel-0.3.112-1.el8.x86_64                                                                                                                                                  3/14
  Verifying        : libnsl-2.28-164.0.1.el8.x86_64                                                                                                                                                     4/14
  Verifying        : libxcrypt-devel-4.1.1-6.el8.x86_64                                                                                                                                                 5/14
  Verifying        : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                                                                             6/14
  Verifying        : make-1:4.2.1-10.el8.x86_64                                                                                                                                                         7/14
  Verifying        : net-tools-2.0-0.52.20160912git.el8.x86_64                                                                                                                                          8/14
  Verifying        : unzip-6.0-45.el8_4.x86_64                                                                                                                                                          9/14
  Verifying        : util-linux-2.32.1-28.el8.x86_64                                                                                                                                                   10/14
  Verifying        : ksh-20120801-254.0.1.el8.x86_64                                                                                                                                                   11/14
  Verifying        : libstdc++-devel-8.5.0-4.0.1.el8_5.x86_64                                                                                                                                          12/14
  Verifying        : sysstat-11.7.3-6.0.1.el8.x86_64                                                                                                                                                   13/14
  Verifying        : oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                                                                   14/14

Installed:
  findutils-1:4.6.0-20.el8.x86_64       glibc-devel-2.28-164.0.1.el8.x86_64             ksh-20120801-254.0.1.el8.x86_64                       libaio-devel-0.3.112-1.el8.x86_64
  libnsl-2.28-164.0.1.el8.x86_64        libstdc++-devel-8.5.0-4.0.1.el8_5.x86_64        libxcrypt-devel-4.1.1-6.el8.x86_64                    lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64
  make-1:4.2.1-10.el8.x86_64            net-tools-2.0-0.52.20160912git.el8.x86_64       oracle-database-preinstall-19c-1.0-2.el8.x86_64       sysstat-11.7.3-6.0.1.el8.x86_64
  unzip-6.0-45.el8_4.x86_64             util-linux-2.32.1-28.el8.x86_64

Complete!
[root@ora19c /]#


Now working 

[oracle@ora19c ~]$ xclock
Warning: Missing charsets in String to FontSet conversion
[oracle@ora19c ~]$

Error: Error: rpmdb failed to list provides. Try: rpm --rebuilddb


oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm Error: Error: rpmdb failed to list provides. Try: rpm --rebuilddb
Error: Error: rpmdb failed to list provides. Try: rpm --rebuilddb

Download from ... 

https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/

	oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm
        oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm
	oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm


curl -o oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm


curl -o oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm


curl -o oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm


[root@ora19c /]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.5 (Ootpa)


getting below error !!!
dnf install -y oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm
Error: Error: rpmdb failed to list provides. Try: rpm --rebuilddb


[root@ora19c /]# ps aux | grep -E 'rpm|yum'
root       79568  0.0  0.0  12128  1100 pts/1    R+   17:06   0:00 grep --color=auto -E rpm|yum

[root@ora19c /]# rm /var/lib/rpm/__db*
rm: remove regular file '/var/lib/rpm/__db.001'? y
rm: remove regular file '/var/lib/rpm/__db.002'? y
rm: remove regular file '/var/lib/rpm/__db.003'? y

[root@ora19c /]# dnf install -y oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm
Error: Error: rpmdb failed to list provides. Try: rpm --rebuilddb

Do below !!

[root@ora19c /]# rpm --rebuilddb
[root@ora19c /]# yum clean all
558 files removed
======================================================================================================================================================================================================


[root@ora19c /]# dnf install -y oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm
Oracle Linux 8 BaseOS Latest (x86_64)                                                                                                                                        3.7 MB/s |  41 MB     00:11
Oracle Linux 8 Application Stream (x86_64)                                                                                                                                   3.6 MB/s |  31 MB     00:08
Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux 8 (x86_64)                                                                                                   3.6 MB/s |  31 MB     00:08
Last metadata expiration check: 0:00:18 ago on Sat 25 Dec 2021 17:10:01 GMT.
Dependencies resolved.
=============================================================================================================================================================================================================
 Package                                                   Architecture                      Version                                                      Repository                                    Size
=============================================================================================================================================================================================================
Installing:
 oracle-database-preinstall-19c                            x86_64                            1.0-2.el8                                                    @commandline                                  31 k
Installing dependencies:
 findutils                                                 x86_64                            1:4.6.0-20.el8                                               ol8_baseos_latest                            528 k
 glibc-devel                                               x86_64                            2.28-164.0.1.el8                                             ol8_baseos_latest                            1.0 M
 ksh                                                       x86_64                            20120801-254.0.1.el8                                         ol8_appstream                                927 k
 libaio-devel                                              x86_64                            0.3.112-1.el8                                                ol8_baseos_latest                             19 k
 libnsl                                                    x86_64                            2.28-164.0.1.el8                                             ol8_baseos_latest                            104 k
 libstdc++-devel                                           x86_64                            8.5.0-4.0.1.el8_5                                            ol8_appstream                                2.1 M
 libxcrypt-devel                                           x86_64                            4.1.1-6.el8                                                  ol8_baseos_latest                             25 k
 lm_sensors-libs                                           x86_64                            3.4.0-23.20180522git70f7e08.el8                              ol8_baseos_latest                             59 k
 make                                                      x86_64                            1:4.2.1-10.el8                                               ol8_baseos_latest                            498 k
 net-tools                                                 x86_64                            2.0-0.52.20160912git.el8                                     ol8_baseos_latest                            322 k
 sysstat                                                   x86_64                            11.7.3-6.0.1.el8                                             ol8_appstream                                425 k
 unzip                                                     x86_64                            6.0-45.el8_4                                                 ol8_baseos_latest                            195 k
 util-linux                                                x86_64                            2.32.1-28.el8                                                ol8_baseos_latest                            2.5 M

Transaction Summary
=============================================================================================================================================================================================================
Install  14 Packages

Total size: 8.6 M
Total download size: 8.6 M
Installed size: 33 M
Downloading Packages:
(1/13): findutils-4.6.0-20.el8.x86_64.rpm                                                                                                                                    1.3 MB/s | 528 kB     00:00
(2/13): libnsl-2.28-164.0.1.el8.x86_64.rpm                                                                                                                                   1.6 MB/s | 104 kB     00:00
(3/13): libxcrypt-devel-4.1.1-6.el8.x86_64.rpm                                                                                                                               829 kB/s |  25 kB     00:00
(4/13): lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64.rpm                                                                                                           1.1 MB/s |  59 kB     00:00
(5/13): glibc-devel-2.28-164.0.1.el8.x86_64.rpm                                                                                                                              1.5 MB/s | 1.0 MB     00:00
(6/13): make-4.2.1-10.el8.x86_64.rpm                                                                                                                                         2.1 MB/s | 498 kB     00:00
(7/13): net-tools-2.0-0.52.20160912git.el8.x86_64.rpm                                                                                                                        2.0 MB/s | 322 kB     00:00
(8/13): unzip-6.0-45.el8_4.x86_64.rpm                                                                                                                                        2.2 MB/s | 195 kB     00:00
(9/13): ksh-20120801-254.0.1.el8.x86_64.rpm                                                                                                                                  1.8 MB/s | 927 kB     00:00
(10/13): util-linux-2.32.1-28.el8.x86_64.rpm                                                                                                                                 2.0 MB/s | 2.5 MB     00:01
(11/13): libstdc++-devel-8.5.0-4.0.1.el8_5.x86_64.rpm                                                                                                                        2.2 MB/s | 2.1 MB     00:00
(12/13): sysstat-11.7.3-6.0.1.el8.x86_64.rpm                                                                                                                                 1.8 MB/s | 425 kB     00:00
(13/13): libaio-devel-0.3.112-1.el8.x86_64.rpm                                                                                                                               4.3 kB/s |  19 kB     00:04
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                        2.0 MB/s | 8.6 MB     00:04
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                     1/1
  Installing       : libxcrypt-devel-4.1.1-6.el8.x86_64                                                                                                                                                 1/14
  Installing       : glibc-devel-2.28-164.0.1.el8.x86_64                                                                                                                                                2/14
  Running scriptlet: glibc-devel-2.28-164.0.1.el8.x86_64                                                                                                                                                2/14
  Installing       : libstdc++-devel-8.5.0-4.0.1.el8_5.x86_64                                                                                                                                           3/14
  Installing       : ksh-20120801-254.0.1.el8.x86_64                                                                                                                                                    4/14
  Running scriptlet: ksh-20120801-254.0.1.el8.x86_64                                                                                                                                                    4/14
  Installing       : util-linux-2.32.1-28.el8.x86_64                                                                                                                                                    5/14
warning: /etc/adjtime created as /etc/adjtime.rpmnew

  Running scriptlet: util-linux-2.32.1-28.el8.x86_64                                                                                                                                                    5/14
  Installing       : unzip-6.0-45.el8_4.x86_64                                                                                                                                                          6/14
  Installing       : net-tools-2.0-0.52.20160912git.el8.x86_64                                                                                                                                          7/14
  Running scriptlet: net-tools-2.0-0.52.20160912git.el8.x86_64                                                                                                                                          7/14
  Installing       : make-1:4.2.1-10.el8.x86_64                                                                                                                                                         8/14
  Running scriptlet: make-1:4.2.1-10.el8.x86_64                                                                                                                                                         8/14
  Installing       : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                                                                             9/14
  Running scriptlet: lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                                                                             9/14
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored

  Installing       : libnsl-2.28-164.0.1.el8.x86_64                                                                                                                                                    10/14
  Installing       : libaio-devel-0.3.112-1.el8.x86_64                                                                                                                                                 11/14
  Installing       : findutils-1:4.6.0-20.el8.x86_64                                                                                                                                                   12/14
  Running scriptlet: findutils-1:4.6.0-20.el8.x86_64                                                                                                                                                   12/14
  Installing       : sysstat-11.7.3-6.0.1.el8.x86_64                                                                                                                                                   13/14
  Running scriptlet: sysstat-11.7.3-6.0.1.el8.x86_64                                                                                                                                                   13/14
  Running scriptlet: oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                                                                   14/14
  Installing       : oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                                                                   14/14
  Running scriptlet: oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                                                                   14/14
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-5.4.17-2102.201.3.el8uek.x86_64.conf:6: hwcap directive ignored

  Verifying        : findutils-1:4.6.0-20.el8.x86_64                                                                                                                                                    1/14
  Verifying        : glibc-devel-2.28-164.0.1.el8.x86_64                                                                                                                                                2/14
  Verifying        : libaio-devel-0.3.112-1.el8.x86_64                                                                                                                                                  3/14
  Verifying        : libnsl-2.28-164.0.1.el8.x86_64                                                                                                                                                     4/14
  Verifying        : libxcrypt-devel-4.1.1-6.el8.x86_64                                                                                                                                                 5/14
  Verifying        : lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64                                                                                                                             6/14
  Verifying        : make-1:4.2.1-10.el8.x86_64                                                                                                                                                         7/14
  Verifying        : net-tools-2.0-0.52.20160912git.el8.x86_64                                                                                                                                          8/14
  Verifying        : unzip-6.0-45.el8_4.x86_64                                                                                                                                                          9/14
  Verifying        : util-linux-2.32.1-28.el8.x86_64                                                                                                                                                   10/14
  Verifying        : ksh-20120801-254.0.1.el8.x86_64                                                                                                                                                   11/14
  Verifying        : libstdc++-devel-8.5.0-4.0.1.el8_5.x86_64                                                                                                                                          12/14
  Verifying        : sysstat-11.7.3-6.0.1.el8.x86_64                                                                                                                                                   13/14
  Verifying        : oracle-database-preinstall-19c-1.0-2.el8.x86_64                                                                                                                                   14/14

Installed:
  findutils-1:4.6.0-20.el8.x86_64       glibc-devel-2.28-164.0.1.el8.x86_64             ksh-20120801-254.0.1.el8.x86_64                       libaio-devel-0.3.112-1.el8.x86_64
  libnsl-2.28-164.0.1.el8.x86_64        libstdc++-devel-8.5.0-4.0.1.el8_5.x86_64        libxcrypt-devel-4.1.1-6.el8.x86_64                    lm_sensors-libs-3.4.0-23.20180522git70f7e08.el8.x86_64
  make-1:4.2.1-10.el8.x86_64            net-tools-2.0-0.52.20160912git.el8.x86_64       oracle-database-preinstall-19c-1.0-2.el8.x86_64       sysstat-11.7.3-6.0.1.el8.x86_64
  unzip-6.0-45.el8_4.x86_64             util-linux-2.32.1-28.el8.x86_64

Complete!
[root@ora19c /]#


shmmax -->Half the size of physical memory in bytes
shmall -->Greater than or equal to the value of shmmax, in pages.

shmmni is set to recommended value 4096

Maximum SHMMAX values for Linux x86 and x86-64 ( Doc ID 567506.1 )
Relationship Between SGA_TARGET and SHMMAX ( Doc ID 1527109.1 )

https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/minimum-parameter-settings-for-installation.html


Sunday, 19 December 2021

object waits with event


Object waits with event .. 


define IF_COMMENT=' '
--define IF_COMMENT='--' 
set linesize 300 pagesize 300 numf 9999999999999999999999 col object_name for a50 col statistic_name for a35 col owner for a25
col VALUE for 999999999999999999
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,
dba_objects a where a.object_id=b.obj# and b.statistic_name='db block changes' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='segment scans' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='row lock waits' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;

with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='buffer busy waits' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;

with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='physical reads direct' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='physical reads' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='physical writes' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='physical writes direct' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='logical reads' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='ITL waits' order by 4 desc)
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;


OWNER                     OBJECT_NAME                    STATISTIC_NAME                           VALUE
------------------------- ------------------------------ ----------------------------------- ----------
ANUJ                      TAB1_IND                       db block changes                           576
ANUJ                      TAB2                           db block changes                           128
ANUJ                      TAB1                           db block changes                            32


set lines 500  pagesize 300 
col file# for 99999
col block# for 9999999999
col obj for a40
col type for a9
col lm for 99
col bsid for 9999
col kill for a15
col event for a30
select count(*) cnt,
''''||ash.SESSION_ID ||','|| ash.SESSION_SERIAL#||',@'||ash.inst_id ||'''' kill,
--session_id sid,
substr(event,1,30) event,
mod(p1,16) as lm,
sql_id,
CURRENT_OBJ# || ' ' || object_name obj
, o.object_type type
, CURRENT_FILE# file#
, CURRENT_BLOCK# block#
, blocking_session bsid
,con_id
from gv$active_session_history ash,dba_objects o
where 1=1
and event like 'enq: T%'
--and sample_time between to_timestamp('19.12.2021 00:00:00', 'dd.mm.yyyy hh24:mi:ss') AND TO_TIMESTAMP('19.12.2021 23:59:59', 'dd.mm.yyyy hh24:mi:ss')
-- and SAMPLE_TIME > SYSTIMESTAMP - INTERVAL '10' second
-- and SAMPLE_TIME > SYSTIMESTAMP - INTERVAL '1' DAY
--and SAMPLE_TIME > SYSTIMESTAMP - INTERVAL '15' minute
and o.object_id (+)= ash.current_obj#
group by event,''''||ash.SESSION_ID ||','|| ash.SESSION_SERIAL#||',@'||ash.inst_id ||'''' ,p1,sql_id,current_obj#,object_name,object_type,current_file#, current_block#, blocking_session,con_id
order by count(*)
/



define IF_COMMENT=' '
--define IF_COMMENT='--' 

set linesize 300 pagesize 300
col object_name 	for a30
col statistic_name 	for a35
col owner 			for a25
col VALUE for 999999999999999999
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,
dba_objects a where a.object_id=b.obj# and b.statistic_name='db block changes' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='segment scans' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='row lock waits' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='buffer busy waits' order by desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='physical reads direct' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='physical reads' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='physical writes' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='physical writes direct' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='logical reads' order by 4 desc) 
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;
with temp as (select a.owner,a.object_name,b.statistic_name,b.value from gv$segstat b,dba_objects a where a.object_id=b.obj# and b.statistic_name='ITL waits' order by 4 desc)
select * from temp where rownum < 30
&IF_COMMENT and owner not in ('AUDSYS','DBVISIT7', 'SYS' , 'SYSTEM' , 'DBSNMP' , 'SYSMAN' , 'OUTLN' ,'MDSYS' , 'ORDSYS' , 'EXFSYS' , 'DMSYS' , 'WMSYS' , 'CTXSYS' , 'ANONYMOUS' , 'XDB' , 'ORDPLUGINS' , 'OLAPSYS' , 'PUBLIC','WWV_FLOW_PLATFORM' ) 
;

col owner format a15
col object format a30
col object_type format a10
col index_name format a30
col table_name format a30
col lockmode format a20
col event_name format a40 head 'EVENT NAME'
col sql_id format a13
col instance_number format 9999 head 'INST'
set line 200 trimspool on
set pagesize 60
-- d_date_format set by get_date_range.sql
with waits as (
select
sh.inst_id instance_number
, sh.blocking_inst_id
, sh.sql_id
, n.name event_name
, chr(bitand(sh.p1,-16777216)/16777215)||
chr(bitand(sh.p1, 16711680)/65535) LOCKNAME
, bitand(sh.p1,65535) lockmode
, sh.current_obj#
from gv$active_session_history sh
join v$event_name n on sh.event_id = n.event_id
where sh.blocking_inst_id is not null
--and sh.event_id = ( select event_id from v$event_name where name like 'enq: TX - row lock contention')
and sh.event_id in ( select event_id from v$event_name where name like 'enq:%')
and sh.current_obj# is not null
and sh.current_obj# > 0
),
itlwaits as (
select distinct
w.instance_number
, w.event_name
, w.sql_id
--, w.lockname
, current_obj#
, count(*) itl_wait_count
from waits w
where w.lockname = 'TX'
and lockmode = 4 -- ITL
-- in this case just interested in indexes
--and w.event_name = 'enq: TX - index contention'
group by w.instance_number, w.event_name, w.sql_id, current_obj#
)
select
w.instance_number
, w.sql_id
, w.itl_wait_count
, decode(i.owner,null,t.owner,i.owner) owner
, o.object_type
, decode(i.index_name,null,t.table_name,i.index_name) object
, decode(i.ini_trans,null,t.ini_trans,i.ini_trans) ini_trans
, decode(i.max_trans,null,t.max_trans,i.max_trans) max_trans
from itlwaits w
join dba_objects o on o.object_id = w.current_obj#
left outer join dba_indexes i on i.owner = o.owner
and i.index_name = o.object_name
left outer join dba_tables t on t.owner = o.owner
and t.table_name = o.object_name
order by w.itl_wait_count
/
===========
col SQL_PROCESS for a13
col "event(waits:requests:blocks)" for a40
col "waits%"  for a7
col "reqs%"   for a7
col "blocks%" for a7
col inst_id for 9999 hea #i
col PROGRAMS for a60 HEADING 'PROGRAMS BY TYPES                                           '
col t0 for 999
col OBJECT_NAME for a35

with ash as (select * from gv$active_session_history where sample_time > sysdate - 1/24
            )
select /*+ rule*/ * from (
    select 
inst_id,
           object_name,
           tablespace_name,
           SUM(WAIT_COUNT),
           to_char(RATIO_TO_REPORT(SUM(WAIT_COUNT)) OVER() * 100, '990.99') AS "waits%",
           SUM(REQUESTS),
           to_char(RATIO_TO_REPORT(SUM(REQUESTS)) OVER()   * 100, '990.99') AS "reqs%",
           SUM(BLOCKS),
           to_char(RATIO_TO_REPORT(SUM(BLOCKS)) OVER()     * 100, '990.99') AS "blocks%",
           decode(nvl(upper('&&1'), 'BLOCKS')
                                  , 'WAITS' , rtrim(xmlagg(xmlelement(s, '(' || WAIT_COUNT||':'|| REQUESTS ||':'|| BLOCKS, '); ').extract('//text()') order by WAIT_COUNT desc), '; ')
                                  , 'REQS'  , rtrim(xmlagg(xmlelement(s, '(' || WAIT_COUNT||':'|| REQUESTS ||':'|| BLOCKS, '); ').extract('//text()') order by REQUESTS desc), '; ')
                                  , 'BLOCKS', rtrim(xmlagg(xmlelement(s, '(' || WAIT_COUNT||':'|| REQUESTS ||':'|| BLOCKS, '); ').extract('//text()') order by BLOCKS desc), '; ')
                                            , rtrim(xmlagg(xmlelement(s, '(' || WAIT_COUNT||':'|| REQUESTS ||':'|| BLOCKS, '); ').extract('//text()') order by BLOCKS desc), '; '))
            as "event(waits:requests:blocks)"
      from (select 
inst_id,
                   object_name,
                   tablespace_name,
                   sum(WAIT_COUNT)                     as WAIT_COUNT,
                   sum(WAIT_COUNT * REQS_PER_WAIT)     as REQUESTS,
                   sum(WAIT_COUNT * BLOCKS_PER_WAIT) as BLOCKS
              from (select count(*) as WAIT_COUNT,
                           o.object_type||' '||o.owner||'.'||o.object_name||'.'||o.subobject_name as object_name,
                           NVL(f.tablespace_name, l.tablespace_name) as tablespace_name,
                           case when p2text = 'blocks' then p2
                                when p3text in ('blocks','block cnt') then p3
                                when p1text = 'requests' then p1  
                                else 1
                           end                                                                                            as BLOCKS_PER_WAIT,
                           case when p3text='requests' then p3 when p1text='requests' then p1 else 1 end                  as REQS_PER_WAIT
,inst_id
                      from Gv$active_session_history  --
                      left join dba_objects o     on current_obj# = object_id
                      left join dba_data_files f  on current_file# = file_id
                      left join dba_lobs l        on l.owner = o.owner and l.segment_name = o.object_name
                     where 
                        wait_class in ('User I/O','System I/O') and
                        session_state = 'WAITING'
			and current_obj# > 0
                     group by o.object_type||' '||o.owner||'.'||o.object_name||'.'||o.subobject_name,
                              NVL(f.tablespace_name, l.tablespace_name),
                              case when p2text = 'blocks' then p2
                                   when p3text in ('blocks','block cnt') then p3
                                   when p1text = 'requests' then p1  
                                   else 1
                              end,
                              case when p3text='requests' then p3 when p1text='requests' then p1 else 1 end
,inst_id      )
             group by inst_id, object_name, tablespace_name)
     group by 
inst_id,    object_name,
              tablespace_name
     order by 1, decode(nvl(upper('&&1'),'BLOCKS'), 'WAITS', SUM(WAIT_COUNT), 'REQS', SUM(REQUESTS), 'BLOCKS', SUM(BLOCKS), SUM(BLOCKS)) desc
) where rownum <= nvl('&2', 10)

/
   #i OBJECT_NAME                         TABLESPACE_NAME                SUM(WAIT_COUNT) waits%  SUM(REQUESTS) reqs%   SUM(BLOCKS) blocks% event(waits:requests:blocks)
----- ----------------------------------- ------------------------------ --------------- ------- ------------- ------- ----------- ------- ----------------------------------------
    1  ..                                                                          60138   98.45        133258   99.30      482330   99.44 (60138:133258:482330)
    1 TABLE SYS.SMON_SCN_TIME.            SYSAUX                                     201    0.33           201    0.15        1047    0.22 (201:201:1047)
    1 INDEX SYS.SYS_IOT_TOP_19184.        SYSAUX                                     109    0.18           109    0.08         657    0.14 (109:109:657)
    1 TABLE SYS.MAP_OBJECT.                                                          254    0.42           255    0.19         254    0.05 (254:255:254)
    1 TABLE SYS.FGA$.                     SYSTEM                                      51    0.08            51    0.04         146    0.03 (51:51:146)
    1 INDEX SYS.I_RADM_CD2.                                                          139    0.23           139    0.10         141    0.03 (139:139:141)
    1 INDEX SYS.I_HH_OBJ#_INTCOL#.                                                     1    0.00             1    0.00         128    0.03 (1:1:128)
    1 TABLE SYS.WRI$_ADV_DEF_EXEC_TYPES.                                               1    0.00             1    0.00         126    0.03 (1:1:126)
    1 LOB SYS.SYS_LOB0000010634C00004$$.  SYSAUX                                     101    0.17           101    0.08         112    0.02 (101:101:112)
    1 TABLE SYSTEM.LOGMNR_UID$.           SYSAUX                                      45    0.07            45    0.03          45    0.01 (45:45:45)
SQL>
====

select 'LOGICAL_READS_DELTA' as metric_name from dual union all select 'BUFFER_BUSY_WAITS_DELTA' as metric_name from dual union all select 'DB_BLOCK_CHANGES_DELTA' as metric_name from dual union all select 'PHYSICAL_READS_DELTA' as metric_name from dual union all select 'PHYSICAL_WRITES_DELTA' as metric_name from dual union all select 'PHYSICAL_READS_DIRECT_DELTA' as metric_name from dual union all select 'PHYSICAL_WRITES_DIRECT_DELTA' as metric_name from dual union all select 'ITL_WAITS_DELTA' as metric_name from dual union all select 'ROW_LOCK_WAITS_DELTA' as metric_name from dual union all select 'GC_CR_BLOCKS_SERVED_DELTA' as metric_name from dual union all select 'GC_CU_BLOCKS_SERVED_DELTA' as metric_name from dual union all select 'GC_BUFFER_BUSY_DELTA' as metric_name from dual union all select 'GC_CR_BLOCKS_RECEIVED_DELTA' as metric_name from dual union all select 'GC_CU_BLOCKS_RECEIVED_DELTA' as metric_name from dual union all select 'TABLE_SCANS_DELTA' as metric_name from dual union all select 'CHAIN_ROW_EXCESS_DELTA' as metric_name from dual union all select 'PHYSICAL_READ_REQUESTS_DELTA' as metric_name from dual union all select 'PHYSICAL_WRITE_REQUESTS_DELTA' as metric_name from dual union all select 'OPTIMIZED_PHYSICAL_READS_DELTA' as metric_name from dual; LOGICAL_READS_DELTA BUFFER_BUSY_WAITS_DELTA DB_BLOCK_CHANGES_DELTA PHYSICAL_READS_DELTA PHYSICAL_WRITES_DELTA PHYSICAL_READS_DIRECT_DELTA PHYSICAL_WRITES_DIRECT_DELTA ITL_WAITS_DELTA ROW_LOCK_WAITS_DELTA GC_CR_BLOCKS_SERVED_DELTA GC_CU_BLOCKS_SERVED_DELTA GC_BUFFER_BUSY_DELTA GC_CR_BLOCKS_RECEIVED_DELTA GC_CU_BLOCKS_RECEIVED_DELTA TABLE_SCANS_DELTA CHAIN_ROW_EXCESS_DELTA PHYSICAL_READ_REQUESTS_DELTA PHYSICAL_WRITE_REQUESTS_DELTA OPTIMIZED_PHYSICAL_READS_DELTA 19 rows selected. set linesize 700 pagesize 500 VARIABLE dbid NUMBER VARIABLE bid NUMBER VARIABLE eid NUMBER VARIABLE INST_NUMBER number exec select max(snap_id) -1 into :bid from dba_hist_snapshot ; exec select max(snap_id) into :eid from dba_hist_snapshot ; exec select DBID into :dbid from v$database; define topn=10 define inst_no=1 define metric='LOGICAL_READS_DELTA' --- change the value column owner format a15 column object_name format a35 column subobject_name format a30 SELECT owner, object_name, sm AS &metric, round(sm*100/tot,0) AS "% &metric" FROM (SELECT owner, object_name, SUM(metric) AS sm, tot FROM (SELECT owner, object_name, metric, tot FROM (SELECT seg.obj#, SUM(&metric) AS metric FROM dba_hist_seg_stat SEG, dba_hist_snapshot s WHERE s.snap_id = seg.snap_id AND s.instance_number = seg.instance_number -- AND s.instance_number = &inst_no AND s.snap_id >=:bid AND s.snap_id <= :eid GROUP BY obj# ) s, (SELECT SUM(&metric) AS tot FROM dba_hist_seg_stat SEG, dba_hist_snapshot s WHERE s.snap_id = seg.snap_id AND s.instance_number = seg.instance_number --AND s.instance_number = &inst_no AND s.snap_id >=:bid AND s.snap_id <= :eid ) t, dba_objects WHERE object_id = s.obj# ORDER BY 3 DESC ) GROUP BY owner,object_name, tot ORDER BY 3 DESC, 1,2 ) WHERE rownum<=&topn;

Oracle DBA

anuj blog Archive