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


Mandatory Item Settting on Oracle Developer 10g

I work with Oracle Form Developer 10g, then I want the color of mandatory item is different from other item. For this need I modify the configuration file, Registry.dat on (ORACLE HOME) /forms90/java/oracle/forms/registry where the (ORACLE HOME) is the path of the installation. For example, if the path of installation is /oracle/app/dev10g then the full path location of configuration file, Registry.dat is:


/oracle/app/dev10g/forms90/java/oracle/forms/registry


I modify the entry

app.ui.requiredFieldVA=false

become:

app.ui.requiredFieldVA=true

Then I also set its color, modify the entry
app.ui.requiredFieldVABGColor with the specified color, where the color is in rgb.
For example, if I want to change the color to be red (255,0,0) then the entry should be like below:

app.ui.requiredFieldVABGColor=255,0,0

Prepare for Oracle Designer DB Repository

I'd like to use Oracle Designer 10g for reverse engineering my existing Oracle 10g database. But it need a database repository with properly setting on Oacle Database Initialization Parameters. The following are the recommended minimum settings:


compatible = 9.0.0 # for an Oracle9i database
compatible = 8.1.7 # for an Oracle8i database
max_enabled_roles = 30
sort_area_size = 262144
sort_area_retained_size = 65536

hash_area_size = 1048576
optimizer_index_caching = 50
optimizer_index_cost_adj = 25
shared_pool_size = 32000000

db_block_buffers # comment out on an Oracle9i database
db_block_buffers = 2000 # on an Oracle8i database
open_cursors = 3000
processes = 100
db_file_multiblock_read_count=16 # for a 4K Oracle block size
db_file_multiblock_read_count=32 # for a 2K Oracle block size
db_file_multiblock_read_count=8 # for a 8K Oracle block size

To check the value of any database initialization parameter do the following step:
1. Connect to the database using SYS acount with AS SYSDBA clause. Example:

$ sqlplus "/as sysdba"

2. Show the parameter value with the command show parameter parameter_name. Example:
SQL>show parameter max_enabled_roles

If the value smaller than the value stated above, then set the parameter value by the following step:
1. Alter system and set param_name = param_value with scope = spfile. Example:

SQL> alter system set max_enabled_roles = 30 scope = spfile;

2. The change will efect after restart the database. So, the next step is restart the database.

Until this step, It is ready for Installation of database repository needed by Oracle Designer.