Friday, 22 February 2019

Linux: Useful Commands

Check Serial number for Linux machines

dmidecode -s system-serial-number

Find the number of Physical core in Linux

cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

Friday, 15 February 2019

VNC server Commands


Enable GUI Mode in VNC

Add "gnome-session &" to the file /root/.vnc/xstartup as below and start new session of VNC

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
gnome-session &


Kill VNC session:

vncserver -kill <:{vncserver session id}>

eg: vncserver -kill :1


Start VNCserver:

Command: vncserver to start VNC server


Change Password of VNC server serssion

Command: vncpasswd


Monday, 31 December 2018

Find Weblogic PSU

Solution:

[user@hostname bin]$ cd /u02/app/Oracle/Middleware/wlserver_10.3/server/bin
[user@hostname bin]$ . setWLSEnv.sh

[user@hostname bin]$ java weblogic.version

WebLogic Server 10.3.6.0.181016  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
[user@hostname bin]$

Find Weblogic Version

Solution-1:

[user@hostname ~]$ cd /u02/app/Oracle/Middleware/wlserver_10.3/server/lib/
[user@hostname lib]$ java -cp weblogic.jar 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
[user@hostname lib]$

Thursday, 27 December 2018

RHEL : Enable/Disable IPV6

Disable IPv6:
As root user run
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1

Enable IPv6:
As root user run
sysctl -w net.ipv6.conf.all.disable_ipv6=0
sysctl -w net.ipv6.conf.default.disable_ipv6=0

Sunday, 2 December 2018

CRS-1714: Unable to discover any voting files after restarting the server

Error:

In ../../../crs/trace/alert.log

CRS-1714: Unable to discover any voting files, retrying discovery in 15 seconds;

CRS-8503 [] [] [] [] [] [] [] [] [] [] [] []

Solution:

Check for the shared disk permission is under grid user and grid primary group

Eg:

Here the permission of the shared asm disks are under root

[root@testdb01 dev]# ls -ltr test_data test_fra test_ocr
brw-rw---- 1 root disk 253, 3 Dec  2 12:36 test_data
brw-rw---- 1 root disk 253, 5 Dec  2 12:36 test_fra
brw-rw---- 1 root disk 253, 6 Dec  2 12:36 test_ocr
[root@testdb01 dev]#

Change the owner to grid with oinstall and start the serevices

[root@testdb01 dev]# chown grid:oinstall test_data test_fra test_ocr
brw-rw---- 1 grid oinstall 253, 3 Dec  2 12:36 test_data
brw-rw---- 1 grid oinstall 253, 5 Dec  2 12:36 test_fra
brw-rw---- 1 grid oinstall 253, 6 Dec  2 12:36 test_ocr
[root@testdb01 dev]#

Thursday, 15 November 2018

DB : Enable archive in RAC

Solution:

ALTER SYSTEM SET log_archive_dest_1='location=/oradata/ORCL/archive/' SCOPE=spfile;
ALTER SYSTEM SET log_archive_format='arch_%t_%s_%r.arc' SCOPE=spfile;
ALTER SYSTEM SET cluster_database=FALSE SCOPE=spfile;
srvctl stop database -d ORCL

Connect to single node as sysdba and execute the below statements

sqlplus / as sysdba
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER SYSTEM SET cluster_database=TRUE SCOPE=spfile;
SHUTDOWN IMMEDIATE;
srvctl start database -d ORCL

Oracle : Database Startup Time

 Oracle Instance Startup Time SET LINES 2000 SET PAGES 9999 COLUMN INSTANCE_NAME FOR A20 SELECT     instance_name,     to_char(startup_time,...