Tuesday, 9 September 2008

De-Support of RAW devices in Release 12G.

METALINK Note:578455.1

Oracle Server - Enterprise Edition - Version: 12.0 to 12.0
Information in this document applies to any platform.
Oracle Database Server 12g (Not yet released)

De-Support of Raw
This document is to announce the de-support of raw devices in a future Oracle 12 g release. This means customers can no longer keep their datafiles, OCR or Voting disks on raw devices in Oracle 12g.

Monday, 8 September 2008

Oracle DBA/ Oracle Apps DBA interview questions

1. What is oid.
2. What is ocr & voting disk. How you recovery in case of lost this.
3. How to recover pfile without alert file( no pfile, no spfile, no alert file)
4. What is log miner. New features of log miner.
5. Recovery catalog lost how you recover the database with rman.
6. What is sso. How to intergrate with 11i
7. Single node to multi node, vice versa cloning steps.
8. Discoverer upgrade from 4i to 10g.
9. Portal installation. How to intergrate with your internal application.
10. Recover datafile without downtime.
11. What is database replay.
12. What is cache fusion. How it works.
13. How to recover truncate table.
14. What are the new features between 10g & 11g.
15. Please tell the story behind hot backup.
16. How to add datafile while hot backup. Is it possible if yes then how to do it.
17. What is db file sequential read & db file scattered read.
18. How you improve patching performance 10 steps.
19. How to Upgrade 10gR2 database from 9.2.0.5 in EBS 11.5.9 or 11.5.10.2
20 How to apply 11.5.10.2 Maintenance Pack.

METALINK BANK

Note 186981.1 Fequently asked questions
Note 233436.1 SSO/OID Installation Guide
Note 261914.1 SSO/OID Implementation Guide
Note 305918.1 Portal Installation Guide
Note 313418.1 Discoverer installation Guide
Note 207159.1 Documentation Roadmap
Note 223927.1 Statement of Direction
Note:228257.1 RMAN 'Duplicate Database' Feature in Oracle9i / Oracle 10G Note:228257.1
Note 259694.1 Oracle10G RMAN Database Duplication
Note 228257.1 RMAN Duplicate Database in Oracle9i
Note 73912.1 RMAN Creating a Duplicate Database -- Oracle8i
Note 153961.1 - Semaphores and Shared Memory - An Overview
Note.412264.1- How to Backup Partition of Range Partitioned Table with Local Indexes
Note 263599.1 - Understanding and Troubleshooting Instance Load Balancing
Note 262066.1 - How To Size UNDO Tablespace For Automatic Undo Management
Note 268870.1 - How to Shrink the datafile of Undo Tablespace
Note 206007.1 - How To Automate Cleanup Of Dead Connections And INACTIVE
Note 1029252.6 - How to Resize a Datafile
Note 199298.1 - Diagnosing excessive redo generation
Note 359266.1 - FAQ ASMLIB CONFIGURE,VERIFY, TROUBLESHOOT
Note 266028.1 - ASM Using Files Instead of Real Devices on Linux
Note.443835.1- ASM Fast Mirror Resync - Example To Simulate Transient Disk Failure And Restore Disk
Note.438580.1 - How To Move The Database To Different Diskgroup (Change Diskgroup Redundancy)
Note.445037.1 - ASM Fast Rebalance
Note.429098.1- 11g ASM New Feature
Note.451900.1 - ASMCMD - New commands in 11g
Note.431143.1 - ‘WARNING- allocation failure on disk ‘ Messages In Asm Alert Log
Note.419014.1 - ORA-15041 V$ASM_DISK Shows HUNG State for Dropped Disks
NOTE.345180.1 - How to duplicate a controlfile when ASM is involved
Note 158577.1 - NLS_LANG explained
Note 179133.1 - Windows NLS_LANG
Unix NLS_LANG - Metalink doc: 264157.1
Note 340512.1 - Timestamps and time zones - Frequently Asked Questions
Note 227338.1- Character Set Scanner - Frequently Asked Questions
Note 119164.1 - Changing Database Character Set - Valid Superset Definitions
Note 226692.1- Finding out your NLS Setup
Note 264157.1- The correct NLS_LANG setting in Unix Environments
Note 227338.1 - Character Set Scanner - Frequently Asked Questions
Internal Error – ORA-600/ORA -7445
Note 403747.1 - FAQ Physical Corruption
Note: 260459.1 - How to Analyze Problems Related to Internal Errors (ORA-600) and Core Dumps (ORA-7445) using Metalink
Note 41634.1 - Tkprof Simplistic Overview
Note 46234.1- Interpreting Explain planNote 22908.1 - What are Latches and What Causes Latch Contention
NOTE.228913.1- Systemwide Tuning using STATSPACK Reports
NOTE.164504.1- How to Check Why Shutdown Immediate Hangs?
Note 375935.1 - What To Do and Not To Do When ’shutdown immediate’ Hangs
NOTE.35934.1- Cost Based Optimizer - Common Misconceptions and Issues
Note 62365.1 - What to do with “ORA-60 Deadlock Detected” Errors
Note 203238.1- Using Parallel Execution
Note 377847.1- Unsafe Peeked Bind Variables and Histograms
Note 462072.1- File System’s Buffer Cache versus Direct I/O
Note 147468.1 - Checkpoint Tuning and Troubleshooting Guide
Note.458881.1 -Killed Session Hung Consuming 100% CPU
Note.468740.1 - “Pmon Failed To Acquire Latch” Messages in Alert Log -Database Hung
Note.430555.1 - Database Hung With “kksfbc child completion” and “Cursor- Pin X” Waits
NOTE.215858.1- Interpreting HANGANALYZE trace files to diagnose hanging
Note 396940.1- FAQ: ORA-4031
Note.443746.1- Automatic Memory Management(AMM) on 11g
Note 223730.1- Automatic PGA Memory Managment in 9i
Note 220970.1- RAC: Frequently Asked Questions
Note 374540.1 - Quick Guide: How To Set Up Load Balancing
Note 244241.1 - Rolling Patch - OPatch Support for RAC
Note 262004.1 - Configuring RHEL 3 and Oracle 9iR2 32-bit with Hugetlb
Note 260152.1 - Summary About the Large SGA & Address Space on RH Linux
Note 226209.1 - Linux: How to Check Current Shared Memory, Semaphore Values
Note 37914.1 - Raw Devices and Oracle - 20 Common Questions and Answers
Note 110888.1 - How to Trace Unix System Calls
Note 293561.1 - Unix Commands on Different OS’s
Note 18089.1 - UNIX: Connect AS SYSBDA / SYSOPER Privilege on Oracle RDBMS
Note 291686.1 - White Paper on Logminer
Note 157250.1:Freelist Management with Oracle 8i
Note 291686.1 - LogMiner Utility Release 8.1.x - 10g
Note 161549.1 - Oracle Database Server and Networking Patches for Microsoft Platforms
Note 1020945.6 - How to Setup Auditing
Note 70679.1 - How to Audit Logon/Logoff Events with Triggers
Note 222807.1 - How To Audit GRANT ANY PRIVILEGE Or GRANT ANY ROLE
Note 340240.1 - “An Assessment of the Oracle Password Hashing Algorithm”
Note 316889.1 - Complete Checklist for Manual Upgrades to 10gR2
Note 359483.1 Upgrading 9.2.0.6 to 10.1.0.4.2 with 11.5.10.2 Applications
Note 282038.1 Oracle Applications Release 11i with Oracle Database 10g Release 1 (10.1.0)
Note:342035.1 How to Show the Patch History for Merged Patches in OAM Doc ID: Note:342035.1
Note:228779.1 How to Merge Patches Using admrgpch Note:228779.1
Note:432597.1 Reducing Down Time When Applying Patch for Oracle E-Business Applications 11i
Note:231701.1 How to Find Patching History (10.7, 11.0, 11i)
Note:235447.1 Application Install AutoPatch Setup Test
Note:139684.1 Oracle Applications Current Patchset Comparison Utility - patchsets.sh
Note:233436.1 Installing Oracle Application Server 10g with Oracle E-Business Suite Release 11i
Note:362203.1 Oracle Applications Release 11i with Oracle 10g Release 2 (10.2.0)
Note:216205.1 Database Initialization Parameters for Oracle Applications 11i
Note:362135.1 Configuring Oracle Applications 11i with 10g R2 RAC & ASM
Note:257798.1 Using Discoverer 10g with Oracle Applications 11i
Note:139516.1 Discoverer 4i with Oracle Applications 11i
Note:257613.1 How to check the Discoverer versions installed on UNIX platforms
Note:66698.1 How To Create a Discoverer Desktop, Plus or Viewer Debug Trace For All Platforms
Note:118360.1 How To Configure MS Internet Explorer To Use Jinitiator with Discoverer Plus
Note Id:285267.1 Oracle E-Business Suite 11i and Database FAQ
Note Id:177610.1 Oracle Forms in Applications FAQ
Note Id:216664.1 FAQ: Cloning Oracle Applications Release 11i
Note Id:230672.1 Cloning Oracle Applications Release 11i with Rapid Clone
Note Id:364565.1 Troubleshooting RapidClone issues with Oracle Applications 11i
Note Id:398619.1 Clone Oracle Applications 11i using Oracle Application Manager (OAM Clone)
Note Id:186981.1 Oracle Application Server with Oracle E-Business Suite Release 11i FAQ
Note Id:233436.1 Installing Oracle Application Server 10g with Oracle E-Business Suite Release 11i
Note Id:295606.1 Oracle Application Server 10g with Oracle E-Business Suite Release 11i Troubleshooting
Note Id:218089.1 Autoconfig FAQ
Note Id:315674.1 How To Verify if Autoconfig is Enabled on 11.5.x
Note Id:165195.1 Using AutoConfig to Manage System Configurations with Oracle Applications 11i
Note Id:341322.1 How to change the hostname of an Applications Tier using AutoConfig
Note Id:270519.1 Customizing an AutoConfig Environment
Note Id:362203.1 Oracle Applications Release 11i with Oracle 10g Release 2 (10.2.0)
Note Id:220970.1 RAC: Frequently Asked Questions
Note Id:294652.1 E-Business Suite 11i on RAC : Configuring Database Load balancing & Failover
Note Id:312731.1 Configuring Oracle Applications Release 11i with 10g RAC and 10g ASM
Note Id:287176.1 DMZ Configuration with Oracle E-Business Suite 11i
Note Id:377856.1 DMZ Reverse Proxy and Middle Tier In Different Domains
Note Id:123718.1 11i: A Guide to Understanding and Implementing SSL for Oracle Applications
Note Id:340178.1 Enabling SSL with Oracle Application Server 10g and the E-Business Suite
Note Id:243880.1 Shared APPL_TOP FAQ
Note Id:233428.1 Sharing the Application Tier File System in Oracle Applications 11i
Note Id:174436.1 Oracle Applications Patching FAQ
Note Id:224875.1 Installation, Patching & Upgrade Frequently Asked Questions (FAQ's)
Note Id:139684.1 Oracle Applications Current Patchset Comparison Utility - patchsets.sh
Note Id:374915.1 HRMS PATCH INSTALL FAQ
Note Id:130608.1 ADPATCH BASICS
Note Id:314540.1 What Log Files are Generated with Adpatch, and Where are They Located?
Note Id:229423.1 Troubleshooting adpatch complaining of apps.zip existence issues
Note Id:136342.1 How To Apply a Patch in a Multi-Server Environment
Note Id:69336.1 Basic information about Concurrent Managers
Note Id:105133.1 Concurrent Manager Questions and Answers Relating to Generic Platform
Note Id:241370.1 Concurrent Manager Setup and Configuration Requirements in an 11i RAC Environment
Note Id:210062.1 Generic Service Management (GSM) in Oracle Applications 11i
Note Id:189487.1 System Administration FAQ's
Note Id:342332.1 Troubleshooting Login Problems in Oracle Applications 11i (11.5.2 – 11.5.10+)
Note Id:104531.1 Troubleshooting (Report Review Agent)
Note Id:305918.1 Using Oracle Portal 10g with Oracle E-Business Suite 11i
Note Id:233436.1 Installing Oracle Application Server 10g with Oracle E-Business Suite Release 11i
Note Id:114534.996 OFA Single Sign-on through Apps 11i
Note Id:295606.1 Troubleshooting SSO with Oracle Applications

Tuesday, 3 June 2008

Installing Oracle Application Server 10g with Oracle E-Business Suite Release 11i

Installing Oracle Application Server 10g with Oracle E-Business Suite Release 11i Note:233436.1

Upgrading Developer 6i with Oracle Apps 11i (Patchset 18 4948577)

Upgrading Developer 6i with Oracle Applications 11i Doc ID: Note:125767.1

1. Check $OA_HTML/bin/appsweb.cfg . Change the value from http to socket or https.
in xml Form Connection Mode = socket
2. Configure Applications to use Oracle JInitiator 1.1.8.16 or later MetaLink Note
124606.1
3. Developer 6i Patch 4948577
Apps Interop Patch 4888294
HP Tru64 :- 5713544, 4261542, 5216496, 5753922, 6195758.

4. Stop the Forms, Reports, HTTP, and Concurrent Manager Servers.

5. Install the Developer 6i Patch
Copy the files in this patch to your $ORACLE_HOME (8.0.6)
unzip the patch file.
cd $ORACLE_HOME/developer6i_patch18
./patch_install.sh
check the logfile.
cd $ORACLE_HOME/procbuilder60/lib
make -f ins_procbuilder.mk install
cd $ORACLE_HOME/forms60/lib
make -f ins_forms60w.mk install
cd $ORACLE_HOME/graphics60/lib
make -f ins_graphics60w.mk install
cd $ORACLE_HOME/reports60/lib
make -f ins_reports60w.mk install

6. cp –b /developer6i_patch18/bin/genshlib $ORACLE_HOME/bin

7. Apply patch 5713544
sh patch.sh
adrelink.sh force=y "fnd f60webmx"

8. Apply patch 4261542

9. Apply patch 5216496 ( sh patch.sh)

10. Apply patch 5753922
sh patch.sh
adrelink.sh force=y "fnd f60webmx"

11. Apply patch 6195758

12. Relink applications executables
execute adadmin
- Maintain Applications Files Menu
- "Relink Applications program"
- List of product to link: “fnd”
- Generate specific executables ….: “y”
- Relink with debug: “n”
- Enter executables to relink: “f60webmx ar60run ar60runb ar60rund *”

13. Apply intro patch 4888294.

14. select Maintain Applications Files, then select Generate Product JAR Files. Do
not force the regeneration of all JAR files.

15. Start the services.
------------------------------------------------------

Saturday, 31 May 2008

Good Metalinks Notes Configuring Oracle Applications Release 11i with 10g R2 RAC and ASM

1. Note:362135.1 Configuring Oracle Applications Release 11i with 10g R2 RAC and ASM

2. Note:362203.1 Interoperability Notes - Oracle Applications 11i with Oracle
Database 10g Release 2

3. Note 165195.1: Using AutoConfig to Manage System Configurations with Oracle E-
Business Suite 11i.

4. Note 230672.1: Cloning Oracle Applications Release 11i with Rapid Clone

5. Note 240575.1: RAC on Linux Best Practices

6. Note 265633.1: Automatic Storage Management Technical Best Practices

7. http://download.oracle.com/docs/cd/B16981_04/current/html/docset.html
Applications System Administrator's Guide, Release 11i

Friday, 30 May 2008

HOW TO RESET SYSADMIN PASSWORD

How to Reset only the SYSADMIN Password

PROBLEM DESCRIPTION
-------------------
You have forgotten the SYSADMIN applications password and cannot login. You know the apps and applsys passwords but does not want to follow the steps to
reset all passwords since resetting applsys would require re-registering all applications user passwords.

How can you reset only the SYSADMIN password?

SOLUTION DESCRIPTION
--------------------
The applsys password provides the basis for all user passwords so resetting applsys will require re-registering all user passwords.
If there are any other users with System Administrator privileges, then they can reset the SYSADMIN user's password from within applications.
Otherwise SYSADMIN can be reset without affecting other users as follows:
1. Log in to SQL*Plus as applsys
2. Backup FND_USER and FND_ORACLE_USERID tables using
create table FND_USER_BAK as select * from FND_USER;
create table FND_ORACLE_USERID_BAK as select * from FND_ORACLE_USERID;
3. update FND_USER
set ENCRYPTED_FOUNDATION_PASSWORD ='2DF3E509EB6A33F9607959C0976E25D997166FAB694ACDDAE466414791A44411',
ENCRYPTED_USER_PASSWORD='D2FCA9810D86BCA9BE944D3E2E7A4A9E6CDF89AAD633179B701774083F907C13'
where user_name='SYSADMIN';
sql>commit;

The SYSADMIN password is now set to WELCOME.

Thursday, 29 May 2008

10g GRID CONTROL ENTERPRISE MANAGER INSTALLATION.

Set the env for oracle user.

1. Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.1.0/oms; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:/opt/IBMJava2-131/bin:$ORACLE_HOME/bin:$PATH; export PATH
PATH=$PATH:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/opmn/bin; export PATH
PATH=$PATH:$ORACLE_HOME/Apache/Apache/bin; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

2. DISPLAY=:0.0; export DISPLAY

3. ./runInstaller

4. The installation will automatically install an agent in the agent home.

5. Agent installation on another node to connect with this 10g enterprise manager.

6. start and stop services.

To stop all the Grid Control components on a host, follow these steps:

Stop the OMS.

$PROMPT> $ORACLE_HOME/bin/emctl stop oms

Stop the Application Server Control Console, which is used to manage the Oracle Application Server instance used to deploy the Management Service.

$PROMPT> $ORACLE_HOME/bin/emctl stop iasconsole

Stop all the application server components, such as Oracle HTTP Server, OracleAS Web Cache.

$PROMPT> $ORACLE_HOME/opmn/bin/opmnctl stopall

Wait for four to five minutes to ensure that all the OPMN processes are stopped and TCP ports are released.

Change directory to the home directory for the Oracle Management Agent and stop the Management Agent.

$PROMPT> AGENT_HOME/bin/emctl stop agent
----------------------------------------------------------------------------------

To start all the Grid Control components on a host, follow these steps:

$PROMPT> $ORACLE_HOME/bin/emctl start oms

$PROMPT> $ORACLE_HOME/bin/emctl start iasconsole

$PROMPT> $ORACLE_HOME/opmn/bin/opmnctl startall

$PROMPT> AGENT_HOME/bin/emctl start agent

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

APPLICATION FORM METRIC SERVER CLIENT ADDITION IN 11i

NODE A DATABASE + CONCUR
NODE B DATABASE + CONCUR
NODE C PRIMARY WEB NODE
NODE D WEB NODE
NODE E ADD THIS NODE AS A NEW APPLICATION NODE

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

Put the entry of third node in /etc/hosts files of all the remaining current nodes.

2. /etc/services should have read permission.

3. Confirm the following to be present on third node OS :-

ld, ar, cc, make, Perl 5.0, Zip 2.3

4. Check the OS for asynchronous I/O mode.

5. Copy and extract “/oraprod” (APPL_TOP, COMMON_TOP, ORA_TOP) contents from second
application NODE D, to third NODE E mountpount. This node is selected for
cloning, since this node is “form metric server client”.

6. Create the clone context file on third node by using following commands :-
Set the environment
# cd /oraprod/oracle/finprdappl
# . ./APPSORA.env

Run adclonectx.pl

# perl $AD_TOP/bin/adclonectx.pl
contextfile=/oraprod/oracle/finprdappl/admin/SID_HOST.xml

It will generate context file in working directory which will be used for running Autoconfig.

7. Set s_methost to Form Metrics server NODE C.

8. Set s_leastloadedhost to %LeastLoadedHost%

9. Set the third node as Form server node only, i.e. Web server processes will not be running on third node. First application node NODE C is the web entry point for users.

10. Run Autoconfig
# sh $AD_TOP/bin/adconfig.sh contextfile=/oraprod/oracle/finprdappl/admin/
SID_HOST.xml

Start all applications on third NODE E.
-------------------------------------------------------------------------------

SOME USEFUL APPS DBA COMMANDS

PLEASE RUN THESE COMMANDS ON TEST FIRST THEN USE ON PRODUCTION.

Performance Monitoring
----------------------
select sid,serial#,program,status,module,last_call_et from v$session
where last_call_et>18000

select sid,sql_hash_value from v$session where sid in (select sid from v$session_wait where event like 'global cache cr request') order by 2

select sum(blocks*8192)/1024/1024/1024 from v$tempseg_usage

select name , lockid from dbms_lock_allocated

select table_name from dict where table_name like 'HZ%'

select * from gv$resource_limit

select name, kind, partition_name, sum(xnc) from v$cache_transfer
group by name, kind, partition_name order by 4

select JOB,WHAT,NEXT_DATE,BROKEN,INTERVAL from dba_jobs

Temp usage : -- select sum(blocks*8192)/1024/1024/1024 from gv$tempseg_usage

Kill all inactive old sessions
------------------------------
Select 'alter system kill session '''||sid||','||serial#||''';'
from V$session
where
status='INACTIVE'
and type <> 'BACKGROUND'
and SID>100
and last_call_et>18000

killing snipped sessions
------------------------------
--get spid

select p.spid from v$process p,v$session s where s.paddr=p.addr and
s.status='SNIPED'

kill -9 p.spid

select 'kill -9 ' || p.spid from v$process p,v$session s where s.paddr=p.addr and s.status='SNIPED'
and s.username='BOLBOL'


select b1.inst_id, b2.value "GCS CR BLOCKS RECEIVED",
b1.value "GCS CR BLOCK RECEIVE TIME",
((b1.value / b2.value) * 10) "AVG CR BLOCK RECEIVE TIME (ms)"
from gv$sysstat b1, gv$sysstat b2
where b1.name = 'global cache cr block receive time' and
b2.name = 'global cache cr blocks received' and b1.inst_id = b2.inst_id

Kill inactive sessions which are more than 5 hrs old
----------------------------------------------------
select sid,serial#,program,status,module,last_call_et from v$session
where sid>50 and last_call_et>18000 and status='INACTIVE' and type <> 'BACKGROUND'

Long operations
-----------------
select inst_id,sid,serial#, (ELAPSED_SECONDS + TIME_REMAINING) TOTAL_TIME, TIME_REMAINING,
100 - ((TIME_REMAINING/(ELAPSED_SECONDS + TIME_REMAINING)) * 100) PERCENTAGE_COMPLETE
FROM gV$SESSION_LONGOPS WHERE TIME_REMAINING>0


Kill concurrent request processes
---------------------------------
Get oracle_session_id from FND_CONCURRENT_REQUESTS
get sid,serial# from v$session with ausid=oracle_session_id
alter system kill sid,serial#



Set SQL command prompt
-------------------------------------------------
SET SQLPROMPT '&_USER.@&_CONNECT_IDENTIFIER.> '


Kill processes
-----------------------------

kill -9 `ps -ef | grep 'LOCAL=NO' | awk '{ print $2 }'`

kill -9 `ps -ef | grep f60runm | awk '{ print $2 }'`

Waits
-----------------
select event,count(*) from v$session_wait group by event'


To see the applied patches
--------------------------
select count(*) from ad_bugs where BUG_NUMBER='&bug_no';
select count(*) from ad_applied_patches where PATCH_NAME='&patch_name';


To know the patch lebel of a product in APPS
==================================================

select a.application_name,decode(b.status,'I','Installed','S','Shared','N/A') STATUS,PATCH_LEVEL
from APPS.fnd_application_vl a,APPS.fnd_product_installations b
where a.application_id = b.application_id order by 2,1;


To see the free space in tablespaces
------------------------------------
select TABLESPACE_NAME,sum(BYTES)/1024/1024 from dba_free_space
group by TABLESPACE_NAME


To remove/move the file by date
----------------------------
ls -lrt *.gz |grep "Apr 20"|grep "Apr 21"| awk '{print "mv " $9 " copied" }'> mv.sh
ls -lrt *.gz |grep -v xxxxx | awk '{print "mv " $9 " /arch_prd1" }'> mv.sh

ls -l |grep "Jul 20" |awk '{print "rm "$9}' >rmglo.sh

ls -ltr|grep "Feb 7"|grep trc|awk '{print $9}'|xargs -I {} -t rm {}

ls -ltr|grep trc|awk '{print $9}'|xargs -I {} -t rm {}


To kill all FNDLIBR processes
-----------------------------
ps -ef|grep FNDLIBR|grep -v grep | awk '{print "kill -9 " $2}' > killfndlibr.sh


To get the list of files on size basis
--------------------------------------
ls -l |sort +4rn |more


TO copy the files remotely
----------------------------
nohup rcp -p -r oraprosp@kmc2prospsuncrege:/export/ora9.2.0.4_64/* . &


To find out the error in patch log file
------------------------------------------
egrep -i 'ORA-|FRM-|APP-|REP-|Err|Fail|Warn'


For Split
----------
$split -60 amt79_copy.sh amt79_x$ls -l amt79_xa? | awk '{print "nohup ./"$NF" > "$NF".out 2> "$NF".err &"}' > master_amt79_copy.sh$chmod a+x amt79_x*

$ls -l xa* | awk '{print "nohup ./"$NF" > "$NF".out 2> "$NF".err &"}' > master_frsbx_copy.sh



nohup ./xaa > xaa.out 2> xaa.err &
nohup ./xab > xab.out 2> xab.err &



To startup Workflow
--------------------
nohup /oracle/apps/R11isbx/sbxappl/fnd/11.5.0/bin apps/sysuat@uat 0 Y /oracle/apps/R11isbx/sbxappl/fnd/11.5.0/resource/wfmail.cfg &


To Check Work flow process
----------------------------
ps -ef |grep -i wfmail


To Check ULIMIT OutPut
-----------------------
/export/home/oracle: ulimit -a

To cancel running concurrent request
----------------------------------
sqltweof>update fnd_concurrent_requests set PHASE_CODE='C',STATUS_CODE='E' where request_id='3477766';


To find out port number which is in used
----------------------------------------
netstat -a



To test mailx
--------------
echo "Test mail" |mailx -s "test" mailid@mailserver.com

echo "Test Mail from OLM using mailx db node 1 " |mailx -s "Test Mail from OLM using mailx db node 1" rupam.bora@airtel.in
echo "Test Mail from OLM using mailx db node 2 " |mailx -s "Test Mail from OLM using mailx db node 2" rupam.bora@airtel.in

echo "Test Mail from OLM using mailx db node 1 " |mailx -s "Test Mail from OLM using mailx db node 1" crm.dba@airtel.in
echo "Test Mail from OLM using mailx db node 2 " |mailx -s "Test Mail from OLM using mailx db node 2" crm.dba@airtel.in


echo "Test Mail from OLM using mailx db node 1 " |mailx -s "Test Mail from OLM using mailx db node 1" bpsingh@in.ibm.com
echo "Test Mail from OLM using mailx db node 2 " |mailx -s "Test Mail from OLM using mailx db node 2" bpsingh@in.ibm.com

echo "Test Mail from OLM using mailx db node 1 " |mailx -s "Test Mail from OLM using mailx db node 1" manmoha1@in.ibm.com
echo "Test Mail from OLM using mailx db node 2 " |mailx -s "Test Mail from OLM using mailx db node 2" santkum2@in.ibm.com

If patch has been applied on DBTIER and u r getting prereq error on FOrms tier..
Then follow this command while applying patch
---------------------------------------------------
$adpatch options=novalidate,noprereq


To find Java Virtual Machine version :
--------------------------------------
$ java -version

To find OS Version
------------------
$ uname -a


To find Available disk space
-----------------------------
$ df -b


To find Number of CPUs
-----------------------------
$ uname -X

$lsdev -C |grep Process|wc -l

To find Physical RAM on server
-------------
$ prtconf |pg




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

To find the O/S level packages which are installed
=========================================================
pkginfo | grep -i





=================================================================
=================================================================


To know the operating system ...32 bit or 64 bit
------------------------------------------------

/export/home/frcrp: isainfo -v
64-bit sparcv9 applications
32-bit sparc applications
/export/home/frcrp: uname -a
SunOS gecmsn05 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-4
/export/home/frcrp: isainfo -vk
64-bit sparcv9 kernel modules


to extract CPIO file
-------------------------

cpio -idmcv <

In HP to know RAM details
=============================

vishnuvardhan_v: grep -i Physical /var/adm/syslog/syslog.log
vishnuvardhan_v: http://unixguide.net/cgi-bin/unixguide.cgi


# /usr/sbin/dmesg | grep "Physical:" (to know the RAM size on HP)


To know swap size in HP
=======================
# /usr/sbin/swapinfo -a

To know the O/S bit version
=============================

/bin/getconf KERNEL_BITS


prtdiag---location
---------------------------------

/usr/share/man/sman1m/prtdiag.1m
/usr/platform/SUNW,Sun-Fire-V240/sbin/prtdiag
/usr/platform/SUNW,Sun-Fire-V250/sbin/prtdiag
/usr/platform/sun4u/sbin/prtdiag

to know more about the printers
================================

/etc/lp/interfaces
/etc/lp/printers


to know the printer status
----------------------------


# lpstat -p

# lpstat -a

$ lp adstrtal.sh ....to test the pint from unix level
When multiple printers:
lp -d 2105nw_phaser text.out (note the space after the -d)
lpr -P2105nw_phaser text.out (note that there is no space after the -P)

To remove job 469 from the color printer, you would type:
cancel 2105nw_phaser-2241
lprm -P2105nw_phaser 2241

# lpstat -v ---to know the printer names and printer queue names


to know the particular user responsibilities
=============================================
select c.user_id,a.RESPONSIBILITY_ID, b.RESPONSIBILITY_NAME from FND_USER_RESPONSIBILITY a,FND_RESPONSIBILITY_TL b, fnd_user c where c.user_name='HACKLN' and c.user_id=a.user_id and a.RESPONSIBILITY_ID=b.RESPONSIBILITY_ID ;



to check last issued commonds(with reboot comnds also)
=======================================================

last|more



To check the server reboot time from the last reboot
====================================================
uptime


To compile invalid objects in the database.
==============================================
exec utl_recomp.recomp_parallel(4)


TO Unset two task
=====================
unset two_task


CronTab values
===============
minute (0-59),
hour (0-23),
day of the month (1-31),
month of the year (1-12),
day of the week (0-6 with 0=Sunday).


To know Jserv status
======================

http://hostname.domainname:portnumber/servlets/IsItWorking

http://gecmsn05.cf.capital.ge.com:8010/servlets/IsItWorking

To check mailx command
===========================

applprod (PROD)$ mailx -v tejinder.singla@ge.com
Subject: Hello
.
EOT
applprod (PROD)$ tejinder.singla@ge.com... Connecting to smtpmail.corporate.ge.com via relay...
tejinder.singla@ge.com... Deferred: Connection refused by smtpmail.corporate.ge.com

applprod (PROD)$
-------------------------------------------------------

sendmail -V



To move Datafile to another location
========================================

Because of space problems moved '/vg03s1/edwdata/edwdata08.dbf to '/vg03s0/edwdata/edwdata08.dbf


alter tablespace EDWDATA rename datafile '/vg03s1/edwdata/edwdata08.dbf' to '/vg03s0/edwdata/edwdata08.dbf';


Add A Datafile To An Existing Tablespace
========================================
ALTER TABLESPACE ADD DATAFILE '' SIZE K|M;

e.g. ALTER TABLESPACE tools ADD DATAFILE 'c:\oracle\oradata\orabase\tools02.tom' SIZE 20M;


ALTER DATABASE CREATE DATAFILE '' SIZE K|M AS '';

e.g. ALTER DATABASE CREATE DATAFILE 'c:\oracle\oradata\orabase\uwdata03.dbf' AS 'UWDATA';


To add datafile in RAW DEVICES
==================================

to add a datafile in a tablesapce in O&G(for raw devices)


ls -ltr ---to check the datafiles which are existing ..

ls -altr free* ----to check the raw devices which we have in that instance


mv (follow the naming structure with existing datafiles)


go to sql and add a datafile to a tablespace using alter tablespace command with the size of rawdevice file size



To know the package body from a procedure
=============================================

SELECT TEXT FROM ALL_SOURCE WHERE NAME LIKE 'GCFEXT_AP_AUOR2AB1_PKG'


To find the table size
========================

first method----to calculate table size

select sum(bytes)/1024/1024
from dba_segments
where SEGMENT_NAME='TABLE_NAME';


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

second method


analyze table my_table compute statistics;
or
analyze table my_table estimate statitics;

And then, execute the query
select blocks from user_tables where table_name='SIZE';


&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
analyze table tabe_name compute statistics;
and then give
select num_rows,blocks ,empty_blocks as
empty,avg_space,chain_cnt,avg_row_len from dba_tables
where table_name='table_name';
now
blocks * db_block_size = table size

or

select segment_name Table_Name, sum(bytes) / 1024 / 1024 MB from user_segments
Where segment_type = 'TABLE' and Segment_Name like '&Table_search_string'
Group by segment_name;


&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

To know particular user responsibility
=============================================


select c.user_id,a.RESPONSIBILITY_ID, b.RESPONSIBILITY_NAME from FND_USER_RESPONSIBILITY a,FND_RESPONSIBILITY_TL b, fnd_user c where c.user_name='HACKLN' and c.user_id=a.user_id and a.RESPONSIBILITY_ID=b.RESPONSIBILITY_ID ;


To find the any object version like *.pll,fmb and etc
========================================================

- go to the corresponding directory
- execute one of the following commands to get the version of the file
on all platforms (beginning with Oracle Applications v. 11.x) :
adident Header
on Unix :
strings -a | grep Header
on Windows (DOS box) :
find "Header"


To find a file under subdirectorys
=================================

$ ls -R|grep " " (here finding the space in the file/dir name)


1. To determine the physical RAM size, enter one of the following commands:
==========================================================================



Platform Command

AIX #/usr/sbin/lsattr -E -l sys0 -a realmem
HP-UX # grep "Physical:" /var/adm/syslog/syslog.log
Linux # grep MemTotal /proc/meminfo
Solaris # /usr/sbin/prtconf | grep "Memory size"
Tru64 UNIX # /bin/vmstat -P | grep "Total Physical Memory"



2. To determine the size of the configured swap space, enter one of the following commands:
===========================================================================================

Platform Command
AIX # /usr/sbin/lsps -a
HP-UX # /usr/sbin/swapinfo -a
Linux # grep SwapTotal /proc/meminfo
Solaris # /usr/sbin/swap -s
Tru64 UNIX # /sbin/swapon -s



To determine whether the Oracle Inventory group exists, enter the following command:
====================================================================================

AIX, Linux x86, or Linux Itanium:
# more /etc/oraInst.loc
Other operating systems:
# more /var/opt/oracle/oraInst.loc

Remove archives by number , archive format: arch_prd2_2_54375.arc.gz
==========================================================
echo "Enter instance no [1 or 2 ? ] "
read instno
echo "Enter archive no : "
read archno
echo "Deleting archives of instance " $instno " , below seq no : " $archno
for name in `ls *.gz`
do
ino=`echo $name|cut -c9-9`
if [ $ino -eq $instno ]
then
no=`echo $name|cut -c13-17`
if [ $no -lt $archno ]
then
echo " Removing file : " $name
#rm $name
fi
fi
done
#################################################################################

ps -aefo pid,pcpu,vsz,args|awk '{if ($2>1) print $1,$2,$3,$4}'

MULTI NODE TO SINGLE NODE CLONING.

NODE A : (FORM/WEB TIER) PRIMARY NODE Source
NODE B : (CONCURRENT+DB+ADMIN TIER) Source
NODE C : (CONCURRENT+DB+ADMIN TIER) Source
NODE E : FORM/WEB/CONCURRENT+DB+ADMIN TIER Target

SOURCE SYSTEM

1.Login as ora user NODE B
Prepare the source system database tier for cloning $cd /appsutil/scripts/ $perl adpreclone.pl dbTier
2.Login as ora user NODE C
Prepare the source system database tier for cloning
$cd /appsutil/scripts/
$perl adpreclone.pl dbTier
3.Login as appl user NODE A
cd $COMMON_TOP/admin/scripts/context_name1
$perl adpreclone.pl appsTier merge
It will create clone directort in common_top/clone/contextname1

4.Login as appl user NODE B
$cd $COMMON_TOP/admin/scripts/context_name2
$perl adpreclone.pl appltop merge
It will create APPL_TOPs direcory in common_top/clone/appl/contextname2
5.Login as appl user NODE C
$cd $COMMON_TOP/admin/scripts/context_name3
$perl adpreclone.pl appltop merge
It will create APPL_TOPs direcory in common_top/clone/appl/contextname3
6.Copy following from Node A(Primary Forms Tier) to Node E(Target Node)

APPL_TOP
COMMON_TOP
806 ORACLE_HOME
iAS ORACLE_HOME

7.Copy the required files from NODE B & C(SOURCE) to NODE E(TARGET)
$COMMON_TOP/clone/appl/contextname2 (NODE B) to $COMMON_TOP/clone/appl(NODE E)
$COMMON_TOP/clone/appl/contextname3 (NODE C) to $COMMON_TOP/clone/appl(NODE E)

8.From NODE B(Source) and NODE C(Source) to NODE E(TARGET)
Copy the database tier file system
Copy the database (DBF) files from the source to the target system Copy the source database ORACLE_HOME(9.2.0) to the target system

TARGET SYSTEM
1.On Node E (Login as ora user and run the following :- )
Use the following method if database was backup-ed using COLD BACKUP methology
$cd /appsutil/clone/bin
$perl adcfgclone.pl dbTier
Use this method if database was backup-ed using HOT BACKUP methology
$cd /appsutil/clone/bin
$perl adcfgclone.pl dbTechStack
Create the target database control files manually
Start the target system database in open mode
Run the library update script against the database
$cd /appsutil/install/
$sqlplus "/ as sysdba" @adupdlib.sql
where is "sl" for HP-UX, "so" for any other UNIX/LINUX platform
Configure the target database (the database must be open)
$cd /appsutil/clone/bin
$perl adcfgclone.pl dbconfig
Database and DB Listener should be up and running
2.Login as appl user (NODE E)
$cd $COMMON_TOP/clone/bin
$perl adcfgclone.pl appsTier

3.Finishing Task
* Run the following tasks in adadmin for all products:
* generate JAR files
* generate message files
* relink executables
* copy files to destination
* Depending on which tier you chose as the primary node, certain files may be missing. Run
adadmin to verify files required at runtime. If any files are listed as missing files, you must manually copy them to the merged APPL_TOP.
* Remove the temporary directory /clone/appl(NODE E) to reduce disk space usage.

UPGRADE DATABASE 9.2.0.5 TO 10.1.0.3 WITH 11.5.9

Oracle Applications Release 11i with Oracle Database 10g Release 1 (10.1.0)
Doc ID: Note:282038.1
--------------------------------------------------------------------------------
Minimum Req:-
a.Oracle Applications 11.5.9 CU2.
b.Developer 6i Patch set 12.
c.AutoConfig Latest version
--------------------------------------------------------------------------------
Steps:-

1.Patch 3129264 INTEROP PATCH FOR 10.1.0 on 11.5.9 version of Apps.

2.P4337683_11i_TRU64
Minipack 11i.AD.I.2

3. Fresh installation of 10.1.0.2 and apply 10.1.0.3 patch.

4. Create nls/data/9idata directory
Install 10g Listener

5. Apply latest Oracle Patching Tool (OPatch) 2617419

6. Shut down Applications server processes and database listener

7. Database Upgrade Assistant (DBUA). Execute the Database Upgrade Assistant - $ORACLE_HOME/bin/dbua

8. Invalid object compilation ( Min 3 to 4 hours)

9. Modify initialization parameters

10. Run adgrants.sql
sys as sysdba
@$APPL_TOP/admin/adgrants.sql APPLSYS

11. Connect to sqlplus with apps
@$AD_TOP/patch/115/sql/adctxprv CTXSYS

12. perl $AD_TOP/bin/admkappsutil.pl
cp appsutil.zip to New Oracle_home
unzip -o appsutil.zip
perl adbldxml.pl tier=db appsuser=apps appspass=apps
run autoconfig

13. Gather sys statistics
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup restrict;
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 1264892 bytes
Variable Size 415236868 bytes
Database Buffers 645922816 bytes
Redo Buffers 11317248 bytes
Database mounted.
Database opened.
SQL> @/appl/prodappl/admin/adstats.sql
Connected.
-----------------------------------------------------
adstats.sql started at 2006-12-28 14:18:20
---
Checking for the DB version and collecting statistics ...
PL/SQL procedure successfully completed.

---------------------------------------------------
adstats.sql ended at 2006-12-28 15:10:41
---
Commit complete.

14.Re-create grants and synonyms using adadmin

15. Startup the services.

Oracle Discoverer Upgrade from release 4i(4.1.48.06.00) to 10g(10.1.2)

1.Discoverer 10.1.2 must be installed on a standalone server, accessing an Oracle E-Business Suite Release 11i database, or in a separate Oracle Business Intelligence Server 10g Release 2 (10.1.2) ORACLE_HOME on an existing application tier server node.
2.Discoverer 10.1.2 must be installed in a separate ORACLE_HOME on an existing application tier server node or on a stand-alone server, accessing an Oracle E-Business Suite Release 11i database.
3.The following components must be used on the stand alone instance.
Oracle application server 10g Release 2 10.1.2
Oracle Business Intelligence 10.1.2

Section 1: Installation Tasks

This section outlines steps required to install Oracle Business Intelligence Server 10g Release 2, Discoverer 10.1.2, and the Discoverer 10.1.2 End User Layer.
1.1. Install OracleAS Identity Management Infrastructure 10g (10.1.4.0.1)

You must install OracleAS Identity Management Infrastructure 10g (10.1.4.0.1) on a standalone server or in a separate ORACLE_HOME on an existing application tier server node.
1.2. Install Oracle Application Server 10g Release 2 (10.1.2.0.2) type Business Intelligence and Forms

"You must install Oracle Application Server 10g Release 2 (10.1.2.0.2) installation type Business Intelligence and Forms in a seperate ORACLE_HOME from the previously installed OracleAS Infrastructure. During installation of Oracle Application Server 10g Release 2 (10.1.2.0.2) type Business Intelligence and Forms you will be prompted for Oracle Internet Directory details. Please provide your Oracle Application Server 10g (10.1.4.0.1) Infrastructure hostname and port number as configured in step 1.1.

The OracleAS Infrastructure might be on the same machine as the Business Intelligence and Forms type installation or on a different machine. This installation type includes Discoverer Server 10g, Discoverer Plus 10g, and Discoverer Viewer 10g. You must install Oracle Application Server 10g Release 2 on a standalone server accessing an Oracle E-Business Suite Release 11i database or in a separate ORACLE_HOME on an existing application tier server node."
1.3. Copy Database Connection file

Discoverer 10.1.2 supports Single Sign-On functionality with Oracle E-Business Suite Release 11i. To support Single Sign-On, Discoverer needs access to the Database Connection (dbc) file for the database you wish to connect to. A dbc file is a text file which stores all the information required to connect to a particular database.
In the Discoverer10g $ORACLE_HOME/opmn/conf/opmn.xml file check the variable for FND_SECURE. This variable specifies the directory where Discoverer is trying to locate dbc files. By default this is set to $ORACLE_HOME/discoverer/secure.
Create the directory $ORACLE_HOME/discoverer/secure if it does not exist. Then copy the dbc file from the $FND_TOP/secure directory of the 11i instance you are setting up Discoverer with to the Discoverer 10.1.2 $ORACLE_HOME/discoverer/secure directory you just created.

1.4. Update tnsnames.ora file

On your standalone Oracle Business Intelligence Server 10g Release 2 node, update file $ORACLE_HOME/network/admin/tnsnames.ora and include the tnsnames entry to connect to your Oracle E-Business Suite Release 11i database. Use the same entry as exists in the tnsnames.ora file on your Oracle E-Business Suite Release 11i application tier server node. The database name must match the two_task entry in the dbc file. Verify you can establish a connection to your Oracle E-Business Suite Release 11i database using sqlplus.
2. Apply the latest certified Discoverer Plus and Viewer Patches

AIX Paltform(only for 10.1.2.0.0): Apply patchset 10.1.2.1.0 delivered via patch 4908436 available on Metalink for download.

3. Migrate your existing Discoverer End User Layers to Discoverer 10.1.2.

Upgrade your existing Discoverer 4i or Discoverer 9.0.4 End User Layer to Discoverer 10.1.2 by using the following command on the standalone application server where Oracle Business Intelligence Server 10g Release 2 was installed in Step 1.
$ORACLE_HOME/bin/eulapi -CONNECT /@ -AUTO_UPGRADE
If you are migrating your Discoverer 4i End User Layer, the upgrade process creates a new Discoverer 10.1.2 End User Layer based the existing Discoverer 4i End User Layer. The existing Discoverer 4i End User Layer remains unchanged. A new schema containing the Discoverer 10.1.2 End User Layer will be created under the same Database User. After migration, the Database User contains functional End-User Layers for both Discoverer 4i and 10g. After verifying that the upgrade was successful, you may drop the 4i End-User Layer.

Section 2 : Postinstallation Tasks

This section describes steps for configuring Oracle E-Business Suite Release 11i to use Discoverer 10.1.2, and for loading the Applications-specific content and workbooks into the Discoverer 10.1.2 End User Layer.

1. Apply necessary Oracle Applications interoperability patches using AutoPatch

A) Apply AD patch 5765314

This patch contains utilities for Discoverer End User Layer maintainance.
B) Apply ICX patch 3133021
This patch contains support to invoke Discoverer from E-Business Suite functions.
2. Set Applications Profile Options for Discoverer using AutoConfig

By default, AutoConfig configures profile options for Oracle E-Business Suite Release 11i environments for Discoverer 4i. Proceed with the following steps to allow AutoConfig to switch profile options for your remote, standalone Oracle Business Intelligence 10g Release 2 server:

Edit the AutoConfig context file.
If you are currently using E-Business Suite level 11.5.9 or above, or have applied FND.G patchset (or above), you will use Oracle Applications Manager to edit your context file. For all previous versions, you will use the AutoConfig Context Editor tool.

To edit the context file using Oracle Applications Manager, login to Oracle Applications Manager and navigate to Site Map > AutoConfig > Edit Parameters.
3. Set Applications Profile Options for Discoverer using AutoConfig

By default, AutoConfig configures profile options for Oracle E-Business Suite Release 11i environments for Discoverer 4i. Proceed with the following steps to allow AutoConfig to switch profile options for your remote, standalone Oracle Business Intelligence 10g Release 2 server:
Edit the AutoConfig context file.
If you are currently using E-Business Suite level 11.5.9 or above, or have applied FND.G patchset (or above), you will use Oracle Applications Manager to edit your context file. For all previous versions, you will use the AutoConfig Context Editor tool.
To edit the context file using Oracle Applications Manager, login to Oracle Applications Manager and navigate to Site Map > AutoConfig > Edit Parameters.
Configure standalone discoverer, Discoverer Machine name, Discoverer port, Discoverer protocol,
Disco version comma discovery eul prefix.

4. After that you have to run autoconfig

-Verify Applications profile options in Oracle Applications
Log into Release 11i with the System Administrator responsibility
Navigate to the Profile > System form
Query the %Discoverer% profile options.
Verify the following ICX profile options in Oracle Applications

ICX_DISCOVERER_LAUNCHER=http://:/discoverer/plus?Connect=[APPS_SECURE]
ICX_DISCOVERER_VIEWER_LAUNCHER=http://:/discoverer/viewer?Connect=[APPS_SECURE]
ICX_DISCOVERER_RELEASE=10
ICX_DISCOVERER_USE_VIEWR=Y N
ICX_DEFAULT_EUL=EUL
ICX_DISCOVERER_EUL_LANGUAGE=US
ICX_DISCOVERER_PARAMETERS=exitURL=http://:/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE
Note:
When you open the discoverer EUL using the Discoverer 10g Desktop/Admin it will ask you if you want to upgrade your EUL and you have to choose yes.

To start/stop the new discoverer do the following:
$Disco_ORACLE_HOME/opmn/bin/opmnctl stopall (to stop).
$Disco_ORACLE_HOME/opmn/bin/opmnctl startall (to start).

COMPANY LOGO IMAGE FILE REPLACED

1. The custom company logo image file replaced the $OA_MEDIA/FNDSSCORP.gif.

2. Take the backup of this file and replace with your company logo gif file to this
file.

3. Bonuce the application services.

ADPATCH HELP

bash-2.04$ adpatch help=y

usage: adpatch [help=y]

adpatch Pre-Install Mode
[preinstall=y|n]

adpatch Test Mode
[apply=y|n]

adpatch Non-Interactive mode
[defaultsfile=<$APPL_TOP/admin/SID/defaultsfile>]
[logfile=][interactive=y|n][workers=]
[patchtop=][driver=][restart=y|n]
[abandon=y|n][wait_on_failed_job=y|n]

adpatch
[localworkers=][workers=]
[printdebug=y|n][parallel_index_threshold=]
[order=] [flags=][options=]

adpatch Upload Patch History From Filesystem
[uploadph=y|n]
where

* help=y - Prints help information about adpatch options.

* preinstall - To run adpatch in Pre-Install Mode.
Default - No.

* apply - To run adpatch in Test Mode.
Default - Yes.

* uploadph - To upload the patch history from the filesystem to the
database and exit. This feature can be used when the system
is not in maintenance mode.
Default - No.

* interactive - Invokes adpatch in Non-Interactive mode when
"interactive=no" is specified.
Default - Yes.

Following are usually specified in Non-Interactive Mode, however not all
are compulsory. Some are also valid for interactive mode.

* defaultsfile - Defaults file name.
Default - none. No default file read or written.
* logfile - Adpatch log file name.
Default - none. Adpatch prompts for this value.
* workers - Specifies the number of workers to run.
Default - none. Adpatch prompts for this value.
* patchtop - Top-level directory for the current patch.
Default - none. Adpatch prompts for this value.
* driver - Name of the patch driver file.
Default - none. Adpatch prompts for this value.
* restart - To restart an existing session.
Default - none. Adpatch prompts for this value.
* abandon - To abandon the previous failed session.
Default - No.
* wait_on_failed_job - To prevent adpatch from exiting, when all
workers have failed in Non-Interactive Mode.
Default - No.

* localworkers - Used in Distributed AD to specify the number of
workers to be run on the current machine.
Default - Value specified for workers.
* printdebug - To display extra debugging information.
Default - No.
* parallel_index_threshold - Threshold block count in each table, which when
exceeded for a table causes its indexes to be
created using parallel slaves.
Default - none. Adpatch does not create indexes
in parallel.

* order = To organize list of jobs to run in a phase. Default - forward.
* forward - The order in which jobs are listed in the
patch driver file.
* backward - Opposite to how the jobs are listed in the
patch driver file.

* flags = Generic flags passed to adpatch
* hidepw - To omit the "HIDEPW:" comments in the log file.
Default - hidepw.
* trace - To log all database operations to a trace file.
Default - notrace.
* logging - To create indexes in LOGGING or NOLOGGING mode.
Default - nologging.

* options = Generic options passed to adpatch.
* checkfile - To skip running exec, SQL, and exectier
commands if they are recorded as already run.
Default - checkfile.
* compiledb - To compile invalid objects in the database
after running actions in the database driver.
Default - compiledb.
* compilejsp - To compile out-of-date JSP files, if the patch
has copy actions for at least one JSP file.
Default - compilejsp.
* copyportion - To run commands found in a copy driver.
Default - copyportion.
* databaseportion - To run commands found in a database driver.
Default - databaseportion.
* generateportion - To run commands found in a generate driver.
Default - generateportion.
* integrity - To perform patch integrity checking.
Default - nointegrity.
* maintainmrc - To maintain the MRC schema after running
actions found in the database driver.
Default - maintainmrc.
* autoconfig - To run AutoConfig.
Default - autoconfig.
* actiondetails - To get the details of actions turned off.
Default - actiondetails.
* parallel - To run actions that update the database or
actions that generate files in parallel.
Default - parallel.
* prereq - To perform prerequisite patch checking prior
to running patch driver files.
Default - prereq.
* revcache - To load the package revision cache (if adpatch
determines it is needed).
Default - revcache.
* validate - To connect to all registered Oracle
Applications schemas at the start of the patch.
Default - novalidate.
* hotpatch - A patch which can be applied in Normal mode.
Default - hotpatch.
* phtofile - The patch history will be saved to files.
Default - nophtofile.

PATCHSETS.SH UTILITY.

Oracle Applications Current Patchset Comparison Utility -

patchsets.sh---> 139684.1 Metalink Good note for patchset utility.

APPLY PATCH IN BETWEEN ADPATCH RUNNING.

Note:175485.1 How to Apply an 11i Patch When adpatch is Already Running

1. Shutdown the workers.

2. Backup the FND_INSTALL_PROCESSES & AD_DEFERRED_JOBS

3. Backup the .rf9 files located in $APPL_TOP/admin//restart directory.

4. Drop the FND_INSTALL_PROCESSES & AD_DEFERRED_JOBS tables.

5. Apply the new patch.

6. Restore the backed up .rf9 files.

7. Restore the FND_INSTALL_PROCESSES & AD_DEFERRED_JOBS

9. Re-create synonyms for APPLSYS.AD_DEFERRED_JOBS and APPLSYS.FND_INSTALL_PROCESSES.

10. Start adpatch, it will resume where it stopped previously.

DROP UNDO TABLESPACE ACTIVE ROLLBACK SEGMENT

1. SET UNDO_MANG= MANUAL ( INIT.ORA)

2. Comment the entries of the undo segments out of the init.ora file by using the following statement in the init.ora file:

_offline_rollback_segments=(_SYSSMU1$,_SYSSMU2$,_SYSSMU3$,.....)

3) Startup mount pfile='fullpath to pfile'

4) Than drop the datafiles,

sql>Alter Database datafile 'fullpath & filename' offline drop;

5) Alter Database Open;

6) Drop the undo segments,

sql>Drop Rollback Segment RB1;
" "
Drop.. RBn;

7) Drop Tablespace Including Contents;

8)Add the new undo tablespace.

9) Shutdown Immediate;

10) Change the init.ora parameters back to Undo_management = AUTO and modify the parameter Undo_tablespace= and remove the _offline_rollback_segments parameter.

11) Startup the Database

11g new feature (Creating Pfile)

11g New Feature in case lost pfile or spfile.

Create pfile from your your memory (from alert.log)

when instance startup, all parameter setting goes to alert.log file.

Command for create pfile in 11g.

SQL> create pfile='ORACLE_HOME/dbs/initofdev.ora' from memory;

SQL> create pfile='ORACLE_HOME/dbs/spfileofdev.ora' from memory;

SQL> create spfile from pfile;

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

SINGLE NODE TO MULTI NODE CLONING STEPS (11i)

Source Node :- NODE A
-----------------------------------------------
Target Node :- NODE B----> DB TIER
:- NODE C----> CON & ADMIN
:- NODE D----> WEB & FORMS

------------------------------------------------
On source system.

1. Perl adpreclone.pl dbTier
2. Perl adpreclone.pl appsTier

-------------------------------------------------
Next step

1. Copy the source rdbms home 9.2.0 and all source datafiles from node a to node b.

2. Copy the application tier file system from Node a to Node b & c.

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

Node B

1. Perl adcfgclone.pl dbTier

(If you are using hot backup then use this command)

1. Perl adcfgclone.pl dbTechStack

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

Node C & D.

1. Perl adcfgclone.pl appsTier.

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

For finishing task Metalink note :- 230672.1

Thursday, 13 March 2008

How to clear apache cache

1. Stop apache

2. cd $OA_HTML

3. rm -rf _pages

4. Start apache

Wednesday, 12 March 2008

Oracle DBA / Apps DBA Interview Questions

Q:- Discuss how to open the database in the event that the parameter file is lost

A :- The alert.log file records all the changes at the database level.
When we start the database the parameters settings (non-default values)
are entered in the alert.log file. e.g. from an alert.log file,

processes = 200
__shared_pool_size = 805306368
shared_pool_size = 637534208
__large_pool_size = 33554432
large_pool_size = 33554432
control_files = /u001/app/oraclet/oradata/blake/control/control01.ctl
sga_target = 1375731712
log_archive_dest_state_1 = ENABLE
log_archive_dest_state_2 = ENABLE
log_archive_max_processes= 2
log_archive_min_succeed_dest= 1
db_domain = cup.cam.ac.uk
....................
..................
...................

Recreate the pfile from alert.log file