Posts

How To Extend Oracle Database User Expiry Without Changing Existing Password

Image
Step 1) Check the user status select USERNAME,ACCOUNT_STATUS,LOCK_DATE,EXPIRY_DATE,PROFILE from dba_users where USERNAME='SYSMAN'; Step 2) Fetch the encrypted password for the corresponding user  select name, password from user$ where name='SYSMAN'; Step 3) Alter the user sysman and set the above encrypted password alter user SYSMAN identified by values '447B729161192C24' account unlock; Step 4) Check the user status and try to login using clear text password that your using previously. select USERNAME,ACCOUNT_STATUS,LOCK_DATE,EXPIRY_DATE,PROFILE from dba_users where USERNAME='SYSMAN';

How to Change Hostname in CentOS/RHEL/OEL

Step1) Open the file /etc/sysconfig/network in vi editor and modify HOSTNAME to FQDN (test1.abs.com) [root@jagan1 oracle]# cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=test1.abs.com [root@jagan1 oracle]# Step2) Change the hostname in /etc/hosts file     Example: 192.168.72.128 test1.abs.com test1 [root@jagan1 oracle]# cat /etc/hosts 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.72.128 test1.abs.com test1 [root@jagan1 oracle]# step3) Run Hostname [root@jagan1 oracle]# hostname test1.abs.com step4) Restart networking     [root@jagan1 oracle]# /etc/init.d/network restart Shutting down loopback interface:                          [  OK  ] Bringing up loopback interface:                    ...

ORA-01012: not logged on startup failed

DB startup failed with error: ORA-01012: not logged on Background: ============== Database is taking more time to stop say almost one hour and its hung so killed background process using below command $ kill -9 <PID> OR $kill -9 -1 Problem: ========== Now while starting the DB instance. $ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 25 07:23:45 2018 Copyright (c) 1982, 2011, Oracle.  All rights reserved. Connected. SQL> startup ORA-01012: not logged on SQL> conn / as sysdba Connected to an idle instance. SQL> startup ORA-01012: not logged on So whenever we forcefully shut down the DB this issue may occurs “SYSRESV”  shows a shared memory segment for a non-existing instance Solution: ======= At OS level remove the orphaned shared memory segment using this utility $ sysresv IPC Resources for ORACLE_SID “SID” : Shared Memory: ID              KEY ...

How to Update Datasource Connect String ?

Scenario 1) Updating all datasource with same connect string  =============================================== step a) create updateds.py file at $DOMAIN_HOME dsURL="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))" print("*** Wait for a moment trying to connect *****") connect('weblogic','xxxxxxx','t3://localhost:7001') print("*** Connected *****") cd('Servers/AdminServer') edit() startEdit() cd('JDBCSystemResources') for tmpDS in allDS:   dataSourceName=tmpDS.getName();   print  'changing datasource connect string for', dataSourceName   cd('/JDBCSystemResources/' + dataSourceName + '/JDBCResource/' + dataSourceName + '/JDBCDriverParams/' + dataSourceName)   cmo.setUrl(dsURL)   print("*** connect string changed for your: ", dataSourceName)   print ('')   print (...

How to resolve issues related to Errors: 1) connection limit (1) exceeded 2) Too Many Open files error & 3) native OutOfMemory ?

Image
Problem Definition:- ================ Usually these type of errors will be seen in WebLogic, WebSphere, Tomcat logs due to Unix resource exhaustion ie. when soft limit of the open file descriptor crossed the specified limit value. Before increasing the open file descriptor limit just check is there any process holding lock for deleted log files by using lsof command.  Solution-1) Increase the open file descriptor value temporarily at user session level. Example:  ulimit -n    #command for checking current value of file descriptor  ulimit -n  8192  # Command for increasing file descriptor value Solution-2) Increase the file descriptor limit using WebLogic commEnv.sh upto 12.1.3 OR commBaseEnv.sh from 12.2.1.1.0 on wards. Change from 4096 to higher value   Similar to below   Solution-3) Change the soft limit of file descriptor using /etc/security/limits.conf Current value: 409...

How to Automate WebLogic Domain Restart? When Physical or Virtual Linux Server Restart

Image
==> This Method is very Useful in below Scenarios  When Physical/Virtual  Linux Servers Crashed and You Brought Up Linux Server at the Same Time WebLogic Servers Also Started Without Manual Intervention. During Maintenance of Linux Servers, If Your Restarting Linux Server in that case also WebLogic Application Servers will be Started Automatically by Using this Method. If WebLogic Server Crashed Due to OOM(OutOfMemory) OR Due to any JVM BUG in that case also JVM will be restarted automatically.  Summary: ======== 1) Create nodemanager Script 2) Save the Script Inside Directory /etc/init.d 3) Issue the Command chkconfig for Script nodemanager 4) Change Properties Values in nodemanager.properties  File 5) Start the NodeManager, AdminServer & Managed Server Through NodeManager 6) For Testing Purpose Restart the Linux Server & Check WebLogic Application Server Status. STEPS:- ======= Step-1) Create nodemanager Script  ...

