Wednesday, August 30, 2017

Sql queries to check ACTIVE / INACTIVE Sessions


Total Count of sessions

select count(s.status) TOTAL_SESSIONS
from gv$session s;

Total Count of Inactive sessions

select count(s.status) INACTIVE_SESSIONS
from gv$session s, v$process p
where
p.addr=s.paddr and
s.status='INACTIVE';

SESSIONS WHICH ARE IN INACTIVE STATUS FROM MORE THAN 1HOUR
select count(s.status) "INACTIVE SESSIONS > 1HOUR "
from gv$session s, v$process p
where
p.addr=s.paddr and
s.last_call_et > 3600 and
s.status='INACTIVE';

COUNT OF ACTIVE SESSIONS

select count(s.status) ACTIVE_SESSIONS
from gv$session s, v$process p
where
p.addr=s.paddr and
s.status='ACTIVE';

TOTAL SESSIONS COUNT ORDERED BY PROGRAM

col program for a30
select s.program,count(s.program) Total_Sessions
from gv$session s, v$process p
where  p.addr=s.paddr
group by s.program;

TOTAL COUNT OF SESSIONS ORDERED BY MODULE

col module  for a30
prompt TOTAL SESSIONS
select s.module,count(s.sid) Total_Sessions
from gv$session s, v$process p
where  p.addr=s.paddr
group by s.module;

TOTAL COUNT OF SESSIONS ORDERED BY ACTION

col action for a30
prompt TOTAL SESSIONS
select s.action,count(s.sid) Total_Sessions
from gv$session s, v$process p
where  p.addr=s.paddr
group by s.action;

INACTIVE SESSIONS

prompt INACTIVE SESSIONS
select p.spid, s.sid,s.last_call_et/3600 last_call_et ,s.status,s.action,s.module,s.program
from gv$session s, v$process p
where
p.addr=s.paddr and
s.status='INACTIVE';

INACTIVE

prompt INACTIVE SESSIONS
select count(s.status) INACTIVE
from gv$session s, gv$sqlarea t,v$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
s.status='INACTIVE';

INACTIVE PROGRAMS

col module for a40             
prompt INACTIVE SESSIONS
col INACTIVE_PROGRAMS FOR A40
select distinct (s.program) INACTIVE_PROGRAMS,s.module
from gv$session s, v$process p
where  p.addr=s.paddr and
s.status='INACTIVE';

INACTIVE PROGRAMS with disk reads

prompt INACTIVE SESSIONS
select distinct (s.program) INACTIVE_PROGRAMS,SUM(T.DISK_READS)
from gv$session s, gv$sqlarea t,v$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
s.status='INACTIVE'
GROUP BY S.PROGRAM;

INACTIVE SESSIONS COUNT WITH PROGRAM

col program for a30
prompt TOTAL INACTIVE SESSIONS
col INACTIVE_PROGRAMS FOR A40
select s.program,count(s.program) Total_Inactive_Sessions
from gv$session s,v$process p
where     p.addr=s.paddr  AND
s.status='INACTIVE'
group by s.program
order by 2 desc;

TOTAL INACTIVE SESSIONS MORE THAN 1HOUR

col program for a30
col INACTIVE_PROGRAMS FOR A40
select s.program,count(s.program) Inactive_Sessions_from_1Hour
from gv$session s,v$process p
where     p.addr=s.paddr  AND
s.status='INACTIVE'
and s.last_call_et > (3600)
group by s.program
order by 2 desc;

TOTAL INACTIVE SESSIONS GROUP BY  MODULE
col program for a60
COL MODULE FOR A30
prompt TOTAL SESSIONS
col INACTIVE_PROGRAMS FOR A40
select s.module,count(s.module) Total_Inactive_Sessions
from gv$session s,v$process p
where     p.addr=s.paddr  AND
s.status='INACTIVE'
group by s.module;

INACTIVE SESSION DETAILS MORE THAN 1 HOUR

set pagesize 40
col INST_ID for 99
col spid for a10
set linesize 150
col PROGRAM for a10
col action format a10
col logon_time format a16
col module format a13
col cli_process format a7
col cli_mach for a15
col status format a10
col username format a10
col last_call_et_Hrs for 9999.99
col sql_hash_value for 9999999999999col username for a10
set linesize 152
set pagesize 80
col "Last SQL" for a60
col elapsed_time for 999999999999
select p.spid, s.sid,s.last_call_et/3600 last_call_et_Hrs ,s.status,s.action,s.module,s.program,t.disk_reads,lpad(t.sql_text,30) "Last SQL"
from gv$session s, gv$sqlarea t,gv$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
s.status='INACTIVE'
and s.last_call_et > (3600)
order by last_call_et;

