Monday, May 1, 2017

Start OSWatcher Black Box (OSWBB) Every System Boot


Oracle OSWatcher Black Box (OSWbb) : collects and archives operating system and network metrics that you can use to diagnose performance issues. OSWbb operates as a set of background processes on the server and gathers data on a regular basis, invoking such Unix utilities as vmstat, netstat, iostat, and top. From release v4.0.0, you can use the OSWbba analyzer to provide information on system slowdowns, system hangs and other performance problems, and also to graph data collected from iostat, netstat, and vmstat. OSWbba requires that you have installed Java version 1.4.2 or higher on your system.

You can use yum to install Java, or you can download a Java RPM for Linux from http://www.java.com. OSWbb is particularly useful for Oracle RAC (Real Application Clusters) and Oracle Grid Infrastructure configurations. The RAC-DDT (Diagnostic Data Tool) script file includes OSWbb, but does not install it by default


1.  Install wget utility

yum install -y wget


2.  Download latest oswatcher package


wget wget http://public-yum.oracle.com/repo/OracleVM/OVM3/34_latest/x86_64/getPackage/oswatcher-7.3.3-2.el6.noarch.rpm

3.  Install OS Watcher

yum install oswatcher-7.3.3-2.el6.noarch.rpm


4.  Change OS Watcher parameters

# Set OSW_HOME to the directory where your OSWatcher tools are installed
OSW_HOME='/opt/osw'
# Set OSW_INTERVAL to the number of seconds between collections
OSW_INTERVAL='60'
# Set OSW_RETENTION to the number of hours logs are to be retained
OSW_RETENTION='48'
# Set OSW_USER to the owner of the OSWHOME directory
OSW_USER='root'
# Set OSW_COMPRESSION to the desired compression scheme
OSW_COMPRESSION='bzip2'
# Set OSW_ARCHIVE to the location to generate the logs
OSW_ARCHIVE='archive'



5. Stop and start services

# /etc/init.d/oswatcher start  
# /etc/init.d/oswatcher stop


Oracle Referece Note: How To Start OSWatcher Black Box (OSWBB) Every System Boot Using RPM oswbb-service (Doc ID 580513.1)

Wednesday, March 29, 2017

EBS 12.1.3 apachectl startssl libdb.so.2: cannot open shared object file: No such file or directory



Issue: EBS 12.1.3 apachectl startssl libdb.so.2: cannot open shared object file: No such file or directory

Error:
cat /var/lib/logrotate/status
Error:
/u01/TEST/inst/apps/TEST_ebs121ap1/ora/10.1.3/Apache/Apache/bin/apachectl startssl: execing httpd
/u01/TEST/apps/tech_st/10.1.3/Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory



Solution
ls -l /usr/lib/libdb.so.2
ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2

[root@ebs121ap1 lib]# ls -ltr libgdbm.so.2.0.0
-rw-r--r-- 1 opc opc 24876 Jul 29 15:38 libgdbm.so.2.0.0
[root@ebs121ap1 lib]# ls -l /usr/lib/libdb.so.2
ls: cannot access /usr/lib/libdb.so.2: No such file or directory
[root@ebs121ap1 lib]# ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
[root@ebs121ap1 lib]#
[root@ebs121ap1 lib]#
[root@ebs121ap1 lib]# ls -l /usr/lib/libdb.so.2
lrwxrwxrwx 1 root root 25 Jul 29 15:39 /usr/lib/libdb.so.2 -> /usr/lib/libgdbm.so.2.0.0
[root@ebs121ap1 lib]#


Download file from here


Thursday, February 16, 2017

adding swap space to Oracle Linux 6

adding swap space to Oracle Linux 6

#16gb
dd if=/dev/zero of=/u01/swap1 bs=1024 count=16384000
mkswap /u01/swap1
swapon /u01/swap1

#/etc/fstab
/u01/swap1   swap    swap   defaults 0 0

Saturday, February 11, 2017

Creating a Custom Application top for EBS 12.2 Using adsplice

Hello DBA Gurus,


There are many blogs on this topic, I have created a simple to make it clean.

What you need:
1. Download Patch 3636980
2. Download attached files

Reference:
Creating a Custom Application in Oracle E-Business Suite Release 12.2 (Doc ID 1577707.1)


Tuesday, July 26, 2016

