Wednesday, 13 February 2019

Step by step to Oracle WebLogic Server Patch Set Update


----Check Weblogic Version---
/u01/oracle/middleware/wlserver_10.3/server/bin/setWLSEnv.sh

$ . $WL_HOME/server/bin/setWLSEnv.sh
  $ java weblogic.version

  [oracle@SAID-DR bin]$ . ./setDomainEnv.sh
[oracle@SAID-DR ClassicDomain]$ java weblogic.version

WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050

Use 'weblogic.version -verbose' to get subsystem information

Use 'weblogic.utils.Versions' to get version information for all modules

----Download Weblogic Patch ----

[oracle@SAID-DR ClassicDomain]$

[oracle@SAID-DR ClassicDomain]$ pwd
/u01/oracle/middleware/user_projects/domains/ClassicDomain
[oracle@SAID-DR ClassicDomain]$
root@SAID-DR ~]# cd /u01/patch/
[root@SAID-DR patch]# chown oracle:oinstall p28710912_1036_Generic.zip
[root@SAID-DR patch]# chmod 755 p28710912_1036_Generic.zip
[root@SAID-DR patch]#

--------Apply Patch--------------
[oracle@SAID-DR ~]$ cd /u01/oracle/middleware/utils/bsu/
[oracle@SAID-DR bsu]$ ls -lrt
total 40
-rw-r--r-- 1 oracle oinstall 25214 Apr 24  2018 smartupdate.ico
-rw-r--r-- 1 oracle oinstall   516 Apr 24  2018 patch-client.jar
-rw-r--r-- 1 oracle oinstall   520 Apr 24  2018 bsu.jar
-rwxr-x--- 1 oracle oinstall   135 Apr 24  2018 bsu.sh
[oracle@SAID-DR bsu]$./bsu.sh

This is the syntax for the command to view the downloaded patches as below:

[oracle@SAID-DR bsu]$ ./bsu.sh -prod_dir=/u01/oracle/middleware/wlserver_10.3 -patch_download_dir=/u01/patch -status=downloaded -view -verbose
ProductName:       WebLogic Server
ProductVersion:    10.3 MP6
Components:        WebLogic Server/Core Application Server,WebLogic Server/Admi
                   nistration Console,WebLogic Server/Configuration Wizard and
                   Upgrade Framework,WebLogic Server/Web 2.0 HTTP Pub-Sub Serve
                   r,WebLogic Server/WebLogic SCA,WebLogic Server/WebLogic JDBC
                    Drivers,WebLogic Server/Third Party JDBC Drivers,WebLogic S
                   erver/WebLogic Server Clients,WebLogic Server/WebLogic Web S
                   erver Plugins,WebLogic Server/UDDI and Xquery Support,WebLog
                   ic Server/Evaluation Database,WebLogic Server/Workshop Code
                   Completion Support
BEAHome:           /u01/oracle/middleware
ProductHome:       /u01/oracle/middleware/wlserver_10.3
PatchSystemDir:    /u01/oracle/middleware/utils/bsu
PatchDir:          /u01/oracle/middleware/patch_wls1036
Profile:           Default
DownloadDir:       /u01/patch
JavaVersion:       1.6.0_29
JavaVendor:        Sun

[oracle@SAID-DR bsu]$

Install the patch:

[oracle@SAID-DR cache_dir]$ cp /u01/patch/p28710912_1036_Generic.zip /u01/oracle/middleware/utils/bsu/cache_dir/
[oracle@SAID-DR cache_dir]$ ls -lrt
total 98428
-rwxr-xr-x 1 oracle oinstall 100789655 Feb 14 03:39 p28710912_1036_Generic.zip
[oracle@SAID-DR cache_dir]$ unzip p28710912_1036_Generic.zip
Archive:  p28710912_1036_Generic.zip
  inflating: patch-catalog_26407.xml
  inflating: 7HKN.jar             
  inflating: README.txt           
[oracle@SAID-DR cache_dir]$ pwd
/u01/oracle/middleware/utils/bsu/cache_dir
[oracle@SAID-DR cache_dir]$

./bsu.sh -install -patch_download_dir=/u01/oracle/middleware/utils/bsu/cache_dir -patchlist=7HKN -prod_dir=/u01/oracle/middleware/wlserver_10.3


3.25 PM
[root@SAID-DR bsu]# cat bsu.sh
#!/bin/sh

JAVA_HOME="/usr/java/jdk1.6.0_34"

MEM_ARGS="-Xms1024m -Xmx4096m"            -----Modify the Memory parameter from 256 to 1024 and 512 to 4096

"$JAVA_HOME/bin/java" ${MEM_ARGS} -jar patch-client.jar $*
[root@SAID-DR bsu]#

[oracle@SAID-DR bsu]$ ./bsu.sh -install -patch_download_dir=/u01/oracle/middleware/utils/bsu/cache_dir -patchlist=7HKN -prod_dir=/u01/oracle/middleware/wlserver_10.3
Checking for conflicts.....
.....
No conflict(s) detected

Installing Patch ID: 7HKN..
Result: Success

[oracle@SAID-DR bsu]$
[oracle@SAID-DR bsu]$

----check if the patch is installed-------
./bsu.sh -prod_dir=/u01/oracle/middleware/wlserver_10.3 -status=applied -verbose -view

[oracle@SAID-DR bsu]$ ./bsu.sh -prod_dir=/u01/oracle/middleware/wlserver_10.3 -status=applied -verbose -view
ProductName:       WebLogic Server
ProductVersion:    10.3 MP6
Components:        WebLogic Server/Core Application Server,WebLogic Server/Admi
                   nistration Console,WebLogic Server/Configuration Wizard and
                   Upgrade Framework,WebLogic Server/Web 2.0 HTTP Pub-Sub Serve
                   r,WebLogic Server/WebLogic SCA,WebLogic Server/WebLogic JDBC
                    Drivers,WebLogic Server/Third Party JDBC Drivers,WebLogic S
                   erver/WebLogic Server Clients,WebLogic Server/WebLogic Web S
                   erver Plugins,WebLogic Server/UDDI and Xquery Support,WebLog
                   ic Server/Evaluation Database,WebLogic Server/Workshop Code
                   Completion Support
BEAHome:           /u01/oracle/middleware
ProductHome:       /u01/oracle/middleware/wlserver_10.3
PatchSystemDir:    /u01/oracle/middleware/utils/bsu
PatchDir:          /u01/oracle/middleware/patch_wls1036
Profile:           Default
DownloadDir:       /u01/oracle/middleware/utils/bsu/cache_dir
JavaVersion:       1.6.0_29
JavaVendor:        Sun


Patch ID:          7HKN
PatchContainer:    7HKN.jar
Checksum:          -1767993263
Severity:          optional
Category:          General
CR/BUG:            28710912
Restart:           true
Description:       WLS PATCH SET UPDATE 10.3.6.0.190115
WLS PATCH SET UPDATE 10
                   .3.6.0.190115


[oracle@SAID-DR bsu]$




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