AzureDiagnostics | where Category == "kube-audit" | summarize requests = count() by bin(TimeGenerated, 5m), userAgent_s | order by requests desc AzureDiagnostics | where Category == "kube-audit" | summarize requests = count() by userAgent_s | order by requests desc AzureDiagnostics | where Category == "kube-audit" | take 5 AzureDiagnostics | where Category == "kube-audit" | summarize count() by verb_s | order by count_ desc AzureDiagnostics | where Category == "kube-audit" | extend logData = parse_json(log_s) | summarize count() by tostring(logData.objectRef.resource) | order by count_ desc AzureDiagnostics | where Category == "kube-audit" | extend logData = parse_json(log_s) | where isempty(tostring(logData.objectRef.resource)) | summarize count() by tostring(logData.requestURI) | order by count_ desc AzureDiagnostics | where Category == "kube-audit" | extend logData = parse_json(log_s) | where tostring(logData.requestURI) == "/readyz" | summarize count() by tostring(logData.userAgent) | order by count_ desc
helps you achieve understanding, develop good practices, and operate your team and organization for maximum DevOps awesomeness
Thursday, March 5, 2026
Azure AKS - Diag Logs - KQL
Monday, January 19, 2026
Windows 2016 - Install AZ CLI & KUBECTL
#AZ CLI msiexec /i https://aka.ms/installazurecliwindows #Kubectl curl.exe -LO "https://dl.k8s.io/release/v1.30.1/bin/windows/amd64/kubectl.exe" kubectl version --client az login --use-device-code
Thursday, February 6, 2025
Ubuntu - Install K9S
wget https://github.com/derailed/k9s/releases/latest/download/k9s_linux_amd64.deb sudo apt install ./k9s_linux_amd64.deb rm k9s_linux_amd64.deb
Monday, January 1, 2024
Ubuntu - Install trivy image scanner
How to Install Trivy Image Scanner on Ubuntu (Step-by-Step Guide)
Trivy is a popular open-source vulnerability scanner used in DevSecOps pipelines to scan container images, file systems, and Kubernetes clusters. This guide shows how to install Trivy on Ubuntu using the official APT repository and run image vulnerability scans.
Table of Contents
- What is Trivy?
- Why Use Trivy on Ubuntu?
- Remove Snap-installed Trivy
- Install Trivy Using APT
- Verify Trivy Installation
- Scan Docker Image with Trivy
- FAQ
What is Trivy?
Trivy is a simple and comprehensive vulnerability scanner for containers. It detects vulnerabilities in OS packages and application dependencies before deployment.
Why Use Trivy on Ubuntu?
- Easy installation
- Fast vulnerability scanning
- Widely used in CI/CD pipelines
- Supports Docker, Kubernetes, and filesystems
Remove Snap-installed Trivy (Recommended)
If Trivy was installed using Snap, remove it to avoid conflicts:
sudo snap remove trivy
which trivy
Install Trivy on Ubuntu Using Official APT Repository
sudo apt-get install -y wget gnupg lsb-release
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | \
sudo gpg --dearmor -o /usr/share/keyrings/trivy.gpg
echo "deb [signed-by=/usr/share/keyrings/trivy.gpg] \
https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | \
sudo tee /etc/apt/sources.list.d/trivy.list
sudo apt update
sudo apt install -y trivy
Verify Trivy Installation
trivy --version
/usr/bin/trivy --version
Scan Docker Image Using Trivy
Full Vulnerability Scan
/usr/bin/trivy image sparkaks2:latest
Only Vulnerability Scan
/usr/bin/trivy image --scanners vuln --timeout 15m sparkaks2:latest
Only OS Package Scan
/usr/bin/trivy image --vuln-type os sparkaks2:latest
Frequently Asked Questions (FAQ)
Is Trivy free to use?
Yes, Trivy is open-source and free for vulnerability scanning.
Does Trivy support Kubernetes?
Yes, Trivy can scan Kubernetes clusters and manifests.
Which Ubuntu versions are supported?
Ubuntu 18.04, 20.04, 22.04, and newer.
Related Guides:
More DevOps & Azure Tutorials
Sunday, October 1, 2023
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
sudo apt-key list apt-key export 0EBFCD88 | sudo gpg --dearmour -o /usr/share/keyrings/docker.gpg #edit file sudo vim /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list #from deb https://download.docker.com/linux/ubuntu focal stable #to deb [arch=amd64 signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu focal stable
This should resolve issue.
Friday, September 1, 2023
Elasticsearch Index Red / Yellow
Issue: Elasticsearch Index Red / Yellow
Connect to Stack management in kibana:
Kibana -> DevTools
# Get cluster health
GET _cluster/health
# Get Index helath - Look for the red/yellow index
GET /_cat/indices
# Update number_of_replicas to 0.
PUT /.ds-logs-apm.error-default-2023.10.06-000002/_settings
{
"number_of_replicas": 0
}
#This will change for all index with this patent
PUT /.ds-traces-apm-default-2023*/_settings
{
"number_of_replicas": 0
}
This should resolve issue.
Wednesday, March 1, 2023
How to use tmux
Select current value
1. Create a new tmux session tmux new -s logjob 2. Run your job inside tmux tail -f /var/log/syslog 3. Disconnect (detach) from the tmux session Ctrl + b, then d 4. List tmux sessions (optional) tmux ls 5. Reconnect (attach) to the session tmux attach -t logjob 6. Kill the session when done tmux kill-session -t logjob 7. Create session and run job in one command tmux new -s logjob "python log_job.py" 8. Detach from outside (if attached elsewhere) tmux detach -s logjob
Wednesday, July 27, 2022
logrotate is not rotating logs
Issue: logrotate is not rotating logs files
logrotate update below file, let's start with this file:
cat /var/lib/logrotate/status
logrotate state -- version 2 "/var/log/ufw.log" 2022-3-20-6:25:1 "/var/log/nginx/web_xxx.access.log" 2022-3-23-6:25:1 "/var/log/nginx/access.log" 2018-8-2-21:0:0 "/var/log/apt/history.log" 2021-11-8-6:25:1 "/var/log/user.log" 2022-3-23-6:0:0
We can see some of the logs are rotating but not all so let's run logrotate in debug mode and look for the error if any
sudo /usr/sbin/logrotate -d /etc/logrotate.conf
compressing log with: /bin/gzip renaming /home/deployer/apps/api_abc_co/shared/log/sidekiq.log.2.gz to /home/deployer/apps/api_abc_co/shared/log/sidekiq.log.3.gz (rotatecount 2, logstart 1, i 2), renaming /home/deployer/apps/api_abc_co/shared/log/sidekiq.log.1.gz to /home/deployer/apps/api_abc_co/shared/log/sidekiq.log.2.gz (rotatecount 2, logstart 1, i 1), renaming /home/deployer/apps/api_abc_co/shared/log/sidekiq.log.0.gz to /home/deployer/apps/api_abc_co/shared/log/sidekiq.log.1.gz (rotatecount 2, logstart 1, i 0), copying /home/deployer/apps/api_abc_co/shared/log/sidekiq.log to /home/deployer/apps/api_abc_co/shared/log/sidekiq.log.1 truncating /home/deployer/apps/api_abc_co/shared/log/sidekiq.log removing old log /home/deployer/apps/api_abc_co/shared/log/sidekiq.log.3.gz error: error opening /home/deployer/apps/api_abc_co/shared/log/sidekiq.log.3.gz: No such file or directory
it's failing as it's unable to create a file. it's a bug. manually create a file and re-run logrotate in debug mode and fix all the errors.
This should resolve issue.
Monday, December 20, 2021
Saturday, October 23, 2021
Setup Laptop for developers - Ubuntu
- Install Ubuntu operating system
- Install Git
// To install git
sudo apt install git// To check the git version
git --version//To setup the username and email to communitcate with any repo
git config --global user.name "Your Name"
git config --global user.email "youremal@email.com"
- Install ZSH follow this blog
Monday, December 28, 2020
Linux server expand disk size
Oracle Cloud - Linux server expand disk size
Extend your disk from the storage server 1st. in this case we are using Oracle Cloud so we have extended in OCI console
fdisk -l
[root@ebs121db1-mylocal-com ~]# fdisk -l WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion. Disk /dev/sda: 50.0 GB, 50010783744 bytes, 97677312 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 1048576 bytes Disk label type: gpt Disk identifier: A21E6499-33C5-401E-9330-8331C0E94D2C # Start End Size Type Name 1 2048 411647 200M EFI System EFI System Partition 2 411648 17188863 8G Linux swap 3 17188864 97675263 38.4G Microsoft basic Disk /dev/sdb: 536.9 GB, 536870912000 bytes, 1048576000 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
You can see that disk is resized and it's visible in operating system level. next is we need to extend it.
resize2fs /dev/sdb
[root@ebs121db1-mylocal-com ~]# resize2fs /dev/sdb resize2fs 1.45.4 (23-Sep-2019) Filesystem at /dev/sdb is mounted on /u01; on-line resizing required old_desc_blocks = 19, new_desc_blocks = 32 The filesystem on /dev/sdb is now 131072000 (4k) blocks long. [root@ebs121db1-mylocal-com ~]# df -h /u01 Filesystem Size Used Avail Use% Mounted on /dev/sdb 492G 260G 209G 56% /u01 [root@ebs121db1-mylocal-com ~]#
/u01 mount point size is changed.
Saturday, November 28, 2020
Install htop in Oracle Linux 7
Install htop in Oracle Linux 7
htop is not default install and it's not part of default repo so when we try to install htop it throw this message
yum install htop
[root@ebs121db1 yum.repos.d]# yum install htop Loaded plugins: langpacks, ulninfo No package htop available. Error: Nothing to do
Solution: we need to enable this repo to make htop avaibale and then install it.
yum-config-manager --enable ol7_developer_EPEL
yum-config-manager --disable ol7_developer_EPEL
Install htop command yum install -y htop
[root@ebs121db1 yum.repos.d]# yum install -y htop Loaded plugins: langpacks, ulninfo Resolving Dependencies --> Running transaction check ---> Package htop.x86_64 0:2.2.0-3.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================================================================================================== Package Arch Version Repository Size ============================================================================================================================================================================================================================================== Installing: htop x86_64 2.2.0-3.el7 ol7_developer_EPEL 103 k Transaction Summary ============================================================================================================================================================================================================================================== Install 1 Package Total download size: 103 k Installed size: 218 k Downloading packages: htop-2.2.0-3.el7.x86_64.rpm | 103 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : htop-2.2.0-3.el7.x86_64 1/1 Verifying : htop-2.2.0-3.el7.x86_64 1/1 Installed: htop.x86_64 0:2.2.0-3.el7 Complete! [root@ebs121db1 yum.repos.d]#
Monday, September 28, 2020
grid: Error: Could not get parameter sid from registry
[root@node1xxxxxxxxxx ~]# dbaascli database list DBAAS CLI version 19.1.1.1.0 Executing command database list Retrieving dbs.. grid: Error: Could not get parameter sid from registry An error occured during module execution. Please refer to the log file for more information. [root@node1xxxxxxxxxx ~]# [root@node1xxxxxxxxxx ~]# /var/opt/oracle/dbaascli/dbaascli database list DBAAS CLI version 19.1.1.1.0 Executing command database list Retrieving dbs.. .-------------------------------------------------------------------. | Database List | +----------+-----+------+------+--------+--------+------------------+ | DB Name | CPU | PGA | SGA | DATA | FRA | Nodelist | +----------+-----+------+------+--------+--------+------------------+ | XXX122C2 | 28 | 4 GB | 5 GB | 304 GB | 85 GB | node1xxxxxxxxxx | | | | | | | | node2xxxxxxxxxx | +----------+-----+------+------+--------+--------+------------------+ | XXX121 | 28 | 4 GB | 5 GB | 0 GB | 0 GB | node1xxxxxxxxxx | | | | | | | | node2xxxxxxxxxx | +----------+-----+------+------+--------+--------+------------------+ | XXXX11 | 28 | 4 GB | 5 GB | 42 GB | 149 GB | node1xxxxxxxxxx | | | | | | | | node2xxxxxxxxxx | +----------+-----+------+------+--------+--------+------------------+ | XXXX111 | 28 | 4 GB | 5 GB | 0 GB | 0 GB | node2xxxxxxxxxx | '----------+-----+------+------+--------+--------+------------------' .---------------------------------------------------------------. | Cluster Information | +--------------------+-----------------------+------------------+ | Total CPU per Node | Total Memory per Node | Total Nodes | +--------------------+-----------------------+------------------+ | 28 | 176 GB | node1xxxxxxxxxx | | | | node2xxxxxxxxxx | '--------------------+-----------------------+------------------' Please add "sid=+ASM3" into /var/opt/oracle/creg/grid/grid.ini on node node1xxxxxxxxxx [root@node1xxxxxxxxxx ~]# cat /var/opt/oracle/creg/grid/grid.ini ################################################################# # This file is automatically generated by database as a service # # # # Do not edit contents in this file, Thanks! # # # ################################################################# acfs_oh_dir=/u02/app_acfs acfs_scratch_dir=/scratch/acfsc2_dg1 acfs_vol_dir=/var/opt/oracle/dbaas_acfs dbname=+ASM exacm_gen1=yes grid_wallet_loc=/u02/app/oracle/admin/grid/grid_wallet oracle_home=/u01/app/12.2.0.1/grid patch_level_ok=1 psu_patched=1 sid=+ASM3 status=enabled version=12201 [root@node1xxxxxxxxxx ~]# [root@node1xxxxxxxxxx ~]# /var/opt/oracle/dbaascli/dbaascli database list DBAAS CLI version 19.1.1.1.0 Executing command database list Retrieving dbs.. .-------------------------------------------------------------------. | Database List | +----------+-----+------+------+--------+--------+------------------+ | DB Name | CPU | PGA | SGA | DATA | FRA | Nodelist | +----------+-----+------+------+--------+--------+------------------+ | XXX122C2 | 28 | 4 GB | 5 GB | 304 GB | 85 GB | node1xxxxxxxxxx | | | | | | | | node2xxxxxxxxxx | +----------+-----+------+------+--------+--------+------------------+ | XXX121 | 28 | 4 GB | 5 GB | 0 GB | 0 GB | node1xxxxxxxxxx | | | | | | | | node2xxxxxxxxxx | +----------+-----+------+------+--------+--------+------------------+ | XXXX11 | 28 | 4 GB | 5 GB | 42 GB | 149 GB | node1xxxxxxxxxx | | | | | | | | node2xxxxxxxxxx | +----------+-----+------+------+--------+--------+------------------+ | XXXX111 | 28 | 4 GB | 5 GB | 0 GB | 0 GB | node2xxxxxxxxxx | '----------+-----+------+------+--------+--------+------------------' .---------------------------------------------------------------. | Cluster Information | +--------------------+-----------------------+------------------+ | Total CPU per Node | Total Memory per Node | Total Nodes | +--------------------+-----------------------+------------------+ | 28 | 176 GB | node1xxxxxxxxxx | | | | node2xxxxxxxxxx | '--------------------+-----------------------+------------------'
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
[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
[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;
Thursday, September 26, 2019
BigData quick reference noted
This blog page is dedicated for BigData reading material.
https://www.oracle-cloud.com/
https://www.slideshare.net/BernardMarr/big-data-25-facts/2-Every_2_dayswe_create_as
https://d3c33hcgiwev3.cloudfront.net/_b80b26ca6e61e6dc1e42e754e9bcd3b4_WhatLaunchedTheBigDataEra-Altintas-Final.pdf?Expires=1569542400&Signature=H2QTpw346bGE0wyFCJUX~VEKNt5ASs6mlxkyGlqOvmdvp9gpN9Mc3phkdWbYDEe8BeXurFHATcAI3G2tWzuvmDVuvShdAPGkMmCgz4dlTwMVTbyW1YWSeiMjxbeO8b37Q8zs09xTby1Ax7ENqaRtsB~CQ-zCisBSq~vGRZpA4rI_&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A
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...
-
Install htop in Oracle Linux 7 htop is not default install and it's not part of default repo so when we try to install htop it throw...
-
Select current value select DEVELOPER_PARAMETERS from FND_CP_SERVICES where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEU...
-
Logs from the autoconfig file: START: Executing /u01/EBSDEV/fs1/inst/apps/EBSDEV_grcldm/admin/install/txkWfClone.sh -nopromptmsg txkWfC...