Monday, April 23, 2007

Starting Oracle Infrastructure

I use the Linux AS 3 for the operating system of my Oracle Application Server. The Oracle Application Server is used for oracle form and report server and oracle internet directory (OID). The oracle internet directory is used for Lightweight Directory Access Protocl (LDAP). For these need I use Oracle Infrastructure and Oracle Forms Reports Server.

Now lets see how to start.
First, I start the Oracle Infrastructure
Login to the operating system as Oracle,
then it need the environtment like the below:

# Environment for Oracle Infrastructure
umask 022
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/infra
export OH=$ORACLE_HOME
export PATH=$PATH:$OH/bin:$OH/opmn/bin:$OH/dcm/bin
export ORACLE_SID=asdb
export ORACLE_TERM=xterm
export LD_ASSUME_KERNEL=2.4.1
LD_LIBRARY_PATH=$OH/lib:/lib/user/lib:/usr/local/lib
export LD_LIBRARY_PATH


You may change the path with your own local setting.
Below are the steps to start Oracle Infrastructure:
1. Then first step is start the database used by the OID

$ sqlplus "/as sysdba"

SQL*Plus: Release 9.0.1.4.0 - Production on Wed Feb 21 09:27:57 2007

(c) Copyright 2001 Oracle Corporation. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 143419160 bytes
Fixed Size 280344 bytes
Variable Size 92274688 bytes
Database Buffers 50331648 bytes
Redo Buffers 532480 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.0.1.5.0 - Production
With the Partitioning option
JServer Release 9.0.1.4.0 - Production


2. Then start the listener

$ lsnrctl start
LSNRCTL for Linux: Version 9.0.1.4.0 - Production on 21-FEB-2007 09:30:19

Copyright (c) 1991, 2001, Oracle Corporation. All rights reserved.

Starting /u01/app/oracle/infra/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 9.0.1.4.0 - Production
System parameter file is /u01/app/oracle/infra/network/admin/listener.ora
Log messages written to /u01/app/oracle/infra/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)
(HOST=appserver.plitasoft.com)(PORT=1521)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)
(HOST=appserver.plitasoft.com)(PORT=1521)))

STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.0.1.4.0 - Production
Start Date 21-FEB-2007 09:30:19
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /u01/app/oracle/infra/network/admin/listener.ora
Listener Log File /u01/app/oracle/infra/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)
(HOST=appserver.plitasoft.com)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "asdb.plitasoft.com" has 1 instance(s).
Instance "asdb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully


3. Start the opmnctl

$ opmnctl startall

4. Check the status to make sure, with this command line:

$ opmnctl status

Processes in Instance: infra.appserver.plitasoft.com
-------------------+--------------------+-------+---------
ias-component | process-type | pid | status
-------------------+--------------------+-------+---------
OID | OID | 5016 | Alive
OC4J | OC4J_SECURITY | 5090 | Alive
HTTP_Server | HTTP_Server | 5010 | Alive
dcm-daemon | dcm-daemon | N/A | Down
LogLoader | logloaderd | N/A | Down


From the table above we can see the status for OID is Alive.
So we have successed to start the Oracle Infrastructure

Starting Oracle FRS

In this blog, I continue to start Oracle Form Reports Server
For this need I login to the operating system as oracle,
then it need the environtment like the below:

# Environment for Forms Reports Server 10g
umask 022
export ORACLE_HOME=/u01/app/oracle/FRS
export OH=$ORACLE_HOME
export PATH=$PATH:$OH/bin:$OH/opmn/bin:$OH/dcm/bin
export TERM=vt220
export LD_ASSUME_KERNEL=2.4.1
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OH/lib:/lib/user/lib:/usr/local/lib
export LD_LIBRARY_PATH


You may change the path with your own local setting.
Below are the steps to start Oracle Form Reports Server:
1. Start the opmnctl

$ opmnctl startall

2. Check the status of each ias-component to make sure it has running well.
I use this command line:

$ opmnctl status

Processes in Instance: frs.appserver.plitasoft.com
-------------------+--------------------+-------+---------
ias-component | process-type | pid | status
-------------------+--------------------+-------+---------
OC4J | OC4J_BI_Forms | 5437 | Alive
OC4J | home | 5426 | Alive
WebCache | WebCacheAdmin | 5347 | Alive
WebCache | WebCache | 5360 | Alive
HTTP_Server | HTTP_Server | 5349 | Alive
dcm-daemon | dcm-daemon | N/A | Down
LogLoader | logloaderd | N/A | Down

From the table above we can see the status for each process.
The dcm-daemon and LogLoader component is optional.
So we have successed to start the Oracle Form Reports Server

If some of the ias-component in status Down,
for example the ias-component OC4J is Down
we can start the component with the command line:

$ opmnctl startproc ias-component=OC4J

If we need to stop the ias-component,
for example the ias-component OC4J is Alive
we can stop the component with the command line:

$ opmnctl stopproc ias-component=OC4J