RC-50013: Fatal: Instantiate driver did not complete successfully.

Oracle EBS 12.2.6 - DB Tire configuration error

WARNING: [AutoConfig Error Report]
The following report lists errors AutoConfig encountered during each
phase of its execution.  Errors are grouped by directory and phase.
The report format is:
      <filename>  <phase>  <return code where appropriate>

  [APPLY PHASE]
  AutoConfig could not successfully execute the following scripts:
    Directory: /u01/app/oracle/tech_st/12.1.0/perl/bin/perl -I /u01/app/oracle/tech_st/12.1.0/perl/lib/5.14.1 -I /u01/app/oracle/tech_st/12.1.0/perl/lib/site_perl/5.14.1 -I /u01/app/oracle/tech_st/12.1.0/appsutil/perl /u01/app/oracle/tech_st/12.1.0/appsutil/clone
      ouicli.pl               INSTE8_APPLY       1



AutoConfig is exiting with status 1

WARNING: RC-50013: Fatal: Instantiate driver did not complete successfully.


Issue 1: Check the inventory location

Please delete existing files under oraInventory folder and retry the adcfgclone.

[root@rac1 E122V_rac1]# cat /etc/oraInst.loc
#inventory_loc=/u01/app/oraInventory
inventory_loc=/u01/app/oracle/oraInventory
inst_group=dba
[root@rac1 E122V_rac1]#


Issue 2: check the error in appsutil/log



[root@rac1 logs]# cat installActions2019-07-26_07-50-28AM.log
The file oraparam.ini could not be found at /u01/app/oracle/tech_st/12.1.0/oui/bin/oraparam.ini
Using paramFile: /u01/app/oracle/tech_st/12.1.0/oui/oraparam.ini


Checking swap space: 0 MB available, 500 MB required.    Failed <<<<

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation,
Exiting Oracle Universal Installer, log for this session can be found at /u01/app/oracle/oraInventory/logs/installActions2019-07-26_07-50-28AM.log
[root@rac1 logs]#

Tuesday, May 31, 2016

Oracle ASM extend Diskgroup

Hello,

here are the steps to drop and re-create the disk group