INACTIVE PROGRAM  --ANY--

select p.spid, s.sid,s.last_call_et/3600 last_call_et_Hrs ,s.status,s.action,s.module,s.program,t.disk_reads,lpad(t.sql_text,30) "Last SQL"
from gv$session s, gv$sqlarea t,gv$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
s.status='INACTIVE'
And s.program='&PROGRAM_NAME'
order by last_call_et;

INACTIVE MODULES  --ANY--
select p.spid, s.sid,s.last_call_et/3600 last_call_et_Hrs ,s.status,s.action,s.module,s.program,t.disk_reads,lpad(t.sql_text,30) "Last SQL"
from gv$session s, gv$sqlarea t,gv$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr
And s.module like '%order_cleanup_hazmat_v3.sql'
order by last_call_et;

INACTIVE JDBC SESSIONS

set pagesize 40
col INST_ID for 99
col spid for a10
set linesize 150
col PROGRAM for a10
col action format a10
col logon_time format a16
col module format a13
col cli_process format a7
col cli_mach for a15
col status format a10
col username format a10
col last_call_et for 9999.99
col sql_hash_value for 9999999999999col username for a10
set linesize 152
set pagesize 80
col "Last SQL" for a60
col elapsed_time for 999999999999
select p.spid, s.sid,s.last_call_et/3600 last_call_et ,s.status,s.action,
s.module,s.program,t.disk_reads,lpad(t.sql_text,30) "Last SQL"
from gv$session s, gv$sqlarea t,gv$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
s.status='INACTIVE'
and s.program='JDBC Thin Client'
and s.last_call_et > 3600
order by last_call_et;

COUNT OF INACTIVE SESSIONS MORE THAN ONE HOUR

SELECT COUNT(P.SPID)
from gv$session s, gv$sqlarea t,gv$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
s.status='INACTIVE'
and s.program='JDBC Thin Client'
and s.last_call_et > 3600
order by last_call_et;

FORMS
TOTAL FORM SESSIONS

SELECT COUNT(S.SID) INACTIVE_FORM_SESSIONS FROM V$SESSION S
WHERE S.STATUS='INACTIVE' and
s.action like ('%FRM%');

FORMS SESSIONS DETAILS

col "Last SQL" for a30
select p.spid,s.sid,s.status,s.last_call_et/3600 last_call_et_hrs ,
s.sid,t.disk_reads, t.elapsed_time,lpad(t.sql_text,30) "Last SQL"
from gv$session s, gv$sqlarea t,gv$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
s.action like ('FRM%') and
s.last_call_et > 3600
order by spid;                      


col machine for a15
col "Last SQL" for a30
select p.spid,s.sid,s.status,s.last_call_et/3600 last_call_et_hrs ,
S.ACTION,s.process Client_Process,s.machine
from gv$session s, gv$sqlarea t,gv$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
s.action like ('FRM%') and
s.last_call_et > 3600;         
order by 4;                           

INACTIVE FORMS SESSIONS DETAILS

col program for a15
col last_call_et for 999.99
select p.spid, s.sid, s.process,s.last_call_et/3600 last_call_et ,s.status,s.action,s.module,s.program,t.disk_reads,lpad(t.sql_text,30) "Last SQL"
from gv$session s, gv$sqlarea t,gv$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
s.status='INACTIVE'
and s.action like 'FRM:%'
and s.last_call_et > 3600
order by last_call_et desc;

UNIQUE SPID

select unique(p.spid)
from gv$session s, gv$sqlarea t,gv$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
s.status='INACTIVE'
and s.action like 'FRM:%'
and s.last_call_et > 3600;

COUNT FORMS

select COUNT(p.spid)
from gv$session s, gv$sqlarea t,gv$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
s.status='INACTIVE'
and s.action like 'FRM:%'
and s.last_call_et > 3600;

ZERO HASH VALUE

select COUNT(p.spid)
from gv$session s,gv$process p
where
p.addr=s.paddr and
s.status='INACTIVE'
and s.action like 'FRM:%'
and s.last_call_et > 3600
AND S.SQL_HASH_VALUE=0;

INACTIVE FORM BY NAME

