Tuesday, 20 November 2012

All Querries and scripts go to http://www.shutdownabort.com

To RESET A PASSWORD OF A USER

alter user user_name identified by new_password;
 
eg:
  
alter user ram identified by ram123;

Monday, 19 November 2012


CROSS CHECK DATABASE ARCHIVELOG FILES


Resolution:


The preferred method would be to run a crosscheck against the target database using RMAN.  To do this, start an RMAN session and connect to the target database as well as the recovery catalog.

For example:


RMAN> connect target sys/passwd@targetdb

RMAN> connect catalog rman/rman@rcat


Then issue either of the following two RMAN commands:


RMAN> change archivelog all crosscheck;

 or

RMAN> crosscheck archivelog all;


A session running a crosscheck would look like the example below:


[orahawk@hawk]$ rman target sys/sys@hawkdb catalog rman9i/rman9i@rcat

Recovery Manager: Release 9.2.0.1.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database: HAWKDB (DBID=1675444669)
 connected to recovery catalog database

RMAN> crosscheck archivelog all;

allocated channel: ORA_DISK_1
 channel ORA_DISK_1: sid=16 devtype=DISK
 validation succeeded for archived log
 archive log filename=/opt/OraHome2/dbs/arch1_59.dbf recid=298 stamp=584875495
 validation succeeded for archived log
 archive log filename=/opt/OraHome2/dbs/arch1_60.dbf recid=299 stamp=585039020
 validation failed for archived log
 archive log filename=/opt/OraHome2/dbs/arch1_61.dbf recid=300 stamp=585206201
 validation succeeded for archived log
 archive log filename=/opt/OraHome2/dbs/arch1_62.dbf recid=301 stamp=585373816
 validation succeeded for archived log
 archive log filename=/opt/OraHome2/dbs/arch1_63.dbf recid=302 stamp=585542363
 validation succeeded for archived log
 archive log filename=/opt/OraHome2/dbs/arch1_64.dbf recid=303 stamp=585680372
 validation succeeded for archived log
 archive log filename=/opt/OraHome2/dbs/arch1_65.dbf recid=304 stamp=585742234
 validation succeeded for archived log
 archive log filename=/opt/OraHome2/dbs/arch1_66.dbf recid=305 stamp=585742245
 validation succeeded for archived log
 archive log filename=/opt/OraHome2/dbs/arch1_67.dbf recid=306 stamp=585742434
 Crosschecked 9 objects

RMAN>


Another method would be to uncatalog the logs from RMAN.  If only one archive log file is missing, it can be "uncataloged" from RMAN so it doesn't try to backup the file.  If there are a number of missing logs, then all the logs can be uncataloged from RMAN.  A FULL backup of the database MUST follow to ensure recoverability.  This process does not require shutting down the target database.  The process to do this is as follows:

 To uncatalog the archive log, connect to the catalog using RMAN from the target database server.

Then uncatalog the archive log using the following RMAN command substituting the FULL PATH to the file for <ARCHIVELOG FILE> using quotes.


RMAN> change archivelog <ARCHIVELOG FILE> uncatalog;


If there are too many logs missing then the word all can be used for the file descriptor and all logs will be uncataloged.


RMAN> change archivelog all uncatalog;


If scheduled downtime can be achieved another method is to reset the catalog & database.  This requires shutting the database down and restarting it in mount mode.  Issue a recover database using backup control file until cancel.  Then alter database open reset logs.  After which from rman, reset database.  This will reset the archive logs back to 1 and resync it with the catalog.

On the Target Database server, shut down the database, then startup the database in mount mode.  Connect to the database and run the following.


sqlplus> startup mount
 sqlplus> recover database using backup controlfile until cancel;
 sqlplus> cancel;
 sqlplus> alter database open resetlogs;
 sqlplus> exit


This resets the Archive logs on the database back to 1.

 To reset the catalog, connect to it from the target database server:


(This example assumes a catalog connect string of rman/rman@rcatdb and a database connect string of internal/internal@hawkdb)


Substitute with your actual connect strings.


On the Target Server issue the following command at the command prompt:


rman catalog rman/rman@rcatdb target internal/internal@hawkdb


