Posted by: Raed Aziz | June 24, 2007

Start up & Shutdown E-business

Hi all,

So many people (especially junior DBAs and developers) think that the shutdown and start up process for E-business is just a mater of running their scripts? and they completely ignore the order of this process, yes the order is very important, at one of my previous projects the Apps DBA there was kind of a terminator! When he needs to shutdown his apps he just do it in 2 simple steps as the following:

1- Stop the DB immediately.

2- Use kill -9 to kill all other processes.

This is completely wrong, because:

This will effect the concurrent manager & Apache, believe me if you face one of idiot issues with one of them you will be in a very bad situation specially if you try to clean the concurrent by using SQL script and when you try to start it and check it on the application and see that there is NO MANAGER :( . I like this word only if its meaning my line manager :) but not the concurrent.

 

The normal and recommended way to shutdown and start up the E-business suite is:

Start up procedure:

Log in by oracle user to start up dbTier:

1- start up the DB by run addbctl.sh start

2- Start up the nls by run addlnctl.sh start <nlsname>

Log in by applmgr user to start up appsTier:

1- start up the Apps by run adstrtal.sh.

Shutdown procedure:

Log in by applmgr user to shutdown appsTier:

1- Shutdown apps by run adstpall.sh.

2- wait for sometime and check for any concurrent or Apache process whether they are still running or not, if so kill it by using kill -9, you can check by use the following unix commands:

ps –ef |grep http ——– for apache

ps –ef |grep FND ——– for concurrent

Log in by oracle user to stop dbTier:

1- Shutdown the nls by run addlnctl.sh stop <nlsname>

2- Shutdown the db by run addbctl.sh stop

Note: if you plan to make cloning then you have to stop the db in normal mode:

./addbctl.sh stop normal

To be continue…

 

Posted by: Raed Aziz | March 17, 2007

How to compile invalid objects

This is a simple post to learn how to compile invalid objects.

 

My suggestion is to do these steps daily (to keep ur self away from any expecting

 

Emails or phone calls) ):

 

1- log in to unix or linux as applmgr user.

 

2-Find the number of invalid objects:

 

SQL>sqlplus apps/passwd

 

 

SQL>select count(*) from dba_objects where status=’INVALID’;

 

 

You can use utlrp.sql script to compile invalid objects

 

$cd $ORACLE_HOME/rdbms/admin

 

SQL>@utlrp.sql

 

 

After that check again by using same sql statement

 

SQL>select count(*) from dba_objects where status=’INVALID’;

 

update

 

If still have invalid objects then start adadmin utility, when you start adadmin you’ll have to answer a set of questions.

 

e.g:

 

login: applmgr
Password:
Last login: Mon Jun 11 10:33:05 from 172.18.1.19
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have new mail.
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have new mail.
$ adadmin

 

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

 

Oracle Applications AD Administration

 

Version 11.5.0

 

NOTE: You may not use this utility for custom development
unless you have written permission from Oracle Corporation.

 

Your default directory is ‘/u01/wfm/wfmdevappl’.
Is this the correct APPL_TOP [Yes] ?

 

AD Administration records your AD Administration session in a text file
you specify. Enter your AD Administration log file name or press [Return]
to accept the default file name shown in brackets.

 

Filename [adadmin.log] :

 

************* Start of AD Administration session *************
AD Administration version: 11.5.0
AD Administration started at: Mon Jun 11 2007 15:53:27

 

APPL_TOP is set to /u01/wfm/wfmdevappl

 

You can be notified by email if a failure occurs.
Do you wish to activate this feature [No] ?
Please enter the batchsize [1000] :

 

Please enter the name of the Oracle Applications System that this
APPL_TOP belongs to.

 

The Applications System name must be unique across all Oracle
Applications Systems at your site, must be from 1 to 30 characters
long, may only contain alphanumeric and underscore characters,
and must start with a letter.

 

Sample Applications System names are: “prod”, “test”, “demo” and
“Development_2″.

 

Applications System Name [wfmdev] : wfmdev *

 

NOTE: If you do not currently have certain types of files installed
in this APPL_TOP, you may not be able to perform certain tasks.

 

Example 1: If you don’t have files used for installing or upgrading
the database installed in this area, you cannot install or upgrade
the database from this APPL_TOP.

 