select count(s.sid) from v$session S
where s.action like ('%&ACTION%')
AND S.STATUS='INACTIVE';

GROUP BY ACTION

SELECT S.ACTION,COUNT(S.SID) FROM V$SESSION S
WHERE S.STATUS='INACTIVE' and
s.action like ('%FRM%')
group by s.action;

FROM A SPECIFIC USERNAME

SET LINSIZE 152
col spid for a10
col process_spid for a10
col user_name for a20
col form_name for a20
select a.pid,a.spid,a.process_spid, c.user_name,to_char(a.start_time,'DD-MON-YYYY HH24:MI:SS') "START_TIME" ,
d.user_form_name "FORM_NAME"
from apps.fnd_logins a, apps.fnd_login_resp_forms b, apps.fnd_user c,
apps.fnd_form_tl d
where
a.login_id=b.login_id
and c.user_name like 'JROMO'
and a.user_id=c.user_id
and trunc(b.start_time) >trunc(sysdate -11)
and trunc(b.end_time) is null
and b.form_id=d.form_id
and d.language='US';

INACTIVE FORM

set pagesize 40
col INST_ID for 99
col spid for a10
set linesize 150
col PROGRAM for a10
col action format a10
col logon_time format a16
col module format a13
col cli_process format a7
col cli_mach for a15
col status format a10
col username format a10
col last_call_et for 9999.99
col sql_hash_value for 9999999999999col username for a10
set linesize 152
set pagesize 80
col "Last SQL" for a30
col elapsed_time for 999999999999
select p.spid, s.sid,s.process cli_process,s.last_call_et/3600 last_call_et ,
s.status,s.action,s.module,s.program,t.disk_reads,lpad(t.sql_text,30) "Last SQL"
from gv$session s, gv$sqlarea t,gv$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
s.status='INACTIVE'
and s.action like ('FRM%')
and s.last_call_et > (3600*3)
order by last_call_et;





INACTIVE FORM SESSIONS 