This will connect to the catalog and output something like the following:


[oraclece@hawk]$ rman catalog rman/rman@rcatdb target internal/internal@hawkdb
     Recovery Manager: Release 8.1.6.0.0 - Production
 RMAN-06005: connected to target database: HAWKDB (DBID=1548722245)
     RMAN-06008: connected to recovery catalog database
 RMAN>


To reset the database in the catalog, issue the following command at the RMAN prompt:


RMAN> reset database;

URL:

All Querries and scripts go to http://www.shutdownabort.com

Thursday, 1 November 2012

File Versions Script in Oracle

SELECT fi.file_id,
filename,
version
FROM apps.ad_files fi,
apps.ad_file_versions ve
WHERE filename LIKE 'POXRESPO%'
AND ve.file_id = fi.file_id
AND version =
(SELECT MAX(version)
FROM apps.ad_file_versions ven
WHERE ven.file_id = fi.file_id
)


Replace the files without extension for other files in 'POXRESPO'


Output : 


   FILE_ID        FILENAME                     VERSION

--------------------------------------------------------------------
     23562        POXRESPO.pls              110.72.12010000.5

    194753      
POXRESPO
.pls              115.22


Sunday, 7 October 2012

DATABASE BACKUP USING RMAN
Hot backup means, taking the backup of the database while it is up running.

1. DB_HOT_BACKUP Script 

vi Backuprman.rc
---------------------------------------
run
{
allocate channel chnl1 device type disk;
allocate channel chnl2 device type disk;
backup database;
backup archivelog all;
backup current controlfile;
release channel chnl1;
release channel chnl2;
}
----------------------------------------

$ rman target sys/<sys passwd> @Backuprman.rc

Note :
1) here i have not specified any location for backup so it goes to default location. For details, please run “show all” command so that you will come to know where backup will go.
2) ensure that “controlfile autobackup is on;” If not please change the same using following command @ RMAN prompt.
CONFIGURE CONTROLFILE AUTOBACKUP ON;


2. Compressed DB_HOT_BACKUP Script 

run
 {
allocate channel T1 type disk format 'E:\SPMATBACKUP\%d_%T_%t_%s';
allocate channel T2 type disk format 'E:\SPMATBACKUP\%d_%T_%t_%s';
backup as COMPRESSED BACKUPSET check logical database;
release channel T1;
release channel T2;
allocate channel T1 type disk format 'E:\SPMATBACKUP\ARCH_%T_%t_%s';
backup as COMPRESSED BACKUPSET archivelog all not backed up;
release channel T1;
}
allocate channel for maintenance type disk;
delete noprompt obsolete device type disk;
release channel;





Copying a package from one Schema to Another


The following script shows how to copy the package from one schema to another:


1.Source Database run the below script

SQL>

SET PAGESIZE 10000
SET feedback OFF
SET heading OFF
SET echo OFF
spool \Package.sql

SELECT TEXT
FROM USER_SOURCE
WHERE NAME = 'MY_PACKAGE';

spool OFF
SET echo ON
SET feedback ON
SET heading ON 


Copy the Package.sql file from source to destination using scp

scp Package.sql root@testdatabase2.com:/oracle/

2.Destination Database(testdatabase2)

SQL>

@d:\Package.sql




Steps to run Autoconfig in Oracle Apps R12 adautocfg.sh

Autoconfig is tool/utility to reconfigure your Oracle Application configuration files using context (XML file) and template files
This post covers steps to run Autoconfig in Oracle Apps R12 (
.
A) Running Autoconfig on R12 environment Application Tier
1. Login as user owning application tierfor R12 (usually applmgr)
2. Set environment variable by executing env file $INSTALL_BASE/ apps/ apps_st/ appl/ APPL[$SID]_[$hostname].env
3. cd $ADMIN_SCRIPTS_HOME  (or $INSTALL_BASE/apps/$CONTEXT_NAME/ admin/ scripts)
4. run adautocfg.sh (Autoconfig script)
./adautocfg.sh5. Supply apps password when prompted.
.
B) Running Autoconfig on R12 environment Database Tier

1.Login as user owning database tier for R12 (usually oracle)