Example 2: If you don’t have forms files installed in this area, you cannot
generate them or run them from this APPL_TOP.

 

Example 3: If you don’t have concurrent program files installed in this area,
you cannot relink concurrent programs or generate reports from this APPL_TOP.

 

Do you currently have files used for installing or upgrading the database
installed in this APPL_TOP [YES] ? YES *

 

Do you currently have Java and HTML files for HTML-based functionality
installed in this APPL_TOP [YES] ? YES *

 

Do you currently have Oracle Applications forms files installed
in this APPL_TOP [YES] ? YES *

 

Do you currently have concurrent program files installed
in this APPL_TOP [YES] ? YES *

 

Please enter the name Oracle Applications will use to identify this APPL_TOP.

 

The APPL_TOP name you select must be unique within an Oracle Applications
System, must be from 1 to 30 characters long, may only contain
alphanumeric and underscore characters, and must start with a letter.

 

Sample APPL_TOP Names are: “prod_all”, “demo3_forms2″, and “forms1″.

 

APPL_TOP Name [towerd1] : towerd1 *

 

You are about to use or modify Oracle Applications product tables
in your ORACLE database ‘wfmdev’
using ORACLE executables in ‘/u01/wfm/wfmdevora/8.0.6′.

 

Is this the correct database [Yes] ?
AD Administration needs the password for your ‘SYSTEM’ ORACLE schema
in order to determine your installation configuration.

 

Enter the password for your ‘SYSTEM’ ORACLE schema:

 

The ORACLE username specified below for Application Object Library
uniquely identifies your existing product group: APPLSYS

 

Enter the ORACLE password of Application Object Library [APPS] :
AD Administration is verifying your username/password.
The status of various features in this run of AD Administration is:

 

<-Feature version in->
Feature Active? APPLTOP Data model Flags
—————————— ——- ——– ———– ———–
CHECKFILE Yes 1 1 Y N N Y N Y
PREREQ Yes 6 6 Y N N Y N Y
CONCURRENT_SESSIONS No 2 2 Y Y N Y Y N
PATCH_TIMING Yes 2 2 Y N N Y N Y
PATCH_HIST_IN_DB Yes 6 6 Y N N Y N Y
SCHEMA_SWAP Yes 1 1 Y N N Y Y Y

 

Identifier for the current session is 23897

 

Reading product information from file…

 

Reading language and territory information from file…

 

Reading language information from applUS.txt …

 

Reading database to see what industry is currently installed.

 

Reading FND_LANGUAGES to see what is currently installed.
Currently, the following languages are installed:

 

Code Language Status
—- ————————————— ———
US American English Base
AR Arabic Install

 

Reading language information from applAR.txt …

 

Your base language will be AMERICAN.

 

Your other languages to install are: ARABIC

 

Setting up module information.
Reading database for information about the modules.
Saving module information.
Reading database for information about the products.
Reading database for information about how products depend on each other.
Reading topfile.txt …

 

Saving product information.

 

AD code level : [11i.AD.I.4]

 

AD Administration Main Menu
————————————————–

 

1. Generate Applications Files menu

 

2. Maintain Applications Files menu

 

3. Compile/Reload Applications Database Entities menu

 

4. Maintain Applications Database Entities menu

 

5. Change Maintenance Mode

 

6. Exit AD Administration

 

Enter your choice [6] :3

 

Compile/Reload Applications Database Entities
—————————————————

 

1. Compile APPS schema

 

2. Compile menu information

 

3. Compile flexfields

 

4. Reload JAR files to database

 

5. Return to Main Menu

 

Enter your choice [5] :1

 

AD utilities can support a maximum of 999 workers. Your
current database configuration supports a maximum of 69 workers.
Oracle recommends that you use between 8 and 16 workers.

 

Enter the number of workers [8] :

 

after that the compiling will start and complete automatically, I preferred to check the log file for any errors.

 

also don’t forget to check if there is more invalid object not compiled as following:

 

$ sqlplus apps/apps

 

SQL*Plus: Release 8.0.6.0.0 – Production on Mon Jun 11 16:03:21 2007

 

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

 

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 – 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 – Production

 

SQL> select count(*) from dba_objects where status=’INVALID’;

 

COUNT(*)
———-
0

 

next time ill discuss how to compile the invalid objects manually.

 

 

 

 

Categories