col cli_proc for a9
COL AUDSID FOR A6
COL PID FOR A6
COL SID FOR A5
COL FORM_NAME FOR A25
COL USER_NAME FOR A15
col last_call_et for 9999.99
SELECT
-- /*+ ORDERED FULL(fl) FULL(vp) USE_HASH(fl vp) */
( SELECT SUBSTR ( fu.user_name, 1, 20 )
FROM apps.fnd_user fu
WHERE fu.user_id = fl.user_id
) user_name,vs.status,
TO_CHAR ( fl.start_time, 'DD-MON-YYYY HH24:MI' ) login_start_time,
TO_CHAR ( fl.end_time, 'DD-MON-YYYY HH24:MI' ) login_end_time,
vs.last_call_et/3600 last_call_et,
SUBSTR ( fl.process_spid, 1, 6 ) spid,
SUBSTR ( vs.process, 1, 8 ) cli_proc,
SUBSTR ( TO_CHAR ( vs.sid ), 1, 3 ) sid,
SUBSTR ( TO_CHAR ( vs.serial#), 1, 7 ) serial#,
SUBSTR ( TO_CHAR ( rf.audsid ), 1, 6 ) audsid,
SUBSTR ( TO_CHAR ( fl.pid ), 1, 3 ) pid,
SUBSTR ( vs.module || ' - ' ||
( SELECT SUBSTR ( ft.user_form_name, 1, 40 )
FROM apps.fnd_form_tl ft
WHERE ft.application_id = rf.form_appl_id
AND ft.form_id        = rf.form_id
AND ft.language       = USERENV('LANG')
), 1, 40 ) form_name
FROM apps.fnd_logins           fl,
gv$process            vp,
apps.fnd_login_resp_forms rf,
gv$session            vs
WHERE fl.start_time   > sysdate - 7 /* login within last 7 days */
AND fl.login_type   = 'FORM'
AND fl.process_spid = vp.spid
AND fl.pid          = vp.pid
AND fl.login_id     = rf.login_id
AND rf.end_time    IS NULL
AND rf.audsid       = vs.audsid
and vs.status='INACTIVE'
ORDER BY
vs.process,
fl.process_spid;

ACTIVE

prompt ACTIVE SESSIONS
select count(s.status) ACTIVE
from gv$session s, gv$sqlarea t,v$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr and
s.status='ACTIVE';

MODULE

set pagesize 40
col INST_ID for 99
col spid for a10
set linesize 150
col PROGRAM for a10
col action format a10
col logon_time format a16
col module format a13
col cli_process format a7
col cli_mach for a15
col status format a10
col username format a10
col last_call_et for 9999.99
col sql_hash_value for 9999999999999col username for a10
set linesize 152
set pagesize 80
col "Last SQL" for a30
col elapsed_time for 999999999999
select p.spid, s.sid,s.process cli_process,s.last_call_et/3600 last_call_et ,
s.status,s.action,s.module,s.program,t.disk_reads,lpad(t.sql_text,30) "Last SQL"
from gv$session s, gv$sqlarea t,gv$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr 
and s.MODULE like ('&MODULE_NAME_1HR%')
and s.last_call_et > ('&TIME_HRS' * 3600)
order by last_call_et;

select p.spid, s.sid,s.process cli_process,s.last_call_et/3600 last_call_et ,
s.status,s.action,s.module,s.program
from gv$session s, gv$sqlarea t,gv$process p
where s.sql_address =t.address and
p.addr=s.paddr 
and s.MODULE like ('%TOAD%')
Order by last_call_et;

TOAD SESSIONS

select p.spid, s.sid,s.process cli_process,s.last_call_et/3600 last_call_et ,
s.status,s.action,s.module,s.program
from gv$session s, gv$process p
where
p.addr=s.paddr 
and s.MODULE like ('%TOAD%')
Order by last_call_et;

CLIENT MACHINE SESSIONS COUNT

select count(s.process) TOTAL from v$session S
where s.machine like ('%&CLIENT_MACHINE%');

select count(s.process) INACTIVE from v$session S
where s.machine like ('%&CLIENT_MACHINE%')
and s.status='INACTIVE';

hash value=0

select count(s.process) from v$session S
where s.machine like ('%&CLIENT_MACHINE%')
AND S.SQL_HASH_VALUE=0;

select count(s.process) from v$session S
where s.machine like ('%&CLIENT_MACHINE%')
AND S.SQL_HASH_VALUE=0
AND S.LAST_CALL_ET > 3600;

Unique Actions

col module for a40             
prompt INACTIVE SESSIONS
col INACTIVE_PROGRAMS FOR A40
select distinct (s.program) INACTIVE_PROGRAMS,s.module
from gv$session s, gv$sqlarea t,v$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
s.machine like ('%&CLIENT_MACHINE%') AND
p.addr=s.paddr and
s.status='INACTIVE';

GROUP BY  program

col program for a60
prompt TOTAL SESSIONS
col INACTIVE_PROGRAMS FOR A40
select s.program,count(s.program) Total_Inactive_Sessions
from gv$session s, gv$sqlarea t,v$process p
where s.sql_address =t.address and
s.sql_hash_value =t.hash_value and
p.addr=s.paddr  AND
s.machine like ('%&CLIENT_MACHINE%') AND
s.status='INACTIVE'
group by s.program;

Friday, August 25, 2017

How I Simplified Oracle Database 12c and 11g Installations on Oracle Linux 6

by Ginny Henningsen; updated by Michele Casey

How to simplify the installation of Oracle Database 12c or 11g on Oracle Linux 6 by installing the oracle-rdbms-server-12cR1-preinstall or oracle-rdbms-server-11gR2-preinstall RPM package, which automatically performs a number of tasks, such as installing required software packages, resolving package dependencies, and modifying kernel parameters.


Published September 2012 (updated July 2013)

Introducing the oracle-rdbms-server-12cR1-preinstall and oracle-rdbms-server-11gR2-preinstall RPM for Oracle Linux

Before installing Oracle Database 12c or 11g on a system, you need to preconfigure the operating environment since the database requires certain software packages, package versions, and tweaks to kernel parameters. (Be sure to review the appropriate Oracle Database installation guide to familiarize yourself with hardware, software, and operating system requirements.)
Want to comment on this article? Post the link on Facebook's OTN Garage page.  Have a similar article to share? Bring it up on Facebook or Twitter and let's discuss.
Note: This article applies to Oracle Linux 6. A previous article, "How I Simplified Oracle Database Installation on Oracle Linux," covered performing a similar task on versions of Oracle Linux 5.
On Oracle Linux, I discovered that there is a remarkably easy way to address these installation prerequisites: First, depending on your database version, install either the RPM package called oracle-rdbms-server-12cR1-preinstall or oracle-rdbms-server-11gR2-preinstall. This RPM performs a number of preconfiguration steps, including the following:
  • Automatically downloading and installing any additional software packages and specific package versions needed for installing Oracle Grid Infrastructure and Oracle Database 12 c Release 1 (12.1) or 11g Release 2 (11.2.0.3), with package dependencies resolved via yum or up2date capabilities.
  • Creating the user oracle and the groups oinstall (for OraInventory) and dba (for OSDBA), which are used during database installation. (For security purposes, this user has no password by default and cannot log in remotely. To enable remote login, please set a password using the passwd tool.)
  • Modifying kernel parameters in /etc/sysctl.conf to change settings for shared memory, semaphores, the maximum number of file descriptors, and so on.
  • Setting hard and soft shell resource limits in /etc/security/limits.conf, such as the locked-in memory address space, the number of open files, the number of processes, and core file size.
  • Setting numa=off in the kernel for x86_64 machines.
Note that oracle-rdbms-server-12cR1-preinstall and oracle-rdbms-server-11gR2-preinstall parses the existing/etc/sysctl.conf and /etc/security/limits.conf files and updates values only as needed for database installation. Any precustomized settings not related to database installation are left as is.
The oracle-rdbms-server-12cR1-preinstall and oracle-rdbms-server-11gR2-preinstall RPM packages are accessible through the Oracle Unbreakable Linux Network (ULN, which requires a support contract), from the Oracle Linux distribution media, or from theOracle public yum repository. Thus, whether or not your system is registered with ULN to access Oracle patches and support, you can useoracle-rdbms-server-12cR1-preinstall and oracle-rdbms-server-11gR2-preinstall to simplify database installation on Oracle Linux. In addition, the Oracle public yum repository now includes all security and bug errata, ensuring systems are secured and stable with the latest security updates and bug fixes.

Installing the oracle-rdbms-server-12cR1-preinstall or oracle-rdbms-server-11gR2-preinstall RPM

The remainder of this article steps through the procedure that I used for installing oracle-rdbms-server-11gR2-preinstall on Oracle Linux via the Oracle public yum repository. The same steps outlined in the following section can be used for either version of the preinstall RPM package. I started with a system running Oracle Linux Release 6 Update 4 for x86_64, a 64-bit version of Oracle Linux that I downloaded from the Oracle software delivery cloud (requires registration or login). First, I set up a yum configuration file that pointed to the correct repository, and then I installed the oracle-rdbms-server-11gR2-preinstall RPM from that repository.
Here are the steps for preconfiguring a system for Oracle Database installation using oracle-rdbms-server-11gR2-preinstall. Remember, the steps are the same when using the oracle-rdbms-server-12cR1-preinstall package; you simply need to change the name of the RPM package during the yum installation step.
  1. As an authorized user (for example, root), retrieve the file that configures repository locations:

    # cd /etc/yum.repos.d
    
    # wget http://public-yum.oracle.com/public-yum-ol6.repo
    
    
  2. Using a text editor, modify the file, changing the field enabled=0 to enabled=1 to reflect repositories that correspond to the machine's operating system release. 

    Here is an excerpt of public-yum-old6.repo with the changed lines in boldface.
    [ol6_latest]
    
    name=Oracle Linux $releasever Latest ($basearch)
    
    baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
    
    gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
    
    gpgcheck=1
    
    enabled=1
    
    
    
    
    
    [ol6_UEK_latest]
    
    name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
    
    baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
    
    gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
    
    gpgcheck=1
    
    enabled=1
    
    

    Because the target system is running Oracle Linux Release 6 Update 4 for x86_64, which installs the Oracle Unbreakable Enterprise Kernel by default, there are two repositories to enable, [ol6_latest] and [ol6_UEK_latest].
  3. Next, install the oracle-rdbms-server-11gR2-preinstall RPM using the yum install command. If you are using Oracle Database 12c, then you would type yum install.

    The output in Listing 1 shows how the installation checks dependencies and then downloads and installs the required packages.
    # yum install oracle-rdbms-server-11gR2-preinstall
    
    Loaded plugins: refresh-packagekit, rhnplugin, security
    
    Setting up Install Process
    
    Resolving Dependencies
    
    --> Running transaction check
    
    ---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-6.el6 will be installed
    
    --> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
    
    --> Processing Dependency: gcc for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
    
    --> Processing Dependency: libaio-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
    
    --> Processing Dependency: libstdc++-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
    
    --> Processing Dependency: glibc-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
    
    --> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
    
    --> Processing Dependency: ksh for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
    
    --> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64
    
    --> Running transaction check
    
    ---> Package compat-libcap1.x86_64 0:1.10-1 will be installed
    
    ---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed
    
    ---> Package gcc.x86_64 0:4.4.6-4.el6 will be installed
    
    --> Processing Dependency: cpp = 4.4.6-4.el6 for package: gcc-4.4.6-4.el6.x86_64
    
    --> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.6-4.el6.x86_64
    
    ---> Package gcc-c++.x86_64 0:4.4.6-4.el6 will be installed
    
    --> Processing Dependency: libmpfr.so.1()(64bit) for package: gcc-c++-4.4.6-4.el6.x86_64
    
    ---> Package glibc-devel.x86_64 0:2.12-1.80.el6_3.4 will be installed
    
    --> Processing Dependency: glibc-headers = 2.12-1.80.el6_3.4 for package: glibc-devel-2.12-1.80.el6_3.4.x86_64
    
    --> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.80.el6_3.4.x86_64
    
    ---> Package ksh.x86_64 0:20100621-16.el6 will be installed
    
    ---> Package libaio-devel.x86_64 0:0.3.107-10.el6 will be installed
    
    ---> Package libstdc++-devel.x86_64 0:4.4.6-4.el6 will be installed
    
    --> Running transaction check
    
    ---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
    
    --> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
    
    --> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
    
    ---> Package cpp.x86_64 0:4.4.6-4.el6 will be installed
    
    ---> Package glibc-headers.x86_64 0:2.12-1.80.el6_3.4 will be installed
    
    --> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.80.el6_3.4.x86_64
    
    --> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.80.el6_3.4.x86_64
    
    ---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
    
    --> Running transaction check
    
    ---> Package kernel-uek-headers.x86_64 0:2.6.32-300.32.1.el6uek will be installed
    
    ---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
    
    --> Finished Dependency Resolution
    
    
    
    Dependencies Resolved
    
    
    
    ================================================================================
    
     Package                         Arch   Version                Repository  Size
    
    ================================================================================
    
    Installing:
    
     oracle-rdbms-server-11gR2-preinstall
    
                                     x86_64 1.0-6.el6              ol6_latest  15 k
    
    Installing for dependencies:
    
     cloog-ppl                       x86_64 0.15.7-1.2.el6         ol6_latest  93 k
    
     compat-libcap1                  x86_64 1.10-1                 ol6_latest  17 k
    
     compat-libstdc++-33             x86_64 3.2.3-69.el6           ol6_latest 183 k
    
     cpp                             x86_64 4.4.6-4.el6            ol6_latest 3.7 M
    
     gcc                             x86_64 4.4.6-4.el6            ol6_latest  10 M
    
     gcc-c++                         x86_64 4.4.6-4.el6            ol6_latest 4.7 M
    
     glibc-devel                     x86_64 2.12-1.80.el6_3.4      ol6_latest 970 k
    
     glibc-headers                   x86_64 2.12-1.80.el6_3.4      ol6_latest 600 k
    
     kernel-uek-headers              x86_64 2.6.32-300.32.1.el6uek ol6_latest 713 k
    
     ksh                             x86_64 20100621-16.el6        ol6_latest 684 k
    
     libaio-devel                    x86_64 0.3.107-10.el6         ol6_latest  13 k
    
     libstdc++-devel                 x86_64 4.4.6-4.el6            ol6_latest 1.5 M
    
     mpfr                            x86_64 2.4.1-6.el6            ol6_latest 156 k
    
     ppl                             x86_64 0.10.2-11.el6          ol6_latest 1.3 M
    
    
    
    Transaction Summary
    
    ================================================================================
    
    Install      15 Package(s)
    
    
    
    Total download size: 25 M
    
    Installed size: 61 M
    
    Is this ok [y/N]: Downloading Packages:
    
    --------------------------------------------------------------------------------
    
    Total                                           710 kB/s |  25 MB     00:35     
    
    Running rpm_check_debug
    
    Running Transaction Test
    
    Transaction Test Succeeded
    
    Running Transaction
    
    
    
      Installing : mpfr-2.4.1-6.el6.x86_64                                     1/15 
    
      Installing : libstdc++-devel-4.4.6-4.el6.x86_64                          2/15 
    
      Installing : cpp-4.4.6-4.el6.x86_64                                      3/15 
    
      Installing : ppl-0.10.2-11.el6.x86_64                                    4/15 
    
      Installing : cloog-ppl-0.15.7-1.2.el6.x86_64                             5/15 
    
      Installing : kernel-uek-headers-2.6.32-300.32.1.el6uek.x86_64            6/15 
    
      Installing : glibc-headers-2.12-1.80.el6_3.4.x86_64                      7/15 
    
      Installing : glibc-devel-2.12-1.80.el6_3.4.x86_64                        8/15 
    
      Installing : gcc-4.4.6-4.el6.x86_64                                      9/15 
    
      Installing : gcc-c++-4.4.6-4.el6.x86_64                                 10/15 
    
      Installing : compat-libstdc++-33-3.2.3-69.el6.x86_64                    11/15 
    
      Installing : libaio-devel-0.3.107-10.el6.x86_64                         12/15 
    
      Installing : ksh-20100621-16.el6.x86_64                                 13/15 
    
      Installing : compat-libcap1-1.10-1.x86_64                               14/15 
    
    
    
      Installing : oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64      15/15 
    
      Verifying  : gcc-4.4.6-4.el6.x86_64                                      1/15
    
      Verifying  : compat-libcap1-1.10-1.x86_64                                2/15 
    
      Verifying  : ksh-20100621-16.el6.x86_64                                  3/15 
    
      Verifying  : glibc-devel-2.12-1.80.el6_3.4.x86_64                        4/15 
    
      Verifying  : libaio-devel-0.3.107-10.el6.x86_64                          5/15 
    
      Verifying  : oracle-rdbms-server-11gR2-preinstall-1.0-6.el6.x86_64       6/15 
    
      Verifying  : gcc-c++-4.4.6-4.el6.x86_64                                  7/15 
    
      Verifying  : glibc-headers-2.12-1.80.el6_3.4.x86_64                      8/15 
    
      Verifying  : libstdc++-devel-4.4.6-4.el6.x86_64                          9/15 
    
      Verifying  : compat-libstdc++-33-3.2.3-69.el6.x86_64                    10/15 
    
      Verifying  : mpfr-2.4.1-6.el6.x86_64                                    11/15 
    
      Verifying  : kernel-uek-headers-2.6.32-300.32.1.el6uek.x86_64           12/15 
    
      Verifying  : cpp-4.4.6-4.el6.x86_64                                     13/15 
    
      Verifying  : ppl-0.10.2-11.el6.x86_64                                   14/15 
    
      Verifying  : cloog-ppl-0.15.7-1.2.el6.x86_64                            15/15 
    
    
    
    Installed:
    
      oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-6.el6                       
    
    
    
    Dependency Installed:
    
      cloog-ppl.x86_64 0:0.15.7-1.2.el6                                             
    
      compat-libcap1.x86_64 0:1.10-1                                                
    
      compat-libstdc++-33.x86_64 0:3.2.3-69.el6                                     
    
      cpp.x86_64 0:4.4.6-4.el6                                                      
    
      gcc.x86_64 0:4.4.6-4.el6                                                      
    
      gcc-c++.x86_64 0:4.4.6-4.el6                                                  
    
      glibc-devel.x86_64 0:2.12-1.80.el6_3.4                                        
    
      glibc-headers.x86_64 0:2.12-1.80.el6_3.4                                      
    
      kernel-uek-headers.x86_64 0:2.6.32-300.32.1.el6uek                            
    
      ksh.x86_64 0:20100621-16.el6                                                  
    
      libaio-devel.x86_64 0:0.3.107-10.el6                                          
    
      libstdc++-devel.x86_64 0:4.4.6-4.el6                                          
    
      mpfr.x86_64 0:2.4.1-6.el6                                                     
    
      ppl.x86_64 0:0.10.2-11.el6                                                    
    
    
    
    Complete!
    
    
    Listing 1: Installing the oracle-rdbms-server-11gR2-preinstall RPM
    The yum installation logs messages about kernel changes in the file /var/log/oracle-rdbms-server-11gR2-preinstall/results/orakernel.log, and it makes backups of current system settings in the directory /var/log/oracle-rdbms-server-11gR2-preinstall/backup.
  4. At this point, the system is ready for the installation of Oracle Database. For example, to install Oracle Database 11g Release 2, follow the directions in Chapter 4, "Installing Oracle Database," of the Database Installation Guide for Linux."

    Here are the steps I followed while installing Oracle Database 11g Release 2 in my test environment. Make sure you review all documentation and follow recommended best practices before installing into your production environment.
    1. As root, create a parent directory in a file system that has sufficient space to be the target location for the downloaded files:

      # mkdir /home/OraDB11g
      
      # cd /home/OraDB11g
      
      

      The amount of disk space needed in the file system varies according to the specific installation type, but roughly twice the size of the zip archives, or 5 GB, is enough to house the software and data files.
    2. Into this target directory, download the installation media files from the Oracle Database Software Downloads page on Oracle Technology Network.
    3. Extract the files: 

      # unzip linux.x64_11gR2_database_1of2.zip
      
      # unzip linux.x64_11gR2_database_2of2.zip 
      
      
    4. Log in as the user oracle. Change directory to the database directory and enter the following command to run the Oracle Universal Installer:

      $ cd /home/OraDB11g/database
      
      $ ./runInstaller 
      
      
    The Oracle Universal Installer performs a number of checks, verifying that the necessary OS packages and versions are installed. In addition, it checks kernel parameters set by the oracle-rdbms-server-11gR2-preinstall installation. During the kernel settings check, the installer might flag a few settings as "failed," and you should investigate these failures. In some cases, you still might be able to continue with the database installation. If you check kernel settings in /etc/sysctl.conf, you'll see that oracle-rdbms-server-11gR2-preinstall has modified and added the necessary settings to ensure the minimum requirements are met, as defined in section 2.10.1, "Displaying and Changing Kernel Parameter Values," in Chapter 2, "Oracle Database Preinstallation Requirements," of the Oracle Database Installation Guide 11g Release2 (11.2) for Linux. Below is the list of requirements:
    fs.aio-max-nr = 1048576
    
    fs.file-max = 6815744
    
    kernel.shmall = 2097152
    
    kernel.shmmax = 4294967295
    
    kernel.shmmni = 4096
    
    kernel.sem = 250 32000 100 128
    
    net.ipv4.ip_local_port_range = 9000 65500
    
    net.core.rmem_default = 262144
    
    net.core.rmem_max = 4194304
    
    net.core.wmem_default = 262144
    
    net.core.wmem_max = 1048576
    
    

    If necessary, you can (as root) edit the file /etc/sysctl.conf to specify a setting manually, for example:
    # vi /etc/sysctl.conf 
    
    # /sbin/sysctl -p
    
    

    The Oracle Universal Installer performs additional checks, such as verifying the glibc version, sufficient disk space, environmental variable and path settings, and sufficient physical memory and swap space. Generally, installing oracle-rdbms-server-11gR2-preinstall takes care of the prerequisites so that you can proceed directly with installing the database.

Final Thoughts

Installing the oracle-rdbms-server-12cR1-preinstall and oracle-rdbms-server-11gR2-preinstall RPMs can save time when installing Oracle Database 12c and 11g on Oracle Linux. These RPMs address most Oracle Database installation prerequisites and greatly simplify the installation process.

See Also

Here are the resources referenced earlier in this document:
And here are some additional resources from the Oracle Database Documentation Library (http://www.oracle.com/pls/db112/homepage). Relevant subsections from the Oracle Database Installation Guide 11Release 2 (11.2) for Linux(http://download.oracle.com/docs/cd/E11882_01/install.112/e16763/toc.htm) with currently valid URLs are as follows:
Also see the blog entry "Oracle RDBMS Server 11gR2 Pre-Install RPM for Oracle Linux 6 has been released":https://blogs.oracle.com/linux/entry/oracle_rdbms_server_11gr2_pre

About the Authors

Ginny Henningsen has worked for the last 15 years as a freelance writer developing technical collateral and documentation for high-tech companies. Prior to that, Ginny worked for Sun Microsystems, Inc. as a Systems Engineer in King of Prussia, PA and Milwaukee, WI. Ginny has a BA from Carnegie-Mellon University and a MSCS from Villanova University.
Michele Casey is the Director of Product Management for Oracle Linux. She has worked with commercial Linux distributions and open source projects as a product manager since 2006. She has also held positions as a system administrator, project manager, and technical support engineer.
Revision 1.1, 07/09/2013; added information about using the
oracle-rdbms-server-12cR1-preinstall package to install
Oracle Database 12c

  How to Change Instance Type & Security Group of EC2 in AWS By David Taylor Updated April 29, 2023 EC2 stands for Elastic Compute Cloud...