Wednesday, February 5, 2020

Oracle EBS 12.2 - Empty - patching cycle

 # Empty - patching cycle



cd /u01/crp
source EBSapps.env run
adop phase=prepare,finalize,cutover
source EBSapps.env run
adop phase=cleanup

Monday, January 13, 2020

Perl lib version v5.8.3 doesn’t match executable version v5.10.0



Issue: Perl lib version v5.8.3 doesn’t match executable version v5.10.0
[oracle@ebs121db1 bin]$ perl txkOnPremPrePDBCreationTasks.pl -dboraclehome=/u01/PROD/db/tech_st/11.2.0 \
> -outdir=/u01/PROD/db/tech_st/11.2.0/appsutil/log -appsuser=apps \
> -dbsid=PROD -skipdbshutdown=yes
Perl lib version (v5.8.3) doesn't match executable version (v5.10.0) at /u01/PROD/db/tech_st/11.2.0/perl/lib/5.8.3_old/x86_64-linux-thread-multi/Config.pm line 32.
Compilation failed in require at /u01/PROD/db/tech_st/11.2.0/perl/lib/5.8.3_old/x86_64-linux-thread-multi/Errno.pm line 8.
BEGIN failed--compilation aborted at /u01/PROD/db/tech_st/11.2.0/perl/lib/5.8.3_old/x86_64-linux-thread-multi/Errno.pm line 8.
Compilation failed in require at /u01/PROD/db/tech_st/11.2.0/perl/lib/5.8.3_old/English.pm line 186.
BEGIN failed--compilation aborted at /u01/PROD/db/tech_st/11.2.0/perl/lib/5.8.3_old/English.pm line 186.
Compilation failed in require at txkOnPremPrePDBCreationTasks.pl line 67.
BEGIN failed--compilation aborted at txkOnPremPrePDBCreationTasks.pl line 67.

Solution:

export PERL5LIB=$ORACLE_HOME/perl/lib/5.10.0:$ORACLE_HOME/perl/site_perl/5.10.0:$ORACLE_HOME/appsutil/perl
export PATH=$ORACLE_HOME/perl:$ORACLE_HOME/perl/lib:$ORACLE_HOME/perl/bin:$PATH





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]#
  
  

Azure AKS - Diag Logs - KQL

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