2. Set environment variable by executing env file $INSTALL_BASE/ db/ tech_st/ [11.1.0 or 10.2.0]/ [$SID]_[$hostname].env
3. cd $ORACLE_HOME/ appsutil/ scripts/ $CONTEXT_NAME
4. run adautocfg.sh (Autoconfig script)
./adautocfg.sh
5. Supply apps password when prompted
.
.
Things good to know about Autoconfig in R12
1. 
Autoconfig logs for R12 application tier are at
$INSTALL_BASE/inst/apps/$CONTEXT_NAME/admin/log/$MMDDHHMM/adconfig.log ($INST_TOP/admin/log/[$MMDDhhmm])
2. Autoconfig logs for R12 Database tier are at
[$RDBMS_ORACLE_HOME]/appsutil/log/[$CONTEXT_NAME]/[$MMDDhhmm]/adconfig.log
3. R12 system is autoconfig enabled and uses context file stored in [INST_TOP]/appl/admin/[CONTEXT_NAME].xml (Application Tier)
and
[$DATABASE_ORACLE_HOME]/appsutil/[$CONTEXT_NAME].xml (Database Tier)
.
Related
  • 387859.1  Using AutoConfig to Manage System Configurations in Oracle E-Business Suite Release 12


Tracking the Oracle Database Growth

SQL> 
select b.tsname tablespace_name , MAX(b.used_size_mb) cur_used_size_mb , round(AVG(inc_used_size_mb),2)avg_increas_mb  from  ( SELECT a.days,a.tsname , used_size_mb , used_size_mb - LAG (used_size_mb,1) OVER ( PARTITION BY a.tsname ORDER BY a.tsname,a.days) inc_used_size_mb
from ( SELECT TO_CHAR(sp.begin_interval_time,'MM-DD-YYYY') days  ,ts.tsname ,MAX(round((tsu.tablespace_usedsize* dt.block_size )/(1024*1024),2)) used_size_mb
from dba_hist_tbspc_space_usage  tsu , dba_hist_tablespace_stat  ts ,dba_hist_snapshot  sp, dba_tablespaces  dt   where tsu.tablespace_id= ts.ts# AND tsu.snap_id = sp.snap_id
AND ts.tsname = dt.tablespace_name AND sp.begin_interval_time > sysdate-7
GROUP BY TO_CHAR(sp.begin_interval_time,'MM-DD-YYYY'), ts.tsname
ORDER BY ts.tsname, days ) a
) b GROUP BY b.tsname ORDER BY b.tsname;

 Output : 




TABLESPACE_NAME                CUR_USED_SIZE_MB AVG_INCREAS_MB
------------------------------ ---------------- --------------
APPS_TS_ARCHIVE                          6080.5              0
APPS_TS_INTERFACE                        872.13              0
APPS_TS_MEDIA                             38483              0
APPS_TS_NOLOGGING                        188.25              0
APPS_TS_QUEUES                           414.25              0
APPS_TS_SEED                            2725.75              0
APPS_TS_SUMMARY                             670              0
APPS_TS_TOOLS                               .13              0
APPS_TS_TX_DATA                           55249         726.15
APPS_TS_TX_IDX                         50169.63         774.18
APPS_UNDOTS1                            3484.19         329.85

TABLESPACE_NAME                CUR_USED_SIZE_MB AVG_INCREAS_MB
------------------------------ ---------------- --------------
CTXD                                      11.72              0
INTERIM                                     .13              0
ODM                                        9.56              0
OLAP                                      15.69              0
OWAPUB                                      .08              0
PORTAL                                      .47              0
PROD_BIPLATFORM                               2              0
PROD_MDS                                   4.44              0
SYSAUX                                  1790.81          -2.01
TAXWARE                                  422.06              0
XXYDL                                      3.06              0

22 rows selected.


Concurrent Program creation and add it to Request Group
Overview:
  • Develop a report or PL/SQL Package to register as a concurrent program
  • Create Executable: Link it to Report file(.rdf) or PL/SQL Package created
  • Create Concurrent Program: Link to it executable defined in previous step
  • Enter Parameters and link Value Sets
  • Assign the registered Concurrent Program to a request group
Creating Executable:
Navigation: Login into Oracle Applications –> Go to Application Developer Responsibility –> Concurrent –> Executable

Here we will register oracle report as a concurrent program

FIELDS:
  • Executable: This is User Understandable Name
  • Short Name: This is Unique and for system reference
  • Application: Under which application you want to register this Conc. Program
  • Description: Description
  • Execution Method: Based on this field, your file has to be placed in respective directory or database.
  • Execution File Name: This is the actual Report file name. If you register a PL/SQL Procedure in a package you have to give the packagename.procedure. You don’t need to specify any parameters in procedure here.
Action: Save
Create Concurrent Program:
Navigation: Application Developer –> Concurrent –> Program


FIELDS:
  • Program: User Understandable Program Name
  • Short Name: This should be unique name and for system reference
  • Application: Enter the application under which you want to register this conc.prog
  • Executable Name: Enter the User Understandable Executable Name
  • Method: This will be populated automatically from Executable Definition
  • Output Format: Select the format of the output you want
  • Output Style: Select A4 to print on A4 Paper
  • Printer: You can default any printer or you can enter while submitting concurrent program.
DEFINE PARAMETERS AND VALUE SETS
Navigation: click on Parameters button in above screen

FIELDS:
  • Seq: It’s always better to enter sequences in multiple of 5 or 10. So that you can insert any additional parameters if you want later in middle.
  • Parameter: Name the Parameter Field. This is for system reference
  • Description: You can see this description while submitting the conc.prog.
  • Value set: “15 Characters” is the standard value set for Character input parameters
  • Default Type: This field is not mandatory. If you want to default any particular value to save time while submitting the concurrent program you can do so here.
  • Prompt: This is the actual message displayed while submitting the conc.prog
  • Token: This is used to link this parameter to the parameter defined in actual report file(.rdf)
Action: Save
Assign this Concurrent Program to a request group:
Navigation: Switch to “System Administrator” Responsibility –> Security –> Responsibility –> Request

Action: Open/Double click

Action: Press F11

Action: CTRL+F11

Action: Select the First record in the “Requests” and then File –> New

Action: Enter Your User Readable Name of your concurrent program

Action: Save
Now Your Concurrent Program is ready to use from the responsibilities having” Purchasing Reports” as Request Group. 

Sunday, 9 September 2012

Health Check Scripts for R12 APPS/DB
1.Display disk free space in Linux
         df -h
2.Display Memory Usage in Linux
         free -m
3.List the processes running on the system & to check load averages
         top
4.Process status of the database
         ps -ef | grep pmon
5.Process status of the listener
         ps -ef | grep tns

6.sqlplus / as sysdba

6(i).To find the size of the tablespaces

set pages 999
col tablespace_name format a40
col "size MB" format 999,999,999
col "free MB" format 99,999,999
col "% Used" format 999
select tsu.tablespace_name, ceil(tsu.used_mb) "size MB"
, decode(ceil(tsf.free_mb), NULL,0,ceil(tsf.free_mb)) "free MB"
, decode(100 - ceil(tsf.free_mb/tsu.used_mb*100), NULL, 100,
               100 - ceil(tsf.free_mb/tsu.used_mb*100)) "% used"
from (select tablespace_name, sum(bytes)/1024/1024 used_mb
from dba_data_files group by tablespace_name union all
select tablespace_name || '  **TEMP**'
, sum(bytes)/1024/1024 used_mb
from dba_temp_files group by tablespace_name) tsu
, (select tablespace_name, sum(bytes)/1024/1024 free_mb
from dba_free_space group by tablespace_name) tsf
where tsu.tablespace_name = tsf.tablespace_name (+)
order by 4
/

6(ii).To find the Database size 

col "Database Size" format a20
col "Free space" format a20
col "Used space" format a20
select round(sum(used.bytes) / 1024 / 1024 / 1024 ) || ' GB' "Database Size"
, round(sum(used.bytes) / 1024 / 1024 / 1024 ) - 
round(free.p / 1024 / 1024 / 1024) || ' GB' "Used space"
, round(free.p / 1024 / 1024 / 1024) || ' GB' "Free space"
from    (select bytes
from v$datafile
union all
select bytes
from v$tempfile
union all
select bytes
from v$log) used
, (select sum(bytes) as p
from dba_free_space) free
group by free.p
/