How To Increase Tomcat Performance Using Tomcat Native Library ?

Image
The Apache Tomcat Native Library is an optional component for use with Apache Tomcat that allows Tomcat to use certain native resources for performance, compatibility, etc. Specifically, the Apache Tomcat Native Library gives Tomcat access to the Apache Portable Runtime (APR) library's network connection (socket) implementation and random-number generator. Summary ============= 1) Download Softwares APR library, OpenSSL libraries & Tomcat Native Library 2) Install APR library 3) Install OpenSSL libraries  4) Install Tomcat Native Library 5) Add the Libraries Path to tomcat CLASSPATH 6) Restart Tomcat Server & Validate Libraries Loaded or Not at Run time. Steps: ===== 1) Download Softwares APR library, OpenSSL libraries & Tomcat Native Library Use Below links for downloading software's APR ==>  http://www-eu.apache.org/dist//apr/apr-1.5.2.tar.gz OpenSSL ==>   https://www.openssl.org/source/openssl-...

How to Start, Stop & Dissable Firewall in CentOS 7 using systemctl?

Image
1) Below command is used for checking status of firewall  systemctl status firewalld 2) Below command is used for starting firewall  systemctl start firewalld 3) Below commands are used for Stopping &  Disabling firewall systemctl stop firewalld systemctl disable firewalld

Tar Command Examples

Image
1) Creating tar files     a) How to Create .tar file             Below command creates uncompressed archive file.               tar -cvf log.tar log Options Meaning: c – Creates a new .tar archive file. v – Verbosely show the .tar file progress. f – File name type of the archive file.     b) How to Create .tar.gz OR .tgz files         Below command creates compressed  gzip archive file.Use z option           tar zcvf logs.tar.gz logs/         OR     tar zcvf logs.tgz logs/           c) How to create   tar.bz2 OR  tbz OR  tb2         The bz2 feature compress and create archive file less than the size of the gzip           To create highly compressed tar file we use option as j. ...

Log Files Rotated By WebLogic Server 12.1.2 OR 12.1.3 Are Not Closed

Issue Definition: ============= lsof command for Middleware directory shows that log files rotated by Node Manager are not getting closed by file handler due to this space is not releasing. [root@test1 ~]# df -h /dev/mapper/VolGroup00-LogVol06_Middleware Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol06_Middleware 50G 39G 8.1G 83% /oracle/Middleware [root@test1 ~]# lsof -a +L1 /oracle/Middleware/|grep -i delete java 5634 oracle 305w REG 253,6 5118896 921736 /oracle/Middleware/user_projects/domains/base_domain/servers/ms1/logs/ms1.out63956 (deleted) java 5634 oracle 331w REG 253,6 5118902 921330 /oracle/Middleware/user_projects/domains/base_domain/servers/ms1/logs/ms1.out63708 (deleted) java 5634 oracle 332w REG 253,6 5118898 921336 /oracle/Middleware/user_projects/domains/base_domain/servers/ms1/logs/ms1.out63709 (deleted) java 5634 oracle 335w REG 253,6 5118902 921350 /oracle/Middleware/user_projects/domains/base_domain/servers/ms1/logs/ms1.out...

Active Directory Authenticator Configuration with Weblogic or AD Integration with Weblogic

Image
Terminologies CN : Common name =Users, Groups, Container, Computer OU : Organisational Unit=Organisation Name DC :Domain Component=Domain Domain Controller:  A domain controller is a server that is running a version of the Windows Server operating system and has Active Directory Domain Services installed. Step 1) Create Users & Groups in Default AD container Users.              Below snapshot shows i have created               Users: jagan                         john                         scott               Group: testgroup Users jagan, john & scott are member of testgroup Step 2) Create Active Directory Authenticator Login to Wls console ==> Click on Security Realms ==> Click on myrealms ==> Click on Providers =...

How To Improve WebLogic Server Start Up & Login Performance?

Image
==> You may be noticed that the WebLogic Server start up performance is considerably very poor due to linux server Entropy issue ==> There are so many situation like WebLogic Console hanging after entering credentials an clicking on Login button & Slow Server Start up etc. ==> Entropy is the measure of the random numbers available from /dev/urandom, and if you run out,you can’t make SSL connections. Step 1) Check the linux server Entropy using below command                         cat /proc/sys/kernel/random/entropy_avail              If the o/p is between 100 to 200 in that case problem exist              Example: Step 2) set the JAVA_OPTION " -Djava.security.egd=file:/dev/./urandom " in setDomainEnv.sh file Step 3) Restart the AdminServer  cd /oracle/Middleware/user_projects/domains/base_domain/bin ./stopWe...