Wednesday 26 October 2016

Difference between OC4J and Weblogic application server!!!

OC4J application server
++++++++++++++++++++
OC4J uses AJP protocol between OHS and OC4J.
OHS in front of OC4J is a must (as OC4J itself does not have a HTTP listener, so it cannot answer HTTP requests).
OC4J is completely managed by OPMN.
A couple of interesting features by OPMN, such as increasing no# of JVMs (numprocs in opmn.xml) for the OC4J are available.
OC4J runs on wide range of ports
ajp range=12501-12600
rmi range=12401-12500
jms range=12601-12700
We do apply patches over OC4J using opatch utility.


Weblogic server
+++++++++++++++++++
Weblogic uses t3 protocol between OHS and Weblogic server .
WebLogic has got a HTTP listener, users can directly access WebLogic port from the browser.
Of course, it is recommended to front end WebLogic by a web server but it is not mandatory. Web Server is mandatory for OC4J.
Weblogic is not managed by OPMN.
WebLogic is not managed by OPMN. So, WebLogic always runs out of only one JVM.
WebLogic runs everything on a single port by default, i.e. 7001
We do apply patches over weblogic server using BSU(BEA SMART UPDATE) utility in 11gr1 and 12c we are applying the patches using opatch utility.

All about database opatch utility !!!

What is opatch?
++++++++++++++++++
opatch is a java utility which is used to apply database patches.
opatch utility does not make any changes in database (*.dbf) but do make changes in ORACLE HOME binaires.
opatch utility is located in $ORACLE_HOME/bin


what is the pre requisite to apply database patches?
------------------------------------------------------
Database and database listener must be down.


To check either patch can be apply online or not
--------------------------------------------
opatch query -is_online_patch 17230530



How to export opatch utility
+++++++++++++++++++++

export PATH=$PATH:$ORACLE_HOME/Opatch


How to check opatch version
+++++++++++++++++++++++++++++
opatch version


How to check if the patch having any conflicts
+++++++++++++++++++++++++++++++++++++++++++
/d01/erpapp/patches/CPU_PATCHES/16902043
 $ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./



Deinstall the patch by running the following command:
++++++++++++++++++++++++++++++++++++++++++++++++++++
$ opatch rollback -id 14153246

opatch rollback -id 17230530 -no_sysmod

Check whether the patch has been rolled back
++++++++++++++++++++++++++++++++++++++++++++
$ opatch lsinventory |grep 14153246


How to apply database patch
++++++++++++++++++++++++++++++
opatch apply


How to apply multiple database patches
++++++++++++++++++++++++++++++++++++++
opatch napply


How to go for help on patch
+++++++++++++++++++++++++++++
opatch help



D. Cleanup Patch Storage to Reclaim Space
+++++++++++++++++++++++++++++++++++++++++++++++
OPatch can now determine and cleanup files in the patch storage that are no longer required. To do so run the following:
SYNTAX / EXAMPLE:

[oracle@lnx01] $ORACLE_HOME/OPatch/opatch util cleanup


B. List Detailed Information About a Patch Before Applying It
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The OPatch utility can be used to verify details of a patch before proceeding to apply to the Oracle Home directory.
Such information that can verified but not limited to are:
• Check if patch is a Rolling Patch
• Check if patch is a Patchset Update (PSU)
• Check if patch can be run with “opatch auto” option
• Check OS platform the patch can be applied on
• Actual actions and/or steps that patch contains without applying the patch. This include detailed information of files it touches, copies and relinks.



SYNTAX:

$ORACLE_HOME/OPatch/opatch query -all |more

[oracle@lnx01] cd /home/oracle/download/patches/12311357
[oracle@lnx01] $ORACLE_HOME/OPatch/opatch query -all |more




How to determine if a patch is a "rolling patch" or not?
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Based on the oracle database version we can determine whether a patch is a rolling patch or not.

- For oracle version 9i or 10gR1 issue,
$ opatch query -is_rolling



Tuesday 25 October 2016

How to unlock admin user in Weblogic:

How to unlock admin user in Weblogic:


Below procedure is valid for Non EBS applications.

Admin user will be locked if you access multiple times with wrong password, you will get below error in this scenario:

[SimpleSchedulerThread] [ERROR] com.deacos.cxx.server.masterejb.MasterEjbBean: com.deacos.cxx.server.datalayer.repository.security.AccessException: SIP-09070: No more logins allowed

User “admin” is locked (exceeded max logins allowed)”

[SimpleSchedulerThread] [ERROR] com.deacos.cxx.server.masterejb.MasterEjbBean: com.deacos.cxx.server.datalayer.repository.security.AccessException: SIP-09070: No more logins allowed

Solution:

Unlock the admin user by following below example:

In the following example, an administrator named “admin” with a password of welcome123 requests the unlocking of the WebLogic Server listening on port 7001 on machine localhost:

java weblogic.Admin -url localhost:7001 -username admin -password newpassword UNLOCK

How to unlock weblogic user ?

The account will get unlock automatically after the default Lockout Duration (30 mins) is reached/exceeded and you can change the value according to your needs for the account to get unlock after its locked

What will happen when we put the database in begin backup mode?

What will happen when we put the database in begin backup mode?

alter database begin backup;

When we put the database in begin backup mode header of all datafiles get freez or SCN will not change;during this process it generates excessive redo logs.


Why it will generate excessive redo logs?

suppose you are updating some data in a table and the size of change vector data is 1 KB but the bg process write 8KB of block instead of 1 KB which result in generate excessive redo logs.

Why it is writing 8KB of data?
To avoid block corruption;it will write 8K of data but not I KB.