check the disk size (it's 50 gb)


[root@rac1 ~]# lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
xvda    202:0    0   15G  0 disk
└─xvda1 202:1    0   15G  0 part /
xvdf    202:80   0   50G  0 disk
└─xvdf1 202:81   0   50G  0 part /u01
xvdg    202:96   0  200G  0 disk
└─xvdg1 202:97   0   50G  0 part
xvdh    202:112  0  200G  0 disk
└─xvdh1 202:113  0   50G  0 part
xvdi    202:128  0   50G  0 disk
└─xvdi1 202:129  0   50G  0 part
xvdj    202:144  0   50G  0 disk
└─xvdj1 202:145  0   50G  0 part
xvdk    202:160  0   16G  0 disk [SWAP]
xvdl    202:176  0  200G  0 disk
└─xvdl1 202:177  0  200G  0 part
xvdm    202:192  0  200G  0 disk
└─xvdm1 202:193  0  200G  0 part
xvdn    202:208  0  150G  0 disk
└─xvdn1 202:209  0  150G  0 part /u04
[root@rac1 ~]# parted /dev/xvdg


Disk size is 200gb but allocated size/partition size is 50gb only.

Step:
1. Drop the current disk group
2. re-create partition
3. update disk UUID into dev rule
4. create a disk group with new size.

1. Drop the current disk group

SQL> alter diskgroup data mount;

Diskgroup altered.

SQL> drop diskgroup data;

Diskgroup dropped.

## Check disk is empty now.

set linesize 180

col path for a50
select path,header_status from v$asm_disk;

PATH                                               HEADER_STATU
-------------------------------------------------- ------------
/dev/oracleasm/disk01                              FORMER
/dev/oracleasm/disk02                              FORMER
/dev/oracleasm/disk06                              MEMBER
/dev/oracleasm/disk04                              MEMBER
/dev/oracleasm/disk05                              MEMBER
/dev/oracleasm/disk03                              MEMBER



Note: ASM does not allow to drop disk group if it's not mounted.


2. re-create partition
#create partation
parted /dev/xvdm
mktable gpt
mkpart asmpart1 0% 100%
quit


After paration:
[root@rac1 ~]# lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
xvda    202:0    0   15G  0 disk
└─xvda1 202:1    0   15G  0 part /
xvdf    202:80   0   50G  0 disk
└─xvdf1 202:81   0   50G  0 part /u01
xvdg    202:96   0  200G  0 disk
└─xvdg1 202:97   0  200G  0 part
xvdh    202:112  0  200G  0 disk
└─xvdh1 202:113  0  200G  0 part
xvdi    202:128  0   50G  0 disk
└─xvdi1 202:129  0   50G  0 part
xvdj    202:144  0   50G  0 disk
└─xvdj1 202:145  0   50G  0 part
xvdk    202:160  0   16G  0 disk [SWAP]
xvdl    202:176  0  200G  0 disk
└─xvdl1 202:177  0  200G  0 part
xvdm    202:192  0  200G  0 disk
└─xvdm1 202:193  0  200G  0 part
xvdn    202:208  0  150G  0 disk
└─xvdn1 202:209  0  150G  0 part /u04


3. update disk UUID into dev rule


# get UUID one by one and create file
[root@rac1 ~]# udevadm info --query=property /dev/xvdg1 | grep ID_PART_ENTRY_UUID
ID_PART_ENTRY_UUID=ad4b9fef-a590-480f-baef-627b1ef773a4
[root@rac1 ~]#  udevadm info --query=property /dev/xvdh1 | grep ID_PART_ENTRY_UUID
ID_PART_ENTRY_UUID=a12f74db-fdda-491c-b65d-680da0581251

cat > /etc/udev/rules.d/99-oracle-asmdevices.rules <<EOF
KERNEL=="xvd??", ENV{ID_PART_ENTRY_UUID}=="ad4b9fef-a590-480f-baef-627b1ef773a4", SYMLINK+="oracleasm/disk01", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="xvd??", ENV{ID_PART_ENTRY_UUID}=="a12f74db-fdda-491c-b65d-680da0581251", SYMLINK+="oracleasm/disk02", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="xvd??", ENV{ID_PART_ENTRY_UUID}=="8fa30be3-244e-4f53-af2c-8d9db1492b58", SYMLINK+="oracleasm/disk03", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="xvd??", ENV{ID_PART_ENTRY_UUID}=="4885524d-4b7a-48ee-aca3-2c90d804bf79", SYMLINK+="oracleasm/disk04", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="xvd??", ENV{ID_PART_ENTRY_UUID}=="560d278a-22b6-4afe-9a3e-63d568b27f26", SYMLINK+="oracleasm/disk05", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="xvd??", ENV{ID_PART_ENTRY_UUID}=="627edeac-5dbc-41b4-b36e-475277b43722", SYMLINK+="oracleasm/disk06", OWNER="oracle", GROUP="dba", MODE="0660"
EOF

## Validate that disks are visible

[root@rac1 ~]# ls -al /dev/oracleasm/*
lrwxrwxrwx. 1 root root 8 Jul 30 15:56 /dev/oracleasm/disk01 -> ../xvdg1
lrwxrwxrwx. 1 root root 8 Jul 30 15:56 /dev/oracleasm/disk02 -> ../xvdh1
lrwxrwxrwx. 1 root root 8 Jul 30 15:56 /dev/oracleasm/disk03 -> ../xvdi1
lrwxrwxrwx. 1 root root 8 Jul 30 15:56 /dev/oracleasm/disk04 -> ../xvdj1
lrwxrwxrwx. 1 root root 8 Jul 30 15:56 /dev/oracleasm/disk05 -> ../xvdl1
lrwxrwxrwx. 1 root root 8 Jul 30 15:56 /dev/oracleasm/disk06 -> ../xvdm1


4. create a disk group with new size.

 CREATE DISKGROUP RECO1 EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disk01','/dev/oracleasm/disk02';

# Check  diskgroup

[grid@rac1 ~]$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576    409596   219377                0          219377              0             N  DATA1/
MOUNTED  EXTERN  N         512   4096  1048576    409596   409542                0          409542              0             N  RECO1/
MOUNTED  NORMAL  N         512   4096  1048576    102396   100412                0           50206              0             N  REDO/


Note: I am droppping the diskgroup here so be c

Azure AKS - Diag Logs - KQL

AzureDiagnostics | where Category == "kube-audit" | summarize requests = count() by bin(TimeGenerated, 5m), userAgent_s | orde...