Monday, December 30, 2019

Oracle TFA Installation in 2 node cluster

Oracle TFA - Issue and fix 1. Install TFA from node1 this will install in node1 & node2



       

[root@node2 TFA]# ./ahf_setup

AHF Installer for Platform Linux Architecture x86_64

AHF Installation Log : /tmp/ahf_install_382363_2020_04_30-08_32_06.log

Starting Autonomous Health Framework (AHF) Installation

AHF Version: 20.1.2 Build Date: 202004031134

Default AHF Location : /opt/oracle.ahf

Do you want to install AHF at [/opt/oracle.ahf] ? [Y]|N :

AHF Location : /opt/oracle.ahf

AHF Data Directory stores diagnostic collections and metadata.
AHF Data Directory requires at least 5GB (Recommended 10GB) of free space.

Choose Data Directory from below options :

1. /u01/app/grid [Free Space : 9323 MB]
2. Enter a different Location

Choose Option [1 - 2] : 2

Please Enter AHF Data Directory : /depot/TFA_DATA

AHF Data Directory : /depot/TFA_DATA/oracle.ahf/data

Do you want to add AHF Notification Email IDs ? [Y]|N : n

AHF will also be installed/upgraded on these Cluster Nodes :

1. node1

The AHF Location and AHF Data Directory must exist on the above nodes
AHF Location : /opt/oracle.ahf
AHF Data Directory : /depot/TFA_DATA/oracle.ahf/data

Do you want to install/upgrade AHF on Cluster Nodes ? [Y]|N :

Extracting AHF to /opt/oracle.ahf

Configuring TFA Services

Discovering Nodes and Oracle Resources

Do you want us to store the Password for Cells in Oracle Wallet: [Y]|N

Is password same for all Cells: [Y]|N

Please Enter Password for Cell:
Please Confirm Password for Cell:

Both Passwords should be the same...!!!

Please Enter Password for Cell:
Please Confirm Password for Cell:

Verifying Password...

.----------------------------------.
|  | EXADATA CELL | CURRENT STATUS |
+--+--------------+----------------+
'--+--------------+----------------'


Not generating certificates as GI discovered

Starting TFA Services

.-------------------------------------------------------------------------------------.
| Host              | Status of TFA | PID  | Port | Version    | Build ID             |
+-------------------+---------------+------+------+------------+----------------------+
| node2             | RUNNING       | 1077 | 5000 | 20.1.2.0.0 | 20120020200403113404 |
'-------------------+---------------+------+------+------------+----------------------'

Running TFA Inventory...

Adding default users to TFA Access list...

.--------------------------------------------------------------------------.
|                       Summary of AHF Configuration                       |
+-----------------+--------------------------------------------------------+
| Parameter       | Value                                                  |
+-----------------+--------------------------------------------------------+
| AHF Location    | /opt/oracle.ahf                                        |
| TFA Location    | /opt/oracle.ahf/tfa                                    |
| Exachk Location | /opt/oracle.ahf/exachk                                 |
| Data Directory  | /depot/TFA_DATA/oracle.ahf/data                        |
| Repository      | /depot/TFA_DATA/oracle.ahf/data/repository             |
| Diag Directory  | /depot/TFA_DATA/oracle.ahf/data/node2/diag |
'-----------------+--------------------------------------------------------'


Starting exachk daemon from AHF ...

AHF install completed on node2

Installing AHF on Remote Nodes :

AHF will be installed on node1, Please wait.

Installing AHF on node1 :

[node1] Copying AHF Installer

[node1] Running AHF Installer

AHF binaries are available in /opt/oracle.ahf/bin

AHF is successfully installed

Moving /tmp/ahf_install_382363_2020_04_30-08_32_06.log to /depot/TFA_DATA/oracle.ahf/data/node2/diag/ahf/

       
 


2. If all good then you can run below command to check status.


       

[root@node2 TFA]# tfactl status

.---------------------------------------------------------------------------------------------------------.
| Host              | Status of TFA | PID   | Port | Version    | Build ID             | Inventory Status |
+-------------------+---------------+-------+------+------------+----------------------+------------------+
| node2             | RUNNING       |  1077 | 5000 | 20.1.2.0.0 | 20120020200403113404 | RUNNING          |
| node1             | RUNNING       | 28675 | 5000 | 20.1.2.0.0 | 20120020200403113404 | RUNNING          |
'-------------------+---------------+-------+------+------------+----------------------+------------------'

       
 
