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-...