Monday, 11 February 2019

Step step to create Linux Swap File

[root@ncbsstd ~]# free -g
             total       used       free     shared    buffers     cached
Mem:           503          1        501          0          0          0
-/+ buffers/cache:          1        502
Swap:            0          0          0

[root@ncbsstd ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb1             197G  6.4G  181G   4% /
tmpfs                 252G     0  252G   0% /dev/shm
/dev/mapper/mpathap1  976M   82M  828M   9% /boot
/dev/sdb3              59G   53M   56G   1% /tmp
/dev/sdb5             1.2T  5.4G  1.1T   1% /u01
/dev/mapper/mpathap2  1.8T   68M  1.7T   1% /u02
/dev/sdb2              99G  2.3G   92G   3% /var

The following steps show how to add 128GB of swap to our server:

[root@ncbsstd ~]# fallocate -l 128G /u01/swapfile

[root@ncbsstd ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb1             197G  6.4G  181G   4% /
tmpfs                 252G     0  252G   0% /dev/shm
/dev/mapper/mpathap1  976M   82M  828M   9% /boot
/dev/sdb3              59G   53M   56G   1% /tmp
/dev/sdb5             1.2T  134G  940G  13% /u01
/dev/mapper/mpathap2  1.8T   68M  1.7T   1% /u02
/dev/sdb2              99G  2.3G   92G   3% /var

Format the swap file by entering the following command

[root@ncbsstd ~]# chmod 600 /u01/swapfile
[root@ncbsstd ~]#
[root@ncbsstd ~]# mkswap /u01/swapfile
mkswap: /u01/swapfile: warning: don't erase bootbits sectors
        on whole disk. Use -f to force.
Setting up swapspace version 1, size = 134217724 KiB
no label, UUID=df1bbc77-ffe2-4572-a156-150251282dcb
[root@ncbsstd ~]#

Now use the swap space 

[root@ncbsstd ~]# swapon /u01/swapfile
[root@ncbsstd ~]# free -g
             total       used       free     shared    buffers     cached
Mem:           503          1        501          0          0          0
-/+ buffers/cache:          1        502
Swap:          127          0        127
[root@ncbsstd ~]#

[root@ncbsstd ~]# free -h
             total       used       free     shared    buffers     cached
Mem:          503G       1.7G       501G       932K        38M       159M
-/+ buffers/cache:       1.5G       502G
Swap:         127G         0B       127G
[root@ncbsstd ~]#
[root@ncbsstd ~]# vim /etc/fstab
/u01/swapfile swap swap defaults 0 0

reboot the server and check again ............Thats it !!!!!!!!!!!!!!!!!




Monday, 21 January 2019

Continiously getting the deprecated SQLNET.ALLOWED_LOGON_VERSION parameter error in alert log in Oracle 12cr2

Problem: Continiously getting the deprecated SQLNET.ALLOWED_LOGON_VERSION parameter error in alert log in Oracle 12cr2

Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.
Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.
2019-01-22T09:21:33.072026+06:00
Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.
Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.
2019-01-22T09:22:33.094491+06:00
Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.
Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.
2019-01-22T09:23:33.117507+06:00
Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.
Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.
2019-01-22T09:24:33.140318+06:00
Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.
Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.
2019-01-22T09:25:33.164969+06:00
Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.
Using deprecated SQLNET.ALLOWED_LOGON_VERSION parameter.

Reason:

Currently the sqlnet.ora file contains the following parameter

SQLNET.ALLOWED_LOGON_VERSION=8

Solution:

Step 1: Remove SQLNET.ALLOWED_LOGON_VERSION parameter from sqlnet.ora.

Based on your environment, set the following parameters to a proper value:

SQLNET.ALLOWED_LOGON_VERSION_SERVER=10
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=10


[oracle@utility-db-serv admin]$ cat sqlnet.ora
# sqlnet.ora Network Configuration File: /oraclehome/app/oracle/product/12.2.0.1/db_1/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.

NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
SQLNET.AUTHENTICATION_SERVICES=NONE
#SQLNET.ALLOWED_LOGON_VERSION=8
SQLNET.ALLOWED_LOGON_VERSION_SERVER=10
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=10

WALLET_LOCATION =
   (SOURCE =
     (METHOD = FILE)
     (METHOD_DATA =
       (DIRECTORY = /oraclehome/app/oracle/admin/wallet)
     )
   )
SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0
[oracle@utility-db-serv admin]$

Step 2: Reload the the listener file

[oracle@utility-db-serv admin]$ lsnrctl reload

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 22-JAN-2019 09:26:02

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=utility-db-serv.bankasia-bd.com)(PORT=1521)))
The command completed successfully
[oracle@utility-db-serv admin]$

Step 3: Now check the alert log file.

Problem solved

Thursday, 27 December 2018

Find and Kill specific OS process

kill -9 `ps -ef | grep [N]odeManager | awk '{print $2}'`

kill -9 `ps -ef | grep oracle | grep report | awk '{print $2}'`​