Issue:
       

 [root@node1 ssh]# tfactl status

.----------------------------------------------------------------------------------------------------------.
| Host              | Status of TFA | PID    | Port | Version    | Build ID             | Inventory Status |
+-------------------+---------------+--------+------+------------+----------------------+------------------+
| node1 | RUNNING       | 101416 | 5000 | 20.1.2.0.0 | 20120020200403113404 | STOPPED          |
| node2 | RUNNING       |  89841 | 5000 | 20.1.2.0.0 | 20120020200403113404 | RUNNING          |
'-------------------+---------------+--------+------+------------+----------------------+------------------'
[root@node1 ssh]#

       
 

After many round of troubleshooting we notice PermitRootLogin was not allowed.

We change below in /etc/ssh/sshd_config file in both node (node1 and node2):

PasswordAuthentication yes
PermitRootLogin yes


2. restart sshd service

service sshd restart

3. Uninstall TFA and Install it back
3. Uninstall TFA and Install it back
       

[root@node2 ssh]# tfactl uninstall
Starting AHF Uninstall
NOTE : Uninstalling does not return all the space used by the AHF repository
TFA-00104 Cannot establish connection with TFA Server. Please check TFA Certificates
TFA-00104 Cannot establish connection with TFA Server. Please check TFA Certificates
AHF will be uninstalled on:
node2
node1 node2

Do you want to continue with AHF uninstall ? [Y]|N :

Stopping AHF service on local node node2...
Stopping TFA Support Tools...


TFA-00002 Oracle Trace File Analyzer (TFA) is not running
Stopping exachk scheduler ...
Removing exachk cache discovery....
No exachk cache discovery found.





Removed exachk from inittab



Stopping and removing AHF in node1...
TFA-00002 Oracle Trace File Analyzer (TFA) is not running
Removing exachk cache discovery....
No exachk cache discovery found.





Removed exachk from inittab


Successfully uninstalled AHF on node node1
Removing AHF setup on node2:
Removing /etc/rc.d/rc0.d/K17init.tfa
Removing /etc/rc.d/rc1.d/K17init.tfa
Removing /etc/rc.d/rc2.d/K17init.tfa
Removing /etc/rc.d/rc4.d/K17init.tfa
Removing /etc/rc.d/rc6.d/K17init.tfa
Removing /etc/init.d/init.tfa...
Removing /opt/oracle.ahf/jre
Removing /opt/oracle.ahf/common
Removing /opt/oracle.ahf/bin
Removing /opt/oracle.ahf/python
Removing /opt/oracle.ahf/analyzer
Removing /opt/oracle.ahf/tfa
Removing /opt/oracle.ahf/ahf
Removing /opt/oracle.ahf/exachk
Removing /opt/oracle.ahf/data/node2
Removing /opt/oracle.ahf/install.properties

[root@node2 ssh]#

       
 

Wednesday, November 20, 2019

Sybase ASE Login Failed

Issue while oracle database connect to sybase


[oracle@dbnode admin]$ sqlplus "/as sysdba"

SQL*Plus: Release 12.2.0.1.0 Production on

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c EE Extreme Perf Release 12.2.0.1.0 - 64bit Production

SQL> alter session set container=DB1;

Session altered.

SQL> select * from dual@sybase_test1;
select * from dual@sybase_test1
                   *
ERROR at line 1:
ORA-01017: invalid username/password; logon denied
[Oracle][ODBC Sybase Wire Protocol driver][Sybase ASE]Login Failed.  Check for
valid user ID, server name and password. {28000,NativeErr = 4002}
ORA-02063: preceding 2 lines from sybase_test1


root cause:


sybase username password was invalidate which is used to connect to sybase database.



Solution:
1. connect sybase database and see if the user name password is working?
2. if it's not working then reset password.
3. update the password in db link
4. Retest issue







Thursday, October 10, 2019

Oracle DB Connection with Sybase


Oracle DB Connect to Sybase database steps:

1. Install Oracle Gateway software in Oracle database

2. Configure Sybase server details

$ORACLE_HOME/dg4sybs/admin/initdg4sybs.ora