6(iii).To find the INVALID objects
select count (*) from dba_objects where status='INVALID';

6(iv).To find the location of the alertlog files
show parameter background_dump_dest;

7.To find the total library process running
ps -fu $LOGNAME | grep -i libr | wc -l


OAD stopped error while starting APPS11i
While i am trying to start the APPS 11i i got this error with exit status 1.

/ebiz/alsumora/8.0.6/vbroker/bin/osagent
Started osagent.
Osagent logs messages to the file /ebiz/alsumora/8.0.6/discwb4/util/osagent.log.
Waiting for OAD to start...
Started OAD.
OAD logs messages to the file /ebiz/alsumora/8.0.6/discwb4/util/oad.log.
Failed to start locator.
Cannot bind to OAD. Re-starting...

OAD is stopped
Osagent is stopped
Unable to stop locator. No process-id  file found.
Unable to stop gatekeeper. No process-id  file found.
Unable to stop any Discoverer Sessions. No process-id  file found.
Unable to stop any Discoverer Preference. No process-id  file found.
Unable to stop any Discoverer Collector. No process-id  file found.
/ebiz/alsumora/8.0.6/vbroker/bin/osagent
Started osagent.
Osagent logs messages to the file /ebiz/alsumora/8.0.6/discwb4/util/osagent.log.
Waiting for OAD to start...
Started OAD.
OAD logs messages to the file /ebiz/alsumora/8.0.6/discwb4/util/oad.log.
Failed to start locator.
Registering Discoverer Session
Registering the Collector
Applying preferences from file : /ebiz/alsumora/8.0.6/discwb4/util/pref.txt
Finished applying preferences
Registering Discoverer Preference Repository

addisctl.sh: exiting with status 1


.end std out.
/ebiz/alsumora/8.0.6/jre1183o/lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM
/ebiz/alsumora/8.0.6/jre1183o/lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM
/ebiz/alsumora/8.0.6/jre1183o/lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM
/ebiz/alsumora/8.0.6/jre1183o/lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM
/ebiz/alsumora/8.0.6/jre1183o/lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM
/ebiz/alsumora/8.0.6/jre1183o/lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM
Memory fault
/ebiz/alsumora/8.0.6/jre1183o/lib/i686/green_threads/libzip.so: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference (libzip.so)
Unable to initialize threads: cannot find class java/lang/Thread
Could not create Java VM

.end err out.

****************************************************


Check logfile /ebiz/alsumcomn/admin/log/ALSUM_oracle11i/04131720.log for details

Exiting with status 1

The solution for the above error is to change / assume the kernel version

SOLUTION:
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL


Wednesday, 5 September 2012

Oracle  Archive Log Mode  

General
Note: Archive logging is essential for production databases where the loss of a transaction might be fatal. It is generally considered unnecessary in development and test environments.
Init.ora Parameters

Configure for multiple archiver processes
log_archive_max_processes=<integer>;
SELECT value
FROM gv$parameter
WHERE name = 'log_archive_max_processes';

ALTER SYSTEM SET log_archive_max_processes=3;

SELECT value
FROM gv$parameter
WHERE name = 'log_archive_max_processes';
Startup The Database In Archivelog Mode

Steps Required To Take A Database Not In Archive Log Mode And Alter It To Archive Log Mode
SELECT log_mode
FROM v$database;

SHUTDOWN;

STARTUP MOUNT EXCLUSIVE;

ALTER DATABASE ARCHIVELOG;

ALTER DATABASE OPEN;

SELECT log_mode
FROM v$database;
Startup The Database In NoArchivelog Mode

Steps Required To Take A Database In Archive Log Mode And Alter It To No Archive Log Mode
SELECT log_mode
FROM v$database;

SHUTDOWN;

STARTUP MOUNT EXCLUSIVE;

ALTER DATABASE NOARCHIVELOG;

ALTER DATABASE OPEN;

SELECT log_mode
FROM v$database;
Restart After Archiving Logging Failure
Archive Logging RestartSHUTDOWN;

STARTUP;

ARCHIVE LOG START;

ARCHIVE LOG ALL;
Archive Log Related Commands
Start Archive Loggingalter system archive log start;
Stop Archive Loggingalter system archive log stop;
Force archiving of all log filesalter system archive log all;
Force archiving of the current log filealter system archive log current;
Shell Scripts

Move Archive Logs
export ARCH_DIR="/tmp/rim"
NEW_DIR ="/tmp/rim/new_dir"
export FILE_EXT="arc"
export MOVELIST="/tmp/move.list"
export CALF="/tmp/calc.tmp"
export TMPF="/tmp/workfile.tmp"
CMD="ls -ltr $ARCH_DIR/*.$FILE_EXT | awk {'print $9'}
    | sort -r > $TMPF"
export FILE_COUNT="

echo "Number of files found is $FILE_COUNT"
cat $TMPF
echo $FILE_COUNT< - 1" > $CALF
echo "quit" >> $CALF
MOVE ="/usr/bin/bc/ $CALF"
echo "Number of files to move is $MOVE"
/usr/bin/tail -$MOVE $TMPF > $MOVELIST
echo "File to be moved"
cat $MOVELIST
while read FILE
do

echo "Moving file $FILE to $NEW_DIR"
done < $MOVELIST
Start / Stop Services in Oracle Applications R12 ( Database & Application Tier)

Step by step instructions of How to Start/Stop services in Oracle Applications R12 are shown Below.

Specifications :

Application Tier O.S. User : applmgr (applmgr is default password )
Database Tier O.S. User : oracle (oracle is default password )
R12 install base : /oracle/apps/r12/Testr12
Database SID : Test
Database Version : 11.1.0
Hostname : hostr12
Operating System : Unix/Linux
Apps Schema Password : apps (apps is default password) 

1.Start-Up Order :
1.1.Start the database tier
1.2.Start the Application tier.

2.Shut-down Order :
2.1.Stop the Application tier
2.2.Stop the  database  tier.

1.Start-Up Order:
1.1.Start Database Tier
    (i) Login as database tier user (oracle)
    (ii) Set environment variable 
           - cd /oracle/apps/r12/Testr12/db/tech_st/11.1.0 ( $Home/db/tech_st/11.1.0 )
           - . Test_hostr12.com ( $SID_hostname.env  )
    (iii) Start database
          - sqlplus “/as sysdba”
          - SQL> startup
    (iv) 
Start Database Listener (lsnrctl start $SID)
           - lsnrctl start Test

1.2.Start Application Tier
    (i) Login as application tier user (oracle)
    (ii) Set environment variable 
           - cd /oracle/apps/r12/Testr12/apps/apps_st/appl
           - . Test_hostr12.com ( $SID_hostname.env  )
    (iii) Start Application Tier 
           - cd $ADMIN_SCRIPTS_HOME
           - . /adstrtal.sh apps/apps  (adstrtall.sh apps/appspassword)

2.Shut-down Order : 
2.1.Stop the Application tier
    (i) Login as application tier user (oracle)
    (ii) Set environment variable 
           - cd /oracle/apps/r12/Testr12/apps/apps_st/appl
           - . Test_hostr12.com ( $SID_hostname.env  )
    (iii) Stop Application Tier 
          - cd $ADMIN_SCRIPTS_HOME
          - . /adstpall.sh apps/apps  (adstpall.sh apps/appspassword)

2.2.Stop the  database  tier
    (i) Login as database tier user (oracle)
    (ii) Set environment variable 
           - cd /oracle/apps/r12/Testr12/db/tech_st/11.1.0 ( $Home/db/tech_st/11.1.0 )
           - . Test_hostr12.com ( $SID_hostname.env  )
    (iii) Stop database
          - sqlplus “/as sysdba”
          - SQL> Shutdown immediate
    (iv) 
Stop Database Listener 
           - lsnrctl stop Test


Delete Apache log files :
Stop the Apache.
delete all the log files from
$IAS_ORACLE_HOME/Apache/Apache/logs
$IAS_ORACLE_HOME/Apache/Jserv/logs/jvm
$IAS_ORACLE_HOME/Apache/Jserv/logs
Start the Apache