Monday, 18 February 2008

Create Oracle user in Linux

Create Groups

groupadd –g 500 dba
groupadd –g 501 oinstall

All nodes should have Oracle in the same group

useradd –u 500 –g oinstall –G dba oracle

Verify Oracle user setup

id oracle

Sunday, 10 February 2008

Oracle E-Business Suite R12 Installation Steps on Windows XP

I have installed Oracle E-Business Suite Release 12 on Windows XP Professional successfully.
I have done a single node installation as follows:

Hardware & Software Specifications:

- Intel Pentium 4, CPU 3.2 GHz
- 2 GB of RAM
- 180 GB Hard Drive
- Windows XP Professional with Sevice Pack 2

Installation Steps:

1) Install Windows XP Professional with SP2

2) Set 'Computer Name' as well as 'Domain Name'.

- Right click on 'My Computer' > Properties > 'Computer Name' > Change
- Set 'Computer Name' to
- Click on More
- Set a 'Primary DNS Suffix of this Computer' to

3) Install Microsoft Loopback adapter and define an IP address (10.10.10.10)

For more information on how to do this, please refer to "How to install the Microsoft Loopback adapter in Windows XP":

http://support.microsoft.com/kb/839013

4) Add a new entry in C:\windows\system32\drivers\etc\hosts as follows:


10.10.10.10 hostname.domainname.com

5) From the command prompt, make sure you can do the following:

C:\> ping 10.10.10.10
C:\> ping hostname
C:\> ping hostname.domainname.com

6) Create a new user 'hsawwan' and make this user a member of:
- Administrators (local user)

7) Install Visual C++ 8.0 (Which is included in Microsoft Visual Studio 2005) in 'C:\VCPlus' -- Make sure not to install VC++ in a directory that contains spaces.

8) Download 'Cygwin' and install the required packages:

- Create a Cygwin directory (C:\cygwin) -- Make sure not to install 'Cygwin' in a directory that contains spaces.
- Download the Cygwin Software (http://www.cygwin.com)
- Run 'Setup.exe' and choose 'Download without Installing'
- Select the following packages:

Archive - Default, plus manually select the zip package
Base - Default, plus manually select: ash, coreutils, diffutils, findutils, gawk, grep, sed, tar and which
Devel - Default, plus manually select binutils, gcc, gcc-core, gcc-g++, make and mktemp
Doc - Default, plus manually select cygwin-doc and man
Editors - Default, plus manually select vim
Interpreters - Default, plus manually select gawk
Shells - Default, plus manually select ash and tcsh
Utils - Default, plus manually select cygutils and file

- Once the download is complete, run 'Setup.exe' again and choose 'Install from Local Directory'
- Specify the directory where you want to install Cygwin (C:\cygwin) and DOS as the Default Text File Type

9) GNUMake is not required when using 'Cygwin' since it comes as a part of the 'Cygwin'.

C:\cygwin\bin>copy gawk.exe awk.exe
C:\cygwin\bin>copy grep.exe egrep.exe
C:\cygwin\bin>copy make.exe gnumake.exe
C:\cygwin\bin>copy gcc.exe cc.exe

10) Add 'C:\cygwin\bin' to the system path.

11) No JDK installation is required, JDK 5.0 (java version "1.5.0_08") is bundled with Oracle Applications R12 installation.

12) Set Up the Stage Area:

Stage Area (C:\Stage12) requires a 26 GB hard disk space.

Extract the zip files (25 files) which have been downloaded from (http://edelivery.oracle.com). Nothing special to do since the extracted files will create the stage area directory structure by itself. You should see the following structure under 'C:\Stage12' once you are done with the files extraction:

- startCD > Disk1
- oraAppDB > (Disk 1 to Disk 35)
- oraApps > (Disk 1 to Disk 7)
- oraAS > (Disk 1 to Disk 2)
- oraDB > (Disk 1 to Disk 3)

13) Start the installation:

C:\> cd Stage12\startCD\Disk1\rapidwiz
C:\Stage12\startCD\Disk1\rapidwiz> RapidWiz.cmd

The installation wizard is similar to 11.5.10 RapidWiz. For 'VC++' and 'Cygwin' I have provided the following paths:

s_MSDEVdir=C:\VCPlus\VC
s_MKSdir=C:\cygwin\bin

- It took almost 2 hours to install the production environment (3 hours when installing the Vision instance)
- Total space required to install the production environment is 60 GB (153 GB is required to install the Vision instance)

References:

[1] Oracle E-Business Suite R12 Installation on Windows 2003 (http://forums.oracle.com/forums/thread.jspa?threadID=484238)
[2] Note: 405293.1 (Oracle Applications Release Notes Release 12)
[3] Note: 402311.1 (Oracle Applications Installation and Upgrade Notes Release 12 (12.0) for Microsoft Windows)
[4] Note: 414992.1 (Using Cygwin to Maintain Oracle E-Business Suite Release 12 on Windows)
[5] Oracle® Applications Installation Guide: Using Rapid Install Release 12 (Part No. B31295-02)

Starting / Stopping the Oracle 10g RAC Cluster

# su - oracle

$ hostname
raclinux1

Stopping the Oracle RAC 10g Environment

The first step is to stop the Oracle instance. When the instance (and related services) is down, then bring down the ASM instance. Finally, shut down the node applications (Virtual IP, GSD, TNS Listener, and ONS).

$ emctl stop dbconsole
$ srvctl stop database -d RACDB
$ srvctl stop asm -n raclinux1
$ srvctl stop nodeapps -n raclinux1

Starting the Oracle RAC 10g Environment
The first step is to start the node applications (Virtual IP, GSD, TNS Listener, and ONS). When the node applications are successfully started, then bring up the ASM instance. Finally, bring up the Oracle instance (and related services) and the Enterprise Manager Database console.

$ srvctl start nodeapps -n raclinux1
$ srvctl start asm -n raclinux1
$ srvctl start database -d RACDB
$ emctl start dbconsole

Start/Stop All Instances with SRVCTL

Start/stop all the instances and their enabled services. I have included this step just for fun as a way to bring down all instances!

$ srvctl start database -d RACDB

$ srvctl stop database -d RACDB

Friday, 24 August 2007

Show any logins whose password is NOT SET to expire in 30 days

SELECT user_id, user_name, password_lifespan_days
FROM apps.fnd_user
WHERE
nvl(password_lifespan_days, 0) != 30

Thursday, 23 August 2007

Script to see Terminated employees who still have an active login to Oracle Apps

COL emp_num format a7
COL per_serv_id format 999999
-- Check for terminated employees
PROMPT Terminated employees who still have an active login to Oracle Apps
SELECT DISTINCT(fu.user_name)
, papf.employee_number emp_num
, to_char(ppos.actual_termination_date, 'DD-Mon-YY') term_date
, period_of_service_id per_serv_id
FROM apps.fnd_user fu
, apps.per_all_people_f papf
, apps.per_periods_of_service ppos
WHERE fu.employee_id = papf.person_id
AND papf.person_id = ppos.person_id
AND fu.end_date IS NULL
AND ppos.period_of_service_id = (SELECT MAX(period_of_service_id)
FROM per_periods_of_service
WHERE person_id = papf.person_id)
AND ppos.actual_termination_date < TRUNC(SYSDATE)
/

Wednesday, 15 August 2007

Stop Script Oracle iAS 10g application server Environment is AIX 5.3 and Oracle iAS 10g

# Author Rafakat Hussain
# Date 15/08/2007
# shutdown script for Oracle Application Server 10g
# -------------------------------------------------
# =============================
# Shutdown 10g Application Tier
# =============================

export ORACLE_SID=infra
export ORACLE_HOME=/ora111/dev5/10giAS/portal

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$PATH:$ORACLE_HOME/bin

$ORACLE_HOME/opmn/bin/opmnctl stopall

$ORACLE_HOME/bin/emctl stop iasconsole

# ===========================
# Shutdown 10g Infrastructure
# ===========================

export ORACLE_SID=infra
export ORACLE_HOME=/ora111/dev5/10giAS/infra

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$PATH:$ORACLE_HOME/bin

$ORACLE_HOME/opmn/bin/opmnctl stopall

$ORACLE_HOME/bin/emctl stop dbconsole

$ORACLE_HOME/bin/emctl stop iasconsole

SQLDBA="$ORACLE_HOME/bin/sqlplus /nolog"

$SQLDBA <connect / as sysdba
shutdown immediate
EOF

$ORACLE_HOME/bin/lsnrctl stop

Start Script Oracle iAS 10g application server Environment is AIX 5.3 and Oracle iAS 10g

# Author Rafakat Hussain
# Date 15/08/2007
# start script for Oracle Application Server 10g
# ----------------------------------------------
# =============================
# Start Infrastructure Metadata
# =============================

export ORACLE_SID=infra
export ORACLE_HOME=/ora111/dev5/10giAS/infra

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$PATH:$ORACLE_HOME/bin

$ORACLE_HOME/bin/lsnrctl start

SQLDBA="$ORACLE_HOME/bin/sqlplus /nolog"

$SQLDBA <connect / as sysdba
startup
EOF

# Starting Oracle Enterprise Manager 10g Database Control
$ORACLE_HOME/bin/emctl start dbconsole

$ORACLE_HOME/opmn/bin/opmnctl startall

$ORACLE_HOME/bin/emctl start iasconsole

# =============================
# Start 10g Application Tier
# =============================

unset CLASSPATH

export ORACLE_SID=infra
export ORACLE_HOME=/ora111/dev5/10giAS/portal

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$PATH:$ORACLE_HOME/bin

$ORACLE_HOME/opmn/bin/opmnctl startall
## after you modify opmn.xml file
# $ORACLE_HOME/opmn/bin/opmnctl reload

$ORACLE_HOME/bin/emctl start iasconsole
Profile - Oracle 11i AppsDBA
Over 7 years of experience as an Oracle Applications DBA managing Oracle Public Sector HRMS 11.5.10 and Oracle Financials 11i in Unix and Windows NT environments. Strong skills and experience with installing, patching, cloning and troubleshooting various Oracle E-Business Suite products in Oracle database 9i and 10g. Proactive in the different phases of architecture design, development, testing, maintenance, performance enhancement and postproduction support. Currently working as Oracle Application DBA at Warwickshire County Council.

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