# This is a customized agent init file that contains the HS parameters
# that are needed for the Database Gateway for Sybase
#
# HS init parameters
#

HS_FDS_CONNECT_INFO=<sybase_server_host_name>:<port>/<schema>
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
HS_KEEP_REMOTE_COLUMN_SIZE = ALL
HS_NLS_LENGTH_SEMANTICS = CHAR
HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P15



3. add below entry into your listener file (if rac then grid home).

(SID_DESC =
        (SID_NAME = dg4sybs)
        (ORACLE_HOME = /u02/app/oracle/product/12.2.0/dbhome_2)
        (PROGRAM = dg4sybs)
)
 )


4. create tnsentry into ORACLE_HOME Which will connect to database

ORACLE_TO_SYBASE=
   (DESCRIPTION=
      (ADDRESS=
         (PROTOCOL=TCP)
         (HOST=<oracle db host name>)
         (PORT=1522)
      )
      (CONNECT_DATA=
         (SID=dg4sybs))
      (HS=OK))



5. create database link into oracle database

CREATE PUBLIC DATABASE LINK SYBASE_TO_ORACLE CONNECT TO "sybase_db_username" IDENTIFIED BY "sybase_db_password" USING 'ORACLE_TO_SYBASE';     

6. Test database connection

select * from dual@SYBASE_TO_ORACLE;

Monday, September 23, 2019

Linux inode setup

 

  
Command to find inode:
----------------------
find . -printf "%h\n" | cut -d/ -f-2 | sort | uniq -c | sort -rn

command to remove file:
-----------------------
nohup find /u02/app/oracle/product/11.2.0/dbhome_2/rdbms/audit -type f -name "*.aud" -mtime +7 -exec rm -f {} \; &
nohup find /u02/app/oracle/product/11.2.0/dbhome_4/rdbms/audit -type f -name "*.aud" -mtime +7 -exec rm -f {} \; &
nohup find /u02/app/oracle/product/12.1.0/dbhome_2/rdbms/audit -type f -name "*.aud" -mtime +7 -exec rm -f {} \; &
nohup find /u02/app/oracle/product/12.1.0/dbhome_2/rdbms/audit -type f -name "*.aud" -mtime +7 -exec rm -f {} \; &


[root@server1 ~]# df -ih /u02
Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/xvdg        5.7M  5.2M  501K   92% /u02

[root@server1 ~]# pwd
/root

[root@server1 ~]# cd /u02
[root@server1 u02]# cd app

[root@server1 app]# find . -printf "%h\n" | cut -d/ -f-2 | sort | uniq -c | sort -rn
5505547 ./oracle
      3 .
[root@server1 app]# df -ih /u02
Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/xvdg        5.7M  5.2M  505K   92% /u02

[root@server1 app]# cd /u02/app/oracle/product

[root@server1 product]# ls
11.2.0  12.1.0  12.2.0  nohup.out  oem13

[root@server1 product]# find . -printf "%h\n" | cut -d/ -f-2 | sort | uniq -c | sort -rn
2427032 ./12.1.0
1920579 ./11.2.0
 930820 ./12.2.0
 130574 ./oem13
      6 .
[root@server1 product]#
  
  

Tuesday, June 4, 2019

FNDCPASS Failed after 12.2.6 cloning

Hello Friend,

Here are the issues that I have encountered after cloning and the fix for the same. hope this will help someone to quickly resolve the same issues.


Error in FNDCPASS command output:

Working...
Oracle error -29548: ORA-29548: Java system class reported: release of Java system classes in the database (12.1.0.2.181016 1.6) does not match that of the oracle executable (12.1.0.2.190416 1.6) - USER ( APPS ) has been detected in FND_WEB_SEC.GET_OP_VALUE.


This error is due to the mismatch of JAVA version in Oracle Database and Oracle Apps.


Solution for this: Re install JAVA in Oracle Database and re-run the FNDCPASS command

1. UnInstall JAVA
connect / as sysdba
set echo on
set serveroutput on
select * from v$instance;
execute rmjvm.run(false);
shutdown immediate
set echo off
spool off
exit




2. Install JAVA


set serveroutput on
set echo on
startup mount
alter system set "_system_trig_enabled" = false scope=memory;
alter database open;
create or replace java system
/
shutdown immediate
set echo off
spool off
exit

Wednesday, May 1, 2019

Setup suse 15 for SAP HANA

Setup SAP HANA server 


  1. Check OS Version
  2. Setup hostname
  3. Setup swap space
  4. Create a mount point for SAP Application
  5. Install packages for SAP HANA


Check OS Version


Find OS Version:

cat /etc/os-release


Output

demo21:/dev/disk/by-id # cat /etc/os-release
NAME="SLES"
VERSION="15"
VERSION_ID="15"
PRETTY_NAME="SUSE Linux Enterprise Server 15"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15"
demo21:/dev/disk/by-id #


Setup hostname

hostnamectl set-hostname demo21.xxx.com



Setup swap space

cat /proc/swaps
mkdir -p /var/lib/swap
dd if=/dev/zero of=/var/lib/swap/swapfile bs=1M count=8192
mkswap /var/lib/swap/swapfile
swapon /var/lib/swap/swapfile
cat /proc/swaps

#/etc/fstab
/var/lib/swap/swapfile none swap  defaults  0  0

Create a mount point for SAP Application

List disk



demo21:/dev/disk/by-id # lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
nvme0n1     259:0    0  200G  0 disk /hana/log
nvme1n1     259:1    0  400G  0 disk /hana/shared
nvme2n1     259:2    0  400G  0 disk /hana/data
nvme3n1     259:3    0   50G  0 disk
├─nvme3n1p1 259:4    0  300M  0 part /boot
└─nvme3n1p2 259:5    0 49.7G  0 part /
demo21:/dev/disk/by-id #


Create file system
mkfs.xfs /dev/nvme0n1
mkfs.xfs /dev/nvme1n1
mkfs.xfs /dev/nvme2n1

Find the disk and UUID

cd /dev/disk/by-uuid
lrwxrwxrwx 1 root root 13 May 15 03:32 cd8e2b68-f6aa-4bab-acf0-e099cdcd98e3 -> ../../nvme1n1
lrwxrwxrwx 1 root root 13 May 15 03:32 cda44fcf-9fa8-4e4f-aa8e-99d1a1d6842d -> ../../nvme2n1
lrwxrwxrwx 1 root root 13 May 15 03:32 3bc7f036-e08f-479b-a347-d681badf05e1 -> ../../nvme0n1


Create Mount point

mkdir -p /hana
mkdir -p /hana/log
mkdir -p /hana/data
mkdir -p /hana/shared

Update /etc/fstab file

The space- or tab-separated fields within each row (typically aligned in columns, as above, but this is not a requirement) must appear in a specific order, as follows:

  • Device-spec – The device name, label, UUID, or other means of specifying the partition or data source this entry refers to.
  • Mount-point – Where the contents of the device may be accessed after mounting; for swap partitions or files, this is set to none.
  • fs-type – The type of file system to be mounted.
  • Options – Options describing various other aspects of the file system, such as whether it is automatically mounted at boot, which users may mount or access it, whether it may be written to or only read from, its size, and so forth; the special option defaults refers to a predetermined set of options depending on the file system type.
  • dump – A number indicating whether and how often the file system should be backed up by the dump program; a zero indicates the file system will never be automatically backed up.
  • pass – A number indicating the order in which the fsck program will check the devices for errors at boot time; this is 1 for the root file system and either 2 (meaning check after root) or 0 (do not check) for all other devices.


#/etc/fstab
UUID=3bc7f036-e08f-479b-a347-d681badf05e1  /hana/shared xfs  defaults  0  0
UUID=cda44fcf-9fa8-4e4f-aa8e-99d1a1d6842d  /hana/log xfs  defaults  0  0
UUID=cd8e2b68-f6aa-4bab-acf0-e099cdcd98e3  /hana/data xfs  defaults  0  0


Mount disk to a server

mount -a

Install packages for SAP HANA

zypper install sapconf
zypper install wget

Friday, April 19, 2019

Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded

Applying Oracle EBS WebLogic patch is throwing an error


Checking for conflicts................ ..
Conflict(s) detected - resolve conflict condition and execute patch installation again
Conflict condition details follow:
Patch U5I2 is mutually exclusive and cannot coexist with patch(es): FMJJ,GHHS
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
        at java.util.HashMap.createEntry(HashMap.java:897)
        at java.util.HashMap.addEntry(HashMap.java:884)
        at java.util.HashMap.put(HashMap.java:505)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.loadPropertyMap(XBeanDataHandler.java:778)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.<init>(XBeanDataHandler.java:99)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.createDataHandler(XBeanDataHandler.java:559)
        at com.bea.cie.common.dao.xbean.XBeanDataHandler.getComplexValue(XBeanDataHandler.java:455)
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:442)
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getPatchDependencies(PatchCatalogHelper.java:464)
        at com.bea.plateng.patch.dao.cat.PatchCatalog.getPatchDependencies(PatchCatalog.java:56)
        at com.bea.plateng.patch.dao.cat.PatchCatalogHelper.getInvalidatedPatchMap(PatchCatalogHelper.java:1621)
        at com.bea.plateng.patch.PatchSystem.updatePatchCatalog(PatchSystem.java:436)
        at com.bea.plateng.patch.PatchSystem.refresh(PatchSystem.java:130)
        at com.bea.plateng.patch.PatchSystem.setCacheDir(PatchSystem.java:201)
        at com.bea.plateng.patch.Patch.main(Patch.java:306)
applsmk@grcldm:/u01/EBSDEV/fs1/FMW_Home/utils/bsu$
applsmk@grcldm:/u01/EBSDEV/fs1/FMW_Home/utils/bsu$





Verify the value for the MEM_ARGS Parameters:


grep -i MEM_ARGS $FMW_HOME/utils/bsu/bsu.sh


Change the value if it's not matching:


MEM_ARGS="-d64 -Xms4096m -Xmx4096m -XX:+UseParallelGC"


Below are the finding before and after fix:


applsmk@grcldm:/u01/EBSDEV/fs1/FMW_Home/utils/bsu$ diff bsu.sh bsu.sh.jm1
5,6c5
< #MEM_ARGS="-Xms2048m -Xmx2048m -XX:+UseParallelGC"
< MEM_ARGS="-d64 -Xms4096m -Xmx4096m -XX:+UseParallelGC"
---
> MEM_ARGS="-Xms2048m -Xmx2048m -XX:+UseParallelGC"
applsmk@grcldm:/u01/EBSDEV/fs1/FMW_Home/utils/bsu$



Sunday, February 24, 2019

AUSS AC53 nano Driver on Ubuntu 18.04 LTS 2

Hello All,

Today, I manage to install the AC53 WIFI dongle in Ubuntu 18.04 LTS 2

cd ~
git clone https://github.com/FomalhautWeisszwerg/rtl8822bu.git

Reference:
https://ubuntuforums.org/showthread.php?t=2395729


make
make install
reboot


1.  Update and Upgrade

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade



2.  Install windows remote desktop
remmina #This one come by default. if it's not there then you can install it.


3.  Install Atom Editor

Install Atom Editor.

Run below command in a sequence which will do:
a) updating the packages
b) import the Atom Editor GPG key
c) install the latest version of Atom

sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packagecloud.io/AtomEditor/atom/gpgkey -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main"



Thursday, January 24, 2019

Ubuntu desktop setup for DevOps


1.  Update and Upgrade

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade



2.  Install windows remote desktop
remmina #This one come by default. if it's not there then you can install it.


3.  Install Atom Editor

Install Atom Editor.

Run below command in a sequence which will do:
a) updating the packages
b) import the Atom Editor GPG key
c) install the latest version of Atom

sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packagecloud.io/AtomEditor/atom/gpgkey -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main"



4.  Enable ssh in Ubuntu

Run below commands it will enable ssh login from remote host

sudo apt-get install openssh-server
sudo service ssh status
sudo service ssh restart



5.  Install vagrant
* vagrant help to create vm's and it download installer.

sudo apt install vagrant


6.  Install Oracle Linux 7 with vagrant


cat << EOF >> /tmp/olu6.sh
vagrant box add --name ol76 https://yum.oracle.com/boxes/oraclelinux/ol76/ol76.box
vagrant init ol76
vagrant up
EOF

chmod +x /tmp/olu6.sh
sh /tmp/olu6.sh


apt-key warning when sudo apt update run

Issue: apt-key warning when sudo apt update run Update below file: cat /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list ...