Saturday, May 19, 2018

Major Differences Between DBCA & EMCA

Major Differences Between DBCA & EMCA


DBCA does not provide any options to re-configure the DBcontorl.
But EMCA can perform all possible customizations for existing DBcontrol.
E.g. drop dbconsole, recreate dbconsole, upgrade, etc...

Automated Maintenance Task

Automated Maintenance Task


In 11g, There are 3 main automated maintenance tasks in every database enabled by default:

-Automatic Optimizer Statistics Collection – Gathers stale or missing statistics for all schema objects. The task name is ‘auto optimizer stats collection’.
-Automatic Segment Advisor – Identifies segments that could be reorganized to save space. The task name is ‘auto space advisor’.
-Automatic SQL Tuning Advisor – Identifies high load SQL The task name is ‘sql tuning advisor’

These tasks can run up to 20 hours on Saturdays & Sundays utilizing a good portion of your hardware.

Oracle E-Business 12.2 Installation

Oracle E-Business 12.2 Installation


Disk space

Fresh- PROD 180gb
Vision 350gb

Software Required:

Oracle Enterprise Linux 5.7 (64-bit)
Oracle E-Business suite R12.2 for LinuxX86-64-bit

Hardware Requirement:

Databases Node:
Operating System : Oracle Enterprise Linux 5.7 64bit
Memory               : 16 GB
Hostname : delta001db.oracle.com
IP Address           : 192.168.1.110

Applications Node:
Operating System : Oracle Enterprise Linux 5.2 64bit
Memory : 16 GB
Hostname : delta001app.oracle.com
IP Address : 192.168.1.111

Prerequisite Steps:

1.create OS group, user and directories:

groupadd dbaerp
useradd -g dbaerp oracle
useradd -g dbaerp applmgr

Changing password for user oracle and applmgr.
passwd oracle
passwd applmgr

2.create directories and change permissions:

mkdir -p /u01/ora_prod
mkdir -p /u01/appl_prod
chmod -R 775 /u01/*_prod
chown -R oracle:dbaerp /u01/ora_prod
chown -R applmgr:dbaerp /u01/appl_prod

3.configure kernel parameters (Edit /etc/sysctl.conf file):

#All below kernel parameters are related to oracle EBS - R12.2#################kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmall = 268435456
kernel.shmmax = 429496729
kernel.shmmni = 4096
kernel.sem = 256 32000 100 142
fs.file-max = 327679
net.ipv4.ip_local_port_range = 10000 65000
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 4194304
:wq

[root@delta001 Server]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmall = 268435456
kernel.shmmax = 429496729
kernel.shmmni = 4096
kernel.sem = 256 32000 100 142
fs.file-max = 327679
net.ipv4.ip_local_port_range = 10000 65000
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 4194304

5.Verify and change Domain Name System (DNS) Resolver Parameters

Two Domain Name System (DNS) resolver parameters (timeout and attempts) are set by default to low values when the operating system is installed. These low values may cause attempted network connections to an Oracle database to fail. If this happens, add or update the following entries to these minimum settings in the /etc/resolv.conf file on each server node:

options attempts:5
options timeout:15

6.Modifying the Number of Open File Descriptors open the /etc/security/limits.conf file and change the existing values for "hard" and "soft" parameters as follows. Restart the system after making changes.

Note: If the current value for any parameter is higher than the value listed in this document, then do not change the value of that parameter.

* hardnofile 65535
* softnofile 4096
* hardnproc 16384
* softnproc 2047

7.Make sure all OS packages exists on the system.

To Check the Package is installed
Use:  rpm –q <pkgname>

To Install the required package
Use: rpm –i<pkg file name>

To Erase the package
Use: rpm –e <pkg name>

The following packages should exists on system for a successful Installation.

openmotif21-2.1.30-11.EL5.i3861
xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386

8.checking swap memory should be 16GB or more (20GB is configured)

[root@delta001 ~]# grep SwapTotal /proc/meminfo
SwapTotal:      20482864 kB
[root@delta001 ~]#

9.Verify /etc/hosts file. It should be configured with fully qualified domain name

[root@delta001 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
192.168.1.100           detlta001.oracle.com delta001

10.create Inventory and grant 775 permission to Inventory directory

[root@delta001 ~]# cat /etc/oraInst.loc
inventory_loc=/u01/ora_prod/oraInventory/
[root@delta001 ~]# mkdir -p /u01/ora_prod/oraInventory/

11.Verify that the /etc/sysconfig/network file is formatted as follows:

[root@delta001 Server]# more /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=detlta001.oracle.com

12.Create soft link for library as below for 10.1.2 Server:

[root@delta001 Server]# ls -lrt /usr/lib/libXtst.so.6
lrwxrwxrwx 1 root root 16 Sep 29 21:48 /usr/lib/libXtst.so.6 -> libXtst.so.6.1.0
[root@delta001 Server]# unlink /usr/lib/libXtst.so.6
[root@delta001 Server]# ln -s /usr/X11R6/lib/libXtst.so.6.1 /usr/lib/libXtst.so.6
[root@delta001 Server]# ls -lrt /usr/lib/libXtst.so.6
lrwxrwxrwx 1 root root 29 Sep 29 23:34 /usr/lib/libXtst.so.6 -> /usr/X11R6/lib/libXtst.so.6.1
[root@delta001 Server]#
[root@delta001 etc]# ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
[root@delta001 etc]#

13.Threading model in Linux should be NPTL

[root@delta001 Server]# getconf GNU_LIBPTHREAD_VERSION
NPTL 2.5
[root@delta001 Server]#

14.Prepare Staging Area:

a) Download all required Parts
b) Unzip startHere CD for getting buildStage.sh
c) Execute bulildStage.sh script for creating Stage

15.Unzip startHere CD for getting buildStage.sh

- Create directory for R12 Stage
- unzip parts of StartHere CD in R12 Staging directory

[root@erpnode2 Oracle E-Business Suite 12.2.2]# ls -lrt V35215-*
-rwxrwx--- 1 root vboxsf   85594608 Sep 24 10:13 V35215-01_2of3.zip
-rwxrwx--- 1 root vboxsf  101976210 Sep 24 10:17 V35215-01_3of3.zip
-rwxrwx--- 1 root vboxsf 1409220447 Sep 24 12:55 V35215-01_1of3.zip
[root@erpnode1 Oracle E-Business Suite 12.2.2]# unzip V35215-01_1of3.zip

- After unzipping all three parts it will create directory startCD

c) Execute bulildStage.sh script for creating Stage:

- This script will be located under "startCD > rapidwiz > bin

[root@erpnode2 Disk1]# cd rapidwiz/
[root@erpnode2 rapidwiz]# ls
bin            driver  File    jlib  oui       RapidWiz.cmd  RapidWizVersion      TechInstallers  unzip
ClientWiz.cmd  etc     images  jre   rapidwiz  RapidWiz.ini  RapidWizVersion.cmd  template        Xpatches
[root@erpnode2 rapidwiz]# cd bin
[root@erpnode2 bin]# ls
adaixchk.sh   adgetreg.exe    buildStage.sh  JNLSLib3.dll  orpass.sql         riwipu.sh     riwTDBup.sql  WizOSD.dll
adchkutl.cmd  AFSCJAV8.pls    checkOS.cmd    JNLSTool.dll  perl510.dll        riwperl.pl    riwTXdis.sh   WTPrereqs.cmd
adchkutl.sh   AFSCJAVS.pls    checkOS.sh     launch.exe    perl.exe           riwTDBup.cmd  runWizard.sh  WTPrereqs.sh
addbptchk.sh  buildStage.cmd  filespace.exe  NMAKE.EXE     racvalidations.sh  riwTDBup.sh   syspass.sql
[root@erpnode2 bin]# sh buildStage.sh


                Build Stage Menu

------------------------------------------------------
1.     Create new stage area
2.     Copy new patches to current stage area.
3.     Display existing files in stage TechPatches.
4.     Exit menu
Enter your choice [4]: 1

         Rapid Install Platform Menu

------------------------------------------------------
1.    Oracle Solaris SPARC (64-bit)
2.    Linux x86-64
3.    IBM AIX on Power Systems (64-bit)
4.    HP-UX Itanium
5.    Exit Menu
Enter your choice [5]: 2

/media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../jre/Linux_x64/1.6.0/bin/java -classpath /media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../jlib/emocmutl.jar:/media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../jlib/ewt-3_4_22.jar:/media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../jlib/share-1_1_18.jar:/media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../jlib/jnls.jar:/media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../jlib/ACC.JAR:/media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../jlib/netcfg.jar:/media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../jlib/ojdbc14.jar:/media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../jlib/OraInstaller.jar:/media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../jlib/java oracle.apps.ad.rapidwiz.util.StageBuilder /media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin

Please enter the directory containing the zipped installation media:
/media/sf_Oracle_EBS_12.2.2
Unzipping V29764-01.zip
Unzipping V29856-01.zip
Unzipping V35215-01_1of3.zip
Unzipping V35215-01_2of3.zip
Unzipping V35215-01_3of3.zip
Unzipping V35230-01_1of2.zip
Unzipping V35230-01_2of2.zip
Unzipping V35231-01_1of5.zip
Unzipping V35231-01_2of5.zip
Unzipping V35231-01_3of5.zip
Unzipping V35231-01_4of5.zip
Unzipping V35231-01_5of5.zip
Unzipping V35802-01.zip
Unzipping V35803-01_1of3.zip
Unzipping V35803-01_2of3.zip
Unzipping V35803-01_3of3.zip
Unzipping V35804-01_1of2.zip
Unzipping V35804-01_2of2.zip
Unzipping V35805-01_1of2.zip
Unzipping V35805-01_2of2.zip
Unzipping V35806-01_1of3.zip
Unzipping V35806-01_2of3.zip
Unzipping V35806-01_3of3.zip
Unzipping V35807-01.zip
Unzipping V35808-01.zip
unzipping file V35808-01.zip
Unzipping V35809-01.zip
Unzipping V35810-01.zip
Unzipping V35811-01.zip
Unzipping V35812-01.zip
Unzipping V35813-01.zip
Unzipping V36798-01.zip
Unzipping V37515-01_1of6.zip
Unzipping V37515-01_2of6.zip
Unzipping V37515-01_3of6.zip
Unzipping V37515-01_4of6.zip
Unzipping V37515-01_5of6.zip
Unzipping V37515-01_6of6.zip
Unzipping V39211-01.zip
Unzipping V39571-01.zip
Unzipping V39615-01.zip
Unzipping V39664-01.zip
Applying one-off patches
All files have been unzipped.
Stage area is complete.

Done Unzipping shiphome ...
StageBuilder will now stage the tech patches for Linux_x64...
Copying one-off patches to shiphome
/media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../unzip/Linux_x64/unzip -o /media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../Xpatches/Linux_x64.zip -d /media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../../../../TechPatches

Archive:  /media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../Xpatches/Linux_x64.zip
creating: /media/sf_Oracle_EBS_12.2.2/startCD/Disk1/rapidwiz/bin/../../../../TechPatches/DB/16303726/

Done Copying additional patches
Verifying stage area...

Directory /media/sf_Oracle_EBS_12.2.2/TechInstallMedia is valid
Directory /media/sf_Oracle_EBS_12.2.2/TechPatches/DB is valid
Directory /media/sf_Oracle_EBS_12.2.2/TechPatches/MiddleTier is valid
Directory /media/sf_Oracle_EBS_12.2.2/EBSInstallMedia/AppDB is valid
Directory /media/sf_Oracle_EBS_12.2.2/EBSInstallMedia/Apps is valid
Directory /media/sf_Oracle_EBS_12.2.2/EBSInstallMedia/AS10.1.2 is valid
Directory /media/sf_Oracle_EBS_12.2.2/TechInstallMedia/database is valid
Directory /media/sf_Oracle_EBS_12.2.2/TechInstallMedia/ohs11116 is valid
Directory /media/sf_Oracle_EBS_12.2.2/TechInstallMedia/wls1036_generic is valid

Stage area verified.

Press enter to continue...

                Build Stage Menu

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

1.     Create new stage area
2.     Copy new patches to current stage area.
3.     Display existing files in stage TechPatches.
4.     Exit menu
Enter your choice [4]:     

16.Make sure proper privileges are give to stage directory (755 or 775)

17.Install Oracle E-Business suite R12.2:

- Make sure proper display is configured

18.start the Installation through root user

[root@delta001 rapidwiz]pwd
/u01/Stage/startCD/Disk1/rapidwiz
[root@delta001 rapidwiz]# ./rapidwiz

Default Port Numbers:
node manager         5556
wls admin server 7001
wls oacore port 7201
wls forms 7401
wls oafm         7601
ohs admin 9999
database         1521

Verify Installation:

- Login to Oracle EBS and  verify application access

username=sysadmin
password=sysadmin

Note: after installing the 12.2.2 the default password of sysadmin is sysadmin.

weblogic services:
admin server(admin)

1.forms-c4ws_server1
2.forms_server1
3.oacore_server1
4.oafm_server1

Clone From Production To Development.

Clone From Production To Development


-Make sure preclone scripts already run, if it is not first run preclone on dbTier and appsTier.
-Take the backup of application binaries as well as database backup.
-Mount the backups to the target side, if it is not mounted then do the scp.
-Create blackouts on target side, and send an outage email to business users that this instance is going to clone.
-Shutdown the application services, shutdown the database and startup restrict-mode drop the database, and take backup if required (export-import, pfile, context_file and other config files) sometimes it depends on your project to project)
-On target side untar the binaries of database and prepare the pfile, in pfile keep all the parameters which is there, just add two parameters (db_file_name_convert and log_file_name_convert) which actually convert the filesystem from source to target, and then we do startup nomount (which starts the instance and background processes)
-Now we will run rman duplicate.
-Rman connect auxiliary and run command allocate channels.
-"DUPLICATE" target database to name of the database along with the backup location and then release channels.

what internally rman duplicate will do is?

*it will restore the controlfile from the backup.
*it will mount the database internally (alter database mount).
*it will restore the database.
*it will recover the database.
*and then it will open the database with resetlogs option.

when you open the database with resetlogs, incarnation of the database will be happen, it means

*new logfile sequence number will be assigned and it will be set to 1
*redologfile will be given a new timestamp
*new scn number will be assigned and then your datafile and controlfile will be sync.

-Untar binaries for application side, and then go to common_top/clone/bin and fire perl adcfgclone.pl appsTier.
-Fire perl adcfgclone.pl appsTier context_file=<give cloned instance contextfile>

Post Clone Steps:
* Change the APPS password.
*Cancel the scheduled requests.
*Change the java color and banner.
*Updating workflow mailer status.
*Cleanup the nodes table by running.
EXEC FND_CONC_CLONE.SETUP_CLEAN;.
*Run autoconfig on both the tiers.
*Drop softlinks which are pointing to production
*Do sanity check and release instance for user access.
*Etc.

Why Database Upgrade

Why Database Upgrade


Several Bugs that are causing outages and /or business impacts.

-Upgrade your database because numerous bugs fixed.
-Several new features deployed with higher versions.
-Improved performance and scale-ability for latest versions rather that previous versions.
-Already thousands of customers upgraded their database from lower versions to recent versions.
-Extended support fee can avoided, no bug fixes unless you pay extra fee to get extended support.

Upgrading means the process of changing the data dictionary contents of a database to reflect particular release.

Upgrading from 10.2.x to 11.2.x is a major release upgrade
Ex: 10.2.0.5.0 to 11.2.0.1.0

Upgrading from 10.2.0.x to 10.2.0.x is a patch set upgrade
Ex: 10.2.0.1 to 10.2.0.5

Database Upgrade High Level Steps From 10g to 11g.

Database Upgrade High Level Steps From 10g to 11g.


DBUA - Database Upgrade Assistant - Recommended
MANUAL - Using SQL Scripts & Utilities

Manual upgrade process are divided in 3 steps.
Step.1 pre-upgrade
Step.2 actual database upgrade
Step.3 post-upgrade

To perform pre-upgrade steps that you do not require downtime, you must be finished before downtime starts. Before starting upgrade process finish 11g installation on preffered mount point.

Source version:10.2.0.5
Target version: 11.2.01

1) Before starting the upgrade make sure 11g database binary already installed on the database server.
-install only 11g software in separate location.

2) Check integrity of the source database and sanity operations.
-find duplicate objects in sys and system
-purge recyclebin
-verify installed components status and version.
-fix invalid objects before upgrading process
-check any files in media recovery/backup mode
-Gather dictionary statistics
-check any corruption in data dictionary.

3) Run pre-upgrade information tool
-copy pre-upgrade script utlu112i.sql from 11g home and ran on 10g home

4) Review pre-upgrade script output.

5) Fix the warnings reported by pre-upgraded tool

6) create pfile from spfile and prepare the pfile from 11g home database.
-removing deprecated parameters.
-change compatibility parameter
-set 11g $ORACLE_BASE.
-copy newly created pfile from 10ghome to 11ghome dbs directory.
-Configure ENV file for 11g database.
-Network configuration for 11g
*add new listener with different port number in tnsnames.ora and listener.ora files

7) Stopping 10g database components

8) Backup 10g home (preffered cold backup, because we have downtime)

9) Set 11g ENV variables and startup the database.
-start with startup upgrade option.
-run catupgrd.sql script
-database shutdown automatically after completing the catupgrd.sql script.

10) startup the database and check version.

11) Execute post upgrade script- utlu112s.sql
-Verify upgraded components status and their versions.

12) Perform upgrade actions that changes the database from upgrade mode to normal mode
-run catuppst.sql
-find invalid objects count
-run utlrp.sql script
-verify any invalid objects is fixed or not

13) Upgrade timezone file version

14) Perform post upgrade tasks