Wednesday, March 30, 2016

WebLogic Server Performance


https://blogs.oracle.com/imc/entry/weblogic_server_performance_and_tuning


For all server JVM you could edit the file  default value is 
-Xms256m -Xmx512m" and you can change it based on your requirements


 /user_projects/domains/TEST_DOM/bin/setDomainEnv.sh


if [ "${JAVA_VENDOR}" != "HP" ] ; then
        if [ "${VM_TYPE}" = "HotSpot" ] ; then
        ##      WLS_MEM_ARGS_64BIT="-Xms256m -Xmx512m"
                WLS_MEM_ARGS_64BIT="-Xms1024m -Xmx2048m"
                export WLS_MEM_ARGS_64BIT
##              WLS_MEM_ARGS_32BIT="-Xms256m -Xmx512m"
                WLS_MEM_ARGS_32BIT="-Xms1024m -Xmx2048m"
                export WLS_MEM_ARGS_32BIT
        fi
fi

Monday, March 28, 2016

HZ_DQM_SYNC.REALTIME_SYNC(oracle.apps.ar.hz.DQM.realtimesync

Event Error Name: 100
Event Error Message: ORA-01403: no data found
Event Error Stack:
HZ_DQM_SYNC.REALTIME_SYNC(oracle.apps.ar.hz.DQM.realtimesync


Solution : Data Quality Management: DQM Synchronization 11i (Doc ID 1926067.1)

Tuesday, March 22, 2016

How to Setup Proxy for your old version of oracle Application 11.5.10.2

Download Oracle Fusion Middleware  11g web Tier.


#!/bin/ksh
# .profile for 11gAS ebs
#
export TWO_TASK=PRO0TS
export MWLS_HOME=/apps2/ebs/product/proxy_tst2
export ORACLE_HOME=$MWLS_HOME/webtier_pro0ts
export ORACLE_INSTANCE=/apps2/ebs/product/proxy_tst2/pro0ts_inst
export LD_LIBRARY_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib32:/usr/lib:$LIBPATH
export PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/bin:$ORACLE_INSTANCE/bin:$ORACLE_HOME/opmn/bin::$ORACLE_HOME/OPatch:$ORACLE_INSTANCE/config/usr/bin:$PATH
OH=$ORACLE_HOME; export OH
OI=$ORACLE_INSTANCE; export OI

alias cdi='cd $OI'
alias cdo='cd $OH'

echo
env | sort | egrep 'ORA|TNS


  • Setup up your environments
  • you can edit 

/apps2/scratch/PROPERTY/FMW/Disk1/stage/Response/staticports.ini


Copy the modified ini files in temp directory for later conig.sh purpose.
./runInstaller



After your installation is completed.

edit your ssl conf file under

/apps2/ebs/product/inst/config/OHS/ohs1/ssl.conf based on your requirements 

ProxyRequests off
 NameVirtualHost *:4459
ServerName ebs.xxx.xxx
ServerAlias ebs
ProxyPass / http://ebs.xxx.xxx:4009/
ProxyPassReverse / http://ebs.xxx.xxx:4009/
   SSLEngine on
   SSLProxyEngine on
   SSLCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA
   SSLProxyCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA
   SSLProtocol -all +TLSv1

   SSLWallet "/apps2/oracle/local/certificates/wrkdir"
   SSLProxyWallet "/apps2/oracle/local/certificates/wrkdir"
   ErrorLog "${ORACLE_INSTANCE}/diagnostics/logs/${COMPONENT_TYPE}/${COMPONENT_NAME}/4459_error_log 43200"
   TransferLog "|${ORACLE_HOME}/ohs/bin/odl_rotatelogs ${ORACLE_INSTANCE}/diagnostics/logs/${COMPONENT_TYPE}/${COMPONENT_NAME}/4459_access_log 43200"
SSLVerifyClient None
   SSLProtocol nzos_Version_1_0 nzos_Version_3_0
   SSLCRLCheck Off


on the oracle application side apache side. you need to comment out the port number in httpd.conf 

 Port: The port to which the standalone server listens. For
# ports < 1023, you will need httpd to be run as root initially.
#
Port 4010
Listen 4010 


#
# Listen 4459
#


How to over ride your default port number in 12.2 for opmn, ohs

Before start Installing R12.2, take backup staticports.ini and  edit your 
 Stage122/TechInstallMedia/ohs11116/Disk1/stage/Response/staticports.ini file based on your requirements.


Oracle Solaris on SPARC (64-bit) requirement for R12.2

Hello:

If you are planning to move R12,2 on Solaris please check the oracle doc.

Oracle E-Business Suite Installation and Upgrade Notes Release 12 (12.2) for Oracle Solaris on SPARC (64-bit) (Doc ID 1330702.1)

http://docs.oracle.com/cd/E26401_01/doc.122/e22953.pdf

How to find out your JKS keystore and store password in (EBS)

Source env
sqlplus apps/#########

set serveroutput on
declare
spass varchar2(30);
kpass varchar2(30);
begin
ad_jar.get_jripasswords(spass, kpass);
dbms_output.put_line(spass);
dbms_output.put_line(kpass);
end;

Thursday, March 17, 2016

LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo

I renamed my oracle home /apps/ebs/product/oa11idev/12.1.0.2
I ran the opatch lsinventory

List of homes on this system:

 Home name= OraDB12Home6, Location= "/apps/ebs/product/12.1.0.2"

Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
Possible causes are:
   Oracle Home dir. path does not exist in Central Inventory
   Oracle Home is a symbolic link
   Oracle Home inventory is corrupted
LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo.

Action:
under my central inventory ContentsXML/inventory.xml, I added my new inventory home.


save the file.
$ opatch lsinventory 
...
......

oracle Database 12c                                                  12.1.0.2.0
There are 1 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.


--------------------------------------------------------------------------------

opatch napply -skip_subset -skip_duplicate
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /apps/ebs/product/oa11its/db11g/11.2.0.4
Central Inventory : /apps/ebsoraInventory
   from           : /apps/ebs/product/oa11its/db11g/11.2.0.4/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /apps/ebs/product/oa11its/db11g/11.2.0.4/cfgtoollogs/opatch/opatch2016-04-25_15-11-54PM_1.log

List of Homes on this system:

  Home name= PRO0TS, Location= "/apps/ebsproduct/oa11its/db11g/11.2.0.3"
 OPatchSession cannot load inventory for the given Oracle Home /apps/ebs/product/oa11its/db11g/11.2.0.4. Possible causes are:
   No read or write permission to ORACLE_HOME/.patch_storage
   Central Inventory is locked by another OUI instance
   No read permission to Central Inventory
   The lock file exists in ORACLE_HOME/.patch_storage
   The Oracle Home does not exist in Central Inventory

UtilSession failed: OracleHomeInventory gets null oracleHomeInfo
Log file location: /apps/ebs/product/oa11its/db11g/11.2.0.4/cfgtoollogs/opatch/opatch2016-04-25_15-11-54PM_1.log 

OPatch failed with error code 73

 /apps/ebs/product/oa11its/db11g/11.2.0.4 this home was corrupted.

solution:
go to your inventory location .eg /apps/OraInventory/ContentsXML

take copy of inventory.xml file.

remove the previous home from xml file and save.

go to   /apps/ebs/product/oa11its/db11g/11.2.0.4/oui/bin   

./runInstaller -ignoreSysPrereqs -attachHome ORACLE_HOME="/apps/ebs/product/oa11its/db11g/11.2.0.4" ORACLE_HOME_NAME="SID"


test opatch lsinventory

Friday, March 11, 2016

How to clone the Oracle Application EBS

Oracle Application Clone(OFF)



  • .mv  $COMMON_TOP/clone clone1 
  •  run adcfgpreclone.pl on the production server.
  • create tar ball ( tar -cvf )for com, ora . appl, inventory directory.
  • copy over target system.
  • untar tar ball (tar -xvf )



/apps2/ebs/product/dev/comn/clone/bin/adcfgclone.pl

adcfgclone.pl appsTier
Enter the APPS password [APPS]:
######

First Creating a new context file for the cloned system.

The program is going to ask you for information about the new system:


Provide the values required for creation of the new APPL_TOP Context file.


Do you want to use a virtual hostname for the target node (y/n) [n] ?:


Target system database SID [xdb02}:xdb01 


Target system database server node [xdb02]:xdb01

Target system database domain name [xxxxx.xxx]:

Does the target system have more than one application tier server node (y/n) [y] ?:n


Is the target system APPL_TOP divided into multiple mount points (y/n) [n] ?:n


Target system APPL_TOP mount point [/apps2/ebs/product/oa11i/appl]:/apps2/ebs/product/dev/appl


Target system COMMON_TOP directory [/apps2/ebs/product/oa11i/comn]:/apps2/ebs/product/dev/comn


Target system 8.0.6 ORACLE_HOME directory [/apps2/ebs/product/oa11i/ora/8.0.6]:/apps2/ebs/product/dev/ora/8.0.6


Target system iAS ORACLE_HOME directory [/apps2/ebs/product/oa11i/ora/iAS]:/apps2/ebs/prosduct/dev/ora/iAS


Do you want to preserve the Display set to xdb02 :0.0 (y/n) [y] ?:n


Target system Display [xdb01:0.0]:  


Location of the JDK on the target system [/usr/java]:/apps2/ebs/product/jdk1685


Target system JRE_TOP [/usr/java]:/apps2/ebs/product/jdk1685


Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:n


Clone Context uses the same port pool mechanism as the Rapid Install

Once you choose a port pool, Clone Context will validate the port availability.

Enter the port pool number [0-99]:

24

Checking the port pool 24

done: Port Pool 24 is free

Complete port information available at /apps2/ebs/productt/dev/appl/admin/out/SID_hostname/portpool.lst


Verifying Database Connection...

RC-40201: Unable to connect to Database xdb01

Enter the Database listener port [2034]:enter you db port number(


Database Connection on Port 2035 Successful


Target system proxy hostname [xdb01.xxxx.xxxx]:xdbs01.xxxx.xxx


Target system proxy port [4410]:4411


UTL_FILE_DIR on database tier consists of the following directories.


1. /usr/tmp

Choose a value which will be set as APPLPTMP value on the target node [1]:

Creating the new APPL_TOP Context file from :

  /apps2/ebs/product/dev/appl/ad/11.5.0/admin/template/adxmlctx.tmp

The new APPL_TOP context file has been created :

  /apps2/ebs/product/dev/appl/admin/xdb01_web2.xml

Log file located at /tmp/CloneContext_0310034417.log


Running Rapid Clone with command:

        perl ./adclone.pl java=./../jre/jre mode=apply stage=/apps2/ebs/product/dev/comn/clone/bin/./.. component=appsTier method=CUSTOM appctxtg=/apps2/property/product/dev/appl/admin/SID_hostname

Beginning application tier Apply - Thu Mar 10 16:09:34 2016

Log file located at /apps2/ebs/product/dev/appl/admin/SID_hostname/log/ApplyAppsTier_03101609.log
                                       

Completed Apply...

Thu Mar 10 16:13:55 2016

Beginning APPSIAS_xdb01 registration to central inventory...


ORACLE_HOME NAME   : APPSIAS_SID

ORACLE_HOME PATH   : /apps2/ebs/product/dev/ora/iAS
Using Inventory location in /var/opt/oracle/oraInst.loc
Log file located at /apps2/ebs/product/dev/oraInventory/logs/OracleHomeCloner_03100413.log
ORACLE_HOME /apps2/ebs/product/dev/ora/iAS was registered successfully.
---------
admkappsutil.pl
Starting the generation of appsutil.zip
Log file located at /apps2/ebs/product/dev/appl/admin/log/MakeAppsUtil_03111320.log
output located at /apps2/ebs/product/dev/appl/admin/out/appsutil.zip
MakeAppsUtil completed successfully.


move appsutil.zip to db oracle home and unzip appsuttil.zip file.
appsutil directory will be created.

take backup on  TSN_admin.


for me 12.1.0.2 is new home

/apps/ebs/product/oa11idev/12.1.0.2/appsutil/bin
$ execute perl adbldxml.pl tier=db appsuser=apps appspass=xxxx



Starting context file generation for db tier..
Using JVM from /apps/ebs/product/oa11idev/12.1.0.2/jdk/bin/java to execute java programs..

The log file for this adbldxml session is located at:
/apps/ebs/product/oa11idev/12.1.0.2/appsutil/log/adbldxml_03111417.log

Could not Connect to the Database with the above parameters, Please answer the Questions below


Enter Hostname of Database server: hostname


Enter Port of Database server: 0000

Enter SID of Database server: SID

The context fisle has been created at:
/apps/eb/product/oa11idev/12.1.0.2/appsutil/SID_hostname.xml
$ sqlplus apps/xxxxx
SQL> exec FND_CONC_CLONE.SETUP_CLEAN;

PL/SQL procedure successfully completed.

SQL> 

run adconfig.sh on db tier and apps Tier.

reset password using fndcpass







Thursday, March 10, 2016

DR required knowledge.

#!/bin/ksh -x

. $HOME/.profile

# Remember trailing / for directories!

/usr/bin/dsmc incremental -subdir=yes -compression=yes /apps2/product/12.1.0.2/  /home/apps/

Assume you schedule your tsm back 

05 06 * * * /apps2/oracle/local/bin/tsm_incremental.sh > /home/apps/log/tsm_incremental_`date +\%Y\%m\%d\%H\%M\%S`.log 2>&1

dmsc -servername=apps(username)

tsm>  query backup -ina -subdir=yes /apps2/ebs/product/*.tar

TSM> restore -inactive /apps/product/ebs/* -subdir=yes


example db side.(Latest database backup set)

  1. du -sh check the space on the target server.
  2. make sure your ip address, hostname and /ect/hosts setup
  3. restore oracle db binary
  4. restore TNS_ADMIN
  5. restore/orafra/SID/(required directory)
  6. restore /apps/oracle/local/certificates


$ram target=/
startup nomount
restore controlfile from autobackup;
shutdown immediate;
startup mount;
restore database;
#recover database
sql "alter database open resetlogs";

Exception occurred: java.sql.SQLException: ORA-28040: No matching authentication protocol

while I was running adcfgclone.pl on appsTier and could not connect my database which was upgraded from 11.2.0.4 to 12.1.0.2 

After I  added SQLNET.ALLOWED_LOGON_VERSION=8 in sqlnet.ora on the db side. 

I am able clone my application




Friday, March 4, 2016

How to recreate TNS_ADMIN file in Oracle ebs webTier

There is a perl script under $AD_TOP/bin/adgentns.pl
$perl adgentns.pl

Usage:
        adgentns.pl [help] contextfile= appspass= [ logdir= -onlygeneratetns -removeserver -removesystem]

Valid arguments for adgentns.pl:
        help               : get usage information
        contextfile        : provide Applications context file name
        appspass           : APPS user password
        logdir             : location to write log file
        onlygeneratetns    : only generate tnsnames.ora; do not update the datamodel
        removeserver       : removes the current server (node) from the Net Service data model
        removesystem       : clean the Net Service data model

$echo $CONTEXT_FILE
$you will see your context file full path
$perl adgentns.pl contextfile=apps/ebs/product/appl/admin/SID_HOST.xml appspass=xxxx

##########################################################################
                   Generate Tns Names 
##########################################################################
Logfile:  /apps2/ebs/product/tst/appl/admin/SID_HOST/log/03041054/NetServiceHandler.log
        Classpath                   : /apps2/ebs/product/jdk1685/jre/lib/rt.jar:/apps2/ebs/product/jdk1685/lib/dt.jar:/apps2/ebs/product/jdk1685/lib/tools.jar:/apps2/ebs/product/ta

Updating s_tnsmode to 'generateTNS'
UpdateContext exited with status: 0

adgentns.pl exiting with status 0
ERRORCODE = 0 ERRORCODE_END


Thursday, March 3, 2016

How to install SSL certificate for your application on the server.



source your environment using application or weblogic environment 

First you need to create request certificate for your application or server using Oracle Wallet manager.
































yes -> enter all the required information based on your requirement to create certificate request
common name: applcation server name
 
CN: server name
OU : your organization name
O : client name
L location
S state
C = US


















OK. It will create certificate what location is you want to save and make auto login is enable.




















now you can see csr file, cwallet.sso and ewallet.p12 file in your directory

-rw-------   1 xxxxx dba         9261 Mar  3 12:43 cwallet.sso
-rw-------   1 xxxxxx dba         9184 Jan 25 19:07 ewallet.p12

-rwxr-xr--   1 xxxxxxx dba         1078 Jan 23 12:27 iwebd3.csr


Your client should have account symantec (managed PKI for ssl Subscriber Services)

Enroll Standard SSL Certificate, enter all your information and upload your csr file.

your SSL admin approve your request, you will notify from symantec and you can download your ssl certificate, intermediate certificate and save those in the wallet directory.

you can validate the certificate with various tool.

eg : https://www.sslshopper.com/ssl-checker.html


Now you can open the wallet manager and import your Trusted certificate.
























RCU requirement for basic connection OAM/OID

Source your environment 

orapwd file=orapwSID password=xxxxentries=5
sqlplus sys@SID as sysdba
.remote_login_passwordfile='EXCLUSIVE'
*.local_listener='xxxx.xxx.xxx:000' in the pfile

Where to find Keystore location in R12.2

Java code sign certificate located in 

/apps2/product/devr12/fs_ne/EBSapps/appl/ad/admin/adkeystore.dat


How to find  the password for the keystore.


set serveroutput on
declare
spass varchar2(30);
kpass varchar2(30);
begin
ad_jar.get_jripasswords(spass, kpass);
dbms_output.put_line(spass);
dbms_output.put_line(kpass);

end;

R12.1.2 Directory Structure

DB_TIER:
10.2.0.2 RDBMS ORACLE_HOME

APPL-TIER

10.1.2  ORACLE_HOME / FORMS ORACLE_HOME (8.0.6 ORACLE HOME equivalence)
10.1.3 Java ORACLE_HOME/OC4J ORACLE_HOME (iAS ORACLE_HOME equivalence)




R12,1 Architecture

Where to get basic Knowledge about ADOP in R12.2

ADOP Basic Usage Training Videos [Video] (Doc ID 2103131.1)


Are you new to E-Business Suite Release 12.2 ADOP? Would you like to learn the basics? This note contains videos on the full ADOP patching cycle and the ADOP fs_clone phase.
Reference Documents:
Oracle E-Business Suite Maintenance Guide Release 12.2 Part No. E22954

Oracle E-Business Suite Release 12.2: Online Patching FAQ (Doc ID 1583902.1)



To implement Online Patching Run reports/scripts mentioned in Using the Online Patching Readiness Report in Oracle E-Business Suite Release 12.2 [1531121.1]



  • In Oracle EBS 12.2. It is the ability to patch a running system without having to take the system down.
  • It will enable R12.2 PATCH Environment. Patches must be applied before enabling ADOP.
  • All AD_ZD packages should be valid before enabling them.
  • Once you enable ADOP i.e. Online Patching you cannot apply any patches through ADPATCH.
  • If you still want to apply any patch via adpatch, source ENABLE_ADPATCH=yes. (if oracle recommends)
  • All patches applied using adop utility will be applied to PATCH environment i.e. fs2.
  • When you want to make the patches live you can execute adop using cutover phase. It will switch filesystems.
  • To synchronize both filesystems i.e. fs1 and fs2 you can execute adop using fs_clone phase.
Phases:


  1. adop phase=prepare ->; copies the application code
  2. adop phase=apply ->; apply patches to PATCH Environment
  3. adop phase=finalize ->; makes ready the system for cutover
  4. adop phase=cutover ->; bounce the system and does filesystem switchover. fs2 becomes RUN environment. 
  5. adop phase=cleanup -> remove obsolete objects.
  6. adop phase=fs_clone ->; synchronize filesystems.
Example How apply patches using adop.

1. adop phase=fsclone
    it will synchronize run file system to patch file system for custom_top
2. adop phase= prepare
     synchronize fs1 to fs2
3. adop phase=apply patche=patch_number
    Patch will start if the patch fail you can find out what worker file using adctl then you can restart the patch again

4. adop phase=apply patches=patch_number restart=yes
     once patch completed.
5 adop phase=cutover
     Mid Tier bounce where the run and patch system will swapped and new run file system is prepared form the existing patch file system
 6 . adop phase= cleanup


The full patch cycle been complete.




How to check EBS Technology Code level Checker (ETCC) R12.2.





Patch 17537119: EBS Technology Codelevel Checker


The above patch will tell us what code lever we are in 

Wednesday, March 2, 2016

How to override default port number in weblogic


When we install oracle weblogic it takes port number from the staticports.ini file which is default. you can override the port number take backup the file and edit what port number you want. so that you won't get port conflict if you are running more than one weblogic server.

/weblogic/FMW/Disk1/stage/Response/staticports.ini