Saturday, December 11, 2010

RAID levels

RAID 0: block-level striping without parity or mirroring.
RAID 1: mirroring without parity or striping.
RAID 2: bit-level striping with dedicated Hamming-code parity.
RAID 3: byte-level striping with dedicated parity. Hot parity disk.
RAID 4: block-level striping with dedicated parity. Hot parity disk.
RAID 5: block-level striping with distributed parity. Tolerate single disk failure.
RAID 6: block-level striping with double distributed parity. Tolerate double disk failure.

Commonly used: RAID 5 or combination of RAID 0 and 1.

RAID 0+1: striped sets in a mirrored set. Strip first, then mirror.
RAID 1+0: mirrored sets in a striped set. Mirror first, then strip.
RAID 5+0:
RAID 5+1: mirrored striped set with distributed parity.

For database: RAID1+0 and RAID 5.

REF:
http://en.wikipedia.org/wiki/RAID

How to clear java cache

1. clear all caches

cd $COMMON_TOP/_pages

cat refresh_cache.sh
rm -r _oa__html.old _oa__java.old
mv _oa__html _oa__html.old
mv _oa__java _oa__java.old
mkdir _oa__html _oa__java

2. clear OA Framework cache
• Go to "Functional Administrator" responsibility.
• Under tab "Core Services" -> click on "Caching Framework"
• Click on " Global Configuration"
• Click "Clear ALL Cache"

3. Bounce the Apache server

drop six internal controls manager flexfields

Compile flexfield: adadmin (3,3) or

/data/appldev/11i/fnd/11.5.0/bin/fdfcmp APPS/***** 0 Y

Following flexfield got compilation error:
AMW_AP_ATTR_GROUP_TYPE
AMW_CONSTRAINT_ATTR_GROUP_TYPE
AMW_CTRL_ATTR_GROUP_TYPE
AMW_PROCESS_ATTR_GROUP_TYPE
AMW_PROC_ORG_ATTR_GROUP_TYPE
AMW_RISK_ATTR_GROUP_TYPE


---------------------------------------------------------
Application Id: 242
Short Name: AMW
Name: Internal Controls Manager
Flexfield Name: AMW_AP_ATTR_GROUP_TYPE
Title: Audit Procedure

Compilation aborted for current descriptive flexfield...

APP-FND-00854: FDFBDF: Cannot find descriptive column information.
APP-FND-01564: ORACLE error 1403 in FDFBCO

Cause: FDFBCO failed due to ORA-01403: no data found.

The SQL statement being executed at the time of the error was: and was executed from the file &ERRFILE.

Continuing...

---------------------------------------------------------
Application Id: 242
Short Name: AMW
Name: Internal Controls Manager
Flexfield Name: AMW_CONSTRAINT_ATTR_GROUP_TYPE
Title: Constraint

Compilation aborted for current descriptive flexfield...

APP-FND-00854: FDFBDF: Cannot find descriptive column information.
APP-FND-01564: ORACLE error 1403 in FDFBCO

Cause: FDFBCO failed due to ORA-01403: no data found.

The SQL statement being executed at the time of the error was: and was executed from the file &ERRFILE.

Continuing...

---------------------------------------------------------
Application Id: 242
Short Name: AMW
Name: Internal Controls Manager
Flexfield Name: AMW_CTRL_ATTR_GROUP_TYPE
Title: Control

Compilation aborted for current descriptive flexfield...

APP-FND-00854: FDFBDF: Cannot find descriptive column information.
APP-FND-01564: ORACLE error 1403 in FDFBCO

Cause: FDFBCO failed due to ORA-01403: no data found.

The SQL statement being executed at the time of the error was: and was executed from the file &ERRFILE.

Continuing...

---------------------------------------------------------
Application Id: 242
Short Name: AMW
Name: Internal Controls Manager
Flexfield Name: AMW_PROCESS_ATTR_GROUP_TYPE
Title: Risk Library Process

Compilation aborted for current descriptive flexfield...

APP-FND-00854: FDFBDF: Cannot find descriptive column information.
APP-FND-01564: ORACLE error 1403 in FDFBCO

Cause: FDFBCO failed due to ORA-01403: no data found.

The SQL statement being executed at the time of the error was: and was executed from the file &ERRFILE.

Continuing...

---------------------------------------------------------
Application Id: 242
Short Name: AMW
Name: Internal Controls Manager
Flexfield Name: AMW_PROC_ORG_ATTR_GROUP_TYPE
Title: Organization Process

Compilation aborted for current descriptive flexfield...

APP-FND-00854: FDFBDF: Cannot find descriptive column information.
APP-FND-01564: ORACLE error 1403 in FDFBCO

Cause: FDFBCO failed due to ORA-01403: no data found.

The SQL statement being executed at the time of the error was: and was executed from the file &ERRFILE.

Continuing...

---------------------------------------------------------
Application Id: 242
Short Name: AMW
Name: Internal Controls Manager
Flexfield Name: AMW_RISK_ATTR_GROUP_TYPE
Title: Risk

Compilation aborted for current descriptive flexfield...

APP-FND-00854: FDFBDF: Cannot find descriptive column information.
APP-FND-01564: ORACLE error 1403 in FDFBCO

Cause: FDFBCO failed due to ORA-01403: no data found.

The SQL statement being executed at the time of the error was: and was executed from the file &ERRFILE.

Continuing...

---------------------------------------------------------
Application Id: 242
Short Name: AMW
Name: Internal Controls Manager
Flexfield Name: AMW_WORK_ATTR_GROUP_TYPE
Title: Work

Compilation was successful for current descriptive flexfield.


Run afdff040_amw.sql from oracle support (SR #3-1515967891: AMW flexfield compilation error for bug 9748057) and then compiling the flexfield again. No issues.

/**/
REM $Header: afdff040.sql 115.14.1151.5 2002/02/20 10:48:00 pkm ship $

REM dbdrv: none

REM +======================================================================+
REM | Copyright (c) 1999 Oracle Corporation Redwood Shores, California, USA|
REM | All rights reserved. |
REM +======================================================================+
REM NAME
REM afdff040.sql
REM DESCRIPTION
REM Drops obsolete/re-created flexfields of all products
REM
REM NOTES
REM
REM HISTORY
REM 02/18/2002 nlo Removed GL_JE_SOURCES,GL_JE_CATEGORIES
REM 02/29/00 ssung Included MRP_SEIBAN_NUMBERS,
REM MRP_PROJECT_PARAMERTERS,
REM GL_CHARTS_OF_ACCOUNTS.
REM 02/03/00 nlo Added AK flexfields
REM 02/01/00 nlo Added JG flexfield contexts
REM 01/17/00 ssung fixes for Bug#1151660
REM 11/09/99 ssung Added AP_LOOKUP_CODES,
REM AS_WORD_PROCESSORS,
REM BOM_STANDARD_COMMENTS,
REM BOM_STANDARD_INSTRUCTIONS,
REM GL_JE_SOURCES, GL_JE_CATEGORIES,
REM AP_EFT_POPUP, AP_DIST_SET_PA_POPUP,
REM AP_PO_NUM_POPUP, AP_LOOKUP_CODES,
REM AP_DIST_PA_POPUP, AP_INV_PA_POPUP
REM 10/28/99 nlo Added JA obsolete descriptive flexfields
REM 10/26/99 nlo Added JG obsolete Flexfield Contexts
REM 10/08/99 nlo Added JA obsolete Flexfield Contexts & JG flexfields
REM 09/15/99 ssung Added some obsolete Flexfield Contexts,
REM list provided by kmaheswa
REM 08/16/99 Murali Added obsolete JL descriptive flexfields
REM 06/25/99 Nlo Deleted JG obsolete descriptive flexfields
REM and specific contexts
REM 05/03/99 Murali Added obsolete descriptive flexfield
REM 04/21/99 Golgun OTHERS exception handlers, and
REM set_session_mode calls are added.
REM 03/08/99 Murali Added obsolete descriptive flexfields
REM 08/28/98 Murali Re-wrote this script as procedures
REM 08/15/97 Murali Created
REM +======================================================================+

SET VERIFY OFF
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;

REM Descriptive FlexFields

set serveroutput on size 20000;

declare

procedure delete_dsc_flexfield(p_prod IN varchar2,
p_desc_flex IN varchar2)
is
begin

fnd_flex_dsc_api.delete_flexfield(appl_short_name => p_prod,
flexfield_name => p_desc_flex);

exception
when others then
dbms_output.put_line('Flexfield '||p_desc_flex||' for '||
p_prod||' does not exist');
null;
end;

procedure delete_key_flexfield(p_prod IN varchar2,
p_key_flex IN varchar2)
is
begin

fnd_flex_key_api.delete_flexfield(appl_short_name => p_prod,
flex_code => p_key_flex);

exception
when others then
dbms_output.put_line('Flexfield '||p_key_flex||' for '||
p_prod||' does not exist');
null;
end;

procedure delete_key_flex_segment(
p_prod IN varchar2,
p_flexname IN varchar2,
p_structure IN varchar2,
p_segment IN varchar2)
is
l_segment fnd_flex_key_api.segment_type;
l_flexfield fnd_flex_key_api.flexfield_type;
l_structure fnd_flex_key_api.structure_type;
begin

begin
l_flexfield := fnd_flex_key_api.find_flexfield(p_prod, p_flexname);
exception
when no_data_found then
dbms_output.put_line('Flex '||p_flexname||' does not exist');
return;
end;

begin
l_structure := fnd_flex_key_api.find_structure(l_flexfield,
p_structure);
exception
when no_data_found then
dbms_output.put_line('Structure '||p_structure||' not found in '||
p_flexname);
return;
end;

begin
l_segment := fnd_flex_key_api.find_segment(
l_flexfield,
l_structure,
p_segment);

fnd_flex_key_api.delete_segment(l_flexfield, l_structure, l_segment);

exception
WHEN no_data_found THEN
dbms_output.put_line('Flex segment '||p_segment||' does not exist');
end;
exception
WHEN others THEN
dbms_output.put_line('delete_key_flex_segment is failed.');
end;


procedure delete_dsc_context(p_prod IN varchar2,
p_desc_flex IN varchar2,
p_desc_ctxt IN varchar2)
is
begin

fnd_flex_dsc_api.delete_context(appl_short_name => p_prod,
flexfield_name => p_desc_flex,
context => p_desc_ctxt);

exception
when others then
dbms_output.put_line('Flexfield '||p_desc_flex||' with context '||
p_desc_ctxt || ' for '|| p_prod||' does not exist');
null;
end;

begin
fnd_flex_dsc_api.set_session_mode('customer_data');
delete_dsc_flexfield('AMW','AMW_AP_ATTR_GROUP_TYPE');
delete_dsc_flexfield('AMW','AMW_CONSTRAINT_ATTR_GROUP_TYPE');
delete_dsc_flexfield('AMW','AMW_CTRL_ATTR_GROUP_TYPE');
delete_dsc_flexfield('AMW','AMW_PROCESS_ATTR_GROUP_TYPE');
delete_dsc_flexfield('AMW','AMW_PROC_ORG_ATTR_GROUP_TYPE');
delete_dsc_flexfield('AMW','AMW_RISK_ATTR_GROUP_TYPE');

-- Descriptive FlexField Segments

---No segments created in customer environment

-- Flexfield Contexts

exception
when others then
dbms_output.put_line('afdff040.sql failed.');
end;
/
/*{TOAD_FILE_CHUNK}*/

commit;
exit;

enable or disable low-level logging

Enable low-level logging

1. change system profile FND: Debug Log level from unexpected to statement
2. change system profile FND: Debug Log Enabled from No to Yes.

When testing begins, run following:

Select max(log_sequence) from apps.fnd_log_messages

When testing ends, run:
Above again.

Then run

Select * from apps.fnd_log_messages where log_sequence between {from} to {to} and messages_text like ‘PrintAM%’

Above is trouble-shooting java class PrintAM.

The other choice is to use TIMESTAMP.

Reset back to original values for the system profiles after testing as there are performance impacts.

backup and recovery (2) -- recovery from rollback segment corruption when in noarchive mode

1) Backup the database while the database is closed.

THE INSTRUCTIONS HERE ARE DESTRUCTIVE. YOU ARE STRONGLY ADVISED TO BACKUP THE DATABASE BEFORE PROCEEDING. IF YOU DO NOT DO THIS YOU MAY LOSE THE CHANCE TO TRY OTHER OPTIONS.


2) If your datafiles are from different points in time, it is best to try to use system tablespace datafiles at a similar timestamp to the OLDEST files you have online in the database. This reduces the chance that you will get problems during the bootstrap phase of opening the database.

3) Edit your *init.ora file to change undo_management and add one parameter.

* Change UNDO_MANAGEMENT=AUTO to UNDO_MANAGEMENT=MANUAL
* Remove or comment out UNDO_TABLESPACE and UNDO_RETENTION.

* Add

_OFFLINE_ROLLBACK_SEGMENTS =(comma separated list of Automatic Undo segments)

Example:

_OFFLINE_ROLLBACK_SEGMENTS = (_SYSSMU1$, _SYSSMU2$, _SYSSMU3$, _SYSSMU4$, _SYSSMU5$, _SYSSMU6$, _SYSSMU7$, _SYSSMU8$, _SYSSMU9$, _SYSSMU10$)

(There are 25 system managed undo segments in OAICM)

Note, sometimes the alert log will tell you what Automatic Undo segments are in use. Search the alert log for SYSS. If the alert log does not contain that information then use _SYSSMU1$ through _SYSSMU10$ as shown in the example above.

In UNIX you can issue this command to get the undo segment names:

$ strings system01.dbf | grep _SYSSMU | cut -d $ -f 1 | sort -u

From the output of the strings command above, add a $ to end of each _SYSSMU undo segment name.

* If you only have a spfile available, you can from the closed, nomount or the mount stage create an init.ora file as follows:

SQL> CREATE PFILE FROM SPFILE;

Do NOT edit the SPFILE.

4) Invoke SQL*Plus, startup mount, check that correct init.ora was used and all datafiles are in the status of online or system.

$ sqlplus "/as sysdba"

SQL> startup mount pfile = (full path / file name to init.ora)

Example:
SQL> startup mount pfile=/db00/db04/oracle/oaicmdb/9.2.0/dbs/initOAICM.ora.forrecovery

Confirm that the hidden parameters from step 3 were used:

SQL> show parameters offline

You should see the hidden parameter listed. If not, the wrong init.ora may have been modified. Do not continue until "show parameters corrupt" shows the hidden parameter.

SQL> show parameters undo

You should see undo management set to manual. If not, the wrong init.ora may have been modified. Do not continue until "show parameters undo" shows undo management as manual.

5) Alter database datafile 'undo datafile' offline drop;

example: alter database datafile ‘/db00/db04/oracle/oaicmdata/undo01.dbf’ offline drop;

6) alter database open;

6) drop all rollback segment with status need recovery:

select owner,segment_name,status
from dba_rollback_segs;

drop rollback segment "_SYSSMU1$"; -- 10 system undo segments were dropped.


7) drop tablespace including contents and datafiles;

example: drop tablespace apps_undots1 including contents and datafiles;

8) create undo tablespace apps_undots1 datafile ‘/db00/db04/oracle/oaicmdata/undo01.dbf’ size 1000m resuse autoextend on next 100m maxsize 8000m.

9) shutdown the database

10) change the following parameters in the init.ora :
UNDO_MANAGEMENT=AUTO
#_OFFLINE_ROLLBACK_SEGMENTS=(_SYSSMU1$, _SYSSMU2$, _SYSSMU3$, ...etc)

11) startup



12) best practice:
Put a copy of controlfile and online redo logs on local (internal) disk to prevent from database corruption due to temporary storage problems.

add and delete nodes for a RAC

Add a new node to the RAC

1. install and config OS and hardware for new node
$ cluvfy stage –pre crsinst –n node1,node2 –r 10gR2
2. add Oracle Clusterware to the new node
$ $CRS_ORACLE_HOME/oui/bin/addNode.sh (run this on the first node)

Open a new OS window to run $CRS_ORACLE_HOME/install/rootaddnode.sh on the first node).

On the new node, run $ORACLE_HOME/root.sh which will start Clusterware stack and run VIPCA to configure nodeapps.

3. configure ONS for the new node
cat $CRS_ORACLE_HOME/opmn/conf/ons.config on the first node
$CRS_ORACE_HOME/bin/racgons add_config {new node}:{
4. add ASM home to the new node
On the first node, run $ASM_ORACLE_HOME/oui/bin/addNode.sh, then run $ASM_ORACLE_HOME/root.sh on the new node.

5. add RAC home to the new node
On the first node, run $ORACLE_HOME/oui/bin/addNode.sh, then run $ORACLE_HOME/root.sh on the new node.

6. add a listener to the new node
run netca to add a listener: LISTENER_{New Node Name} on the new node.

7. add a database instance to the new node
run dbca on the first node.

Delete a node from the RAC

1. delete the instance on the node to be deleted.
Run dbca on the node to be deleted.

2. clean up the ASM instance
srvctl stop asm –n {node to be deleted}
srvctl remove asm –n {node to be deleted}
rm –f $ASM_ORACLE_HOME/dbs/*ASM*
rm –rf $ASM_ORACLE_HOME/admin/+ASM

3. remove the listener from the node to be deleted.
Run netca from the node to be deleted.

4. remove the node from the database
4.1 update inventory
on the node to be removed
$ORACLE_HOME/oui/bin/runInstaller –updateNodeList ORACLE_HOME={database home} “CLUSTER_NODES={node to be removed}” -local
On the remaining nodes
$ORACLE_HOME/oui/bin/runInstaller –updateNodeList
ORACLE_HOME={database home} “CLUSTER_NODES={remaining nodes}”

4.2 remove the database software installation
./runInstaller

5. remove the node from ASM
repeat step 4 for ASM home.

6. remove ONS configuration from the node to be deleted.
On the first node:
$CRS_ORACLE_HOME/bin/racgons remove_config {node to be removed}:{remote port}

7. remove the node from the clusterware.
As root: on the node to be removed
$CRS_ORACLE_HOME/install/rootdelete.sh
As root: on the first node
$CRS_ORACLE_HOME/bin/olsnodes –n ##to delete node number to be deleted
$CRS_ORACLE_HOME/install/rootdeletenode.sh

On the node to be deleted
$CRS_ORACLE_HOME/oui/bin/runInstaller –updateNodeList ORACLE_HOME={CRSOH} “CLUSTER_NODES={node to be deleted}” CRS=TRUE -local

On the first node
$CRS_ORACLE_HOME/oui/bin/runInstaller –updateNodeList
ORACLE_HOME={CRSOH} “CLUSTER_NODES={remaining nodes}”
CRS=TRUE

Verify
srvctl status nodeapps –n {deleted node}
crs_stat | grep –i {deleted node}
olsnodes –n

change VIP address

1. determine the interface used to support the VIP
$ ifconfig –a

2. stop all resources depending on the VIP
$ srvctl stop instance –d DBRAC –i DB1
$ srvctl stop asm –n node1
$ srvctl stop nodeapps –n node1

3. verify that the VIP is no longer running
$ ifconfig –a
And/Or
$ crs_stat

4. change IP in /etc/hosts and DNS

5. modify the VIP address using srvctl
$ srvctl modify nodeapps –n node1 –A 192.168.2.125/255.255.255.0/eth0

6. start nodeapps and all resources depending on it
$ srvctl start nodeapps –n node1

user equivalence or secure shell for remote installation

User equivalence:
vi /etc/hosts.equiv and add following two lines (node name).
pind33
pind34

test it using rsh (remote shell):
rsh pind33 uname –r
rsh pind34 uname –r


secure shell (ssh)
applptch@pind33(PTCH_806_BALANCE/Web:Forms:MWA):$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/applptch/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/applptch/.ssh/id_dsa.
Your public key has been saved in /home/applptch/.ssh/id_dsa.pub.
The key fingerprint is:
17:ce:1d:66:0d:25:01:fa:a9:70:fa:d9:d2:04:a0:c1 applptch@pind33.powellind.com
[~]:[time 14:15:03]

applptch@pind34(PTCH_806_BALANCE/Web:Forms:MWA):$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/applptch/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/applptch/.ssh/id_dsa.
Your public key has been saved in /home/applptch/.ssh/id_dsa.pub.
The key fingerprint is:
5c:ad:ca:aa:93:e7:b0:92:66:92:c4:6b:09:3c:8f:f0 applptch@pind34.powellind.com
[~]:[time 14:15:40]

applptch@pind33(PTCH_806_BALANCE/Web:Forms:MWA):$ ssh pind33 "cat /home/applptch/.ssh/id_dsa.pub" >> /home/applptch/.ssh/authorized_keys
applptch@pind33's password:
[~]:[time 14:16:58]
applptch@pind33(PTCH_806_BALANCE/Web:Forms:MWA):$ ssh pind34 "cat /home/applptch/.ssh/id_dsa.pub" >> /home/applptch/.ssh/authorized_keys
applptch@pind34's password:
[~]:[time 14:17:19]
applptch@pind33(PTCH_806_BALANCE/Web:Forms:MWA):$ scp /home/applptch/.ssh/authorized_keys pind34:/home/applptch/.ssh
applptch@pind34's password:
authorized_keys 100% 1336 1.3KB/s 00:00
[~]:[time 14:17:56]
applptch@pind33(PTCH_806_BALANCE/Web:Forms:MWA):$ ssh pind34
Last login: Wed Sep 15 14:13:53 2010 from 172.18.33.73
[~]:[time 14:18:26]
applptch@pind34(PTCH_806_BALANCE/Web:Forms:MWA):$

applptch@pind34(PTCH_806_BALANCE/Web:Forms:MWA):$ ssh pind33
Last login: Wed Sep 15 14:24:10 2010 from pind34.powellind.com
[~]:[time 14:26:51]
applptch@pind33(PTCH_806_BALANCE/Web:Forms:MWA):$

hangcheck_timer module for monitoring the Linux kernel hangs

Make sure hangcheck_timer is running on all cluster nodes.

crs.oracle.pind22>/sbin/lsmod |grep -i hang
Module Size Used by
hangcheck_timer 37465 0


add entry to start the hangcheck_timer module on all nodes if necessary
crs.oracle.pind22>vi /etc/rc.local

modprobe hangcheck-timer hangcheck_tick=1 hangcheck_margin=10 hangcheck_reboot=1

hangcheck_tick: defines how often, in seconds, the hangcheck_timer module checks nodes for hangs. The default value is 60 seconds.

Hangcheck_margin: defines how long, in seconds, the timer waits for a response from the kernel. The default value is 180 seconds.

Hangcheck_reboot: determines if the hangcheck_timer restarts the node if the kernel fails to respond within the sum of the hangcheck_tick and hangcheck_margin parameter values. If hangcheck_reboot >= 1, then the hangcheck_timer module restarts the system. If hangcheck_reboot = 0, then the hangcheck_timer will not reboot node even if a hang is detected.

For 10g, need to make sure that the cluster misscount is greater than the sum of the setting for hangcheck_tick+hangcheck_margin.

REF:
Hangcheck-timer module requirements for Oracle9i, 10g, and 11g RAC on Linux.

migrate a database to ASM

1. SQL>alter system set db_create_file_dest=’+DATA’ scope=spfile;
SQL>alter system set control_file=’’ scope=spfile;
2. SQL>shutdown immediate;
3. SQL>startup nomount;
4. RMAN>restore controlfile from ‘/u01/ORCL/control01.ctl’;
5. SQL>alter database mount;
6. RMAN>backup as copy database format ‘+DATA’;
7. RMAN>switch database to copy;
8. RMAN>recover database;
9. SQL>alter database open;
10. SQL>alter database tempfile ‘/u01/ORCL/temp1.dbf’ DROP;
SQL>alter tablespace temp add tempfile;

11gR2 database swap space

The 11g install guide gives this formula for swap:

If RAM = 1024MB to 2048Mb then 1.5 times RAM
elseif RAM > 2048MB and < 8192MB then match RAM
else RAM > 8192MB then .75 times RAM

10gR2 EBS database init.ora

*.service_names = PROD,PROD1,PROD2,PROD.POWELLIND.COM
PROD1.local_listener = 'PROD1_LOCAL'
PROD1.remote_listener = 'PROD_REMOTE'
PROD2.local_listener = 'PROD2_LOCAL'
PROD2.remote_listener = 'PROD_REMOTE'
*.cluster_database = TRUE
*.cluster_database_instances = 2
*.undo_retention=28800
PROD1.undo_tablespace = APPS_UNDOTS1
PROD1.instance_name = PROD1
PROD1.instance_number = 1
PROD1.thread = 1
PROD2.undo_tablespace = APPS_UNDOTS2
PROD2.instance_name = PROD2
PROD2.instance_number = 2
PROD2.thread = 2
*.db_recovery_file_dest='/backup'
*.db_recovery_file_dest_size=1500G
*.recovery_parallelism=4
*.DB_CREATE_FILE_DEST = '+DSKGRP1'
*.DB_CREATE_ONLINE_LOG_DEST_1 = '+DSKGRP1'
*.DB_CREATE_ONLINE_LOG_DEST_2 = '+DSKGRP1'
*.db_name = PROD
*.control_files = '+DSKGRP1/PROD/CONTROLFILE/Current.275.682690593','+DSKGRP1/prod/controlfile/current.259.711532731'
*.control_file_record_keep_time = 30
*.db_block_size = 8192
*.compatible = 10.2.0
*._system_trig_enabled = TRUE # set FALSE for upgrades/migrations
*.O7_DICTIONARY_ACCESSIBILITY = FALSE
*.nls_language = AMERICAN
*.nls_territory = AMERICA
*.nls_date_format = DD-MON-RR
*.nls_numeric_characters = ".,"
*.nls_sort = binary # Required 11i setting
*.nls_comp = binary # Required 11i setting
*.nls_length_semantics = BYTE # Required 11i setting
*.audit_trail = false # if you want auditing
PROD2.user_dump_dest = /opt/oracle/product/10.2.0/PROD/admin/PROD2_pind42/udump
PROD2.background_dump_dest = /opt/oracle/product/10.2.0/PROD/admin/PROD2_pind42/bdump
PROD2.core_dump_dest = /opt/oracle/product/10.2.0/PROD/admin/PROD2_pind42/cdump
PROD1.user_dump_dest = /opt/oracle/product/10.2.0/PROD/admin/PROD1_pind41/udump
PROD1.background_dump_dest = /opt/oracle/product/10.2.0/PROD/admin/PROD1_pind41/bdump
PROD1.core_dump_dest = /opt/oracle/product/10.2.0/PROD/admin/PROD1_pind41/cdump
*.max_dump_file_size = 20480 # trace file size
*.timed_statistics = true
*._trace_files_public = TRUE
*.processes = 1000 # Max. no. of users x 2
*.sessions = 2000 # 2 X processes
*.db_files = 512 # Max. no. of database files
*.dml_locks = 10000
*.cursor_sharing = EXACT # Required 11i settting
*.open_cursors = 600 # Consumes process memory, unless using MTS.
*.session_cached_cursors = 500
*.archive_lag_target = 1800
*.db_block_checking = FALSE
*.db_block_checksum = TRUE
#*.log_checkpoint_timeout = 1200 # Checkpoint at least every 20 mins.
#*.log_checkpoint_interval = 100000
*.fast_start_mttr_target = 60 #in seconds
*.log_checkpoints_to_alert = TRUE
*.log_buffer = 10485760
*.undo_management=AUTO # Required 11i setting
*.workarea_size_policy=AUTO # Required 11i setting
*.olap_page_pool_size = 4194304
*.shared_pool_size = 900M
*.shared_pool_reserved_size = 90M
*.streams_pool_size = 50331648
*.session_max_open_files = 25
*.java_pool_size = 250M
*.remote_login_passwordfile = exclusive
*.large_pool_size =200M
*.pga_aggregate_target = 8G
*.plsql_optimize_level = 2 # Required 11i setting
*.plsql_code_type = INTERPRETED # Required 11i setting
# *.plsql_code_type = NATIVE # Required 11i setting
# *.plsql_native_library_dir = /opt/oracle/product/10.2.0/PROD/plsql/nativelib
# *.plsql_native_library_subdir_count = 1000
PROD1.utl_file_dir = /pcp/applprod/common/temp,/pcp/applprod/common/xx_custom/outbound/gl,/pcp/applprod/common/xx_custom/inbound/gl,/pcp/applprod/common/EDI/inholding,/pcp/applprod/common/EDI/outholding,/pcp/applprod/common/xx_custom/outbound/acsis,/opt/oracle/product/10.2.0/PROD/appsutil/outbound/PROD1_pind41,/pcp/applprod/common/xx_custom/outbound/ceridian,/usr/tmp
PROD2.utl_file_dir = /pcp/applprod/common/temp,/pcp/applprod/common/xx_custom/outbound/gl,/pcp/applprod/common/xx_custom/inbound/gl,/pcp/applprod/common/EDI/inholding,/pcp/applprod/common/EDI/outholding,/pcp/applprod/common/xx_custom/outbound/acsis,/opt/oracle/product/10.2.0/PROD/appsutil/outbound/PROD2_pind42,/pcp/applprod/common/xx_custom/outbound/ceridian,/usr/tmp
*.job_queue_processes = 10
*.parallel_max_servers = 16
*.parallel_min_servers = 0
*._like_with_bind_as_equality = TRUE
*._sort_elimination_cost_ratio=5
*._fast_full_scan_enabled = FALSE
*._sqlexec_progression_cost=2147483647
*._b_tree_bitmap_plans = FALSE
*._immediate_commit_propagation = TRUE
*._lm_global_posts = TRUE
*._optimizer_cost_based_transformation=off
*.optimizer_secure_view_merging = FALSE
*._kks_use_mutex_pin = TRUE
*.sga_target = 32G
*.pre_page_sga = TRUE
*.smtp_out_server = 'it-cy1-smtp.powellind.pri'
*_fix_control='8544722:ON'

10gR2 ASM init.ora

##############################################################################
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
########################################################################

###########################################
# Cluster Database
###########################################
cluster_database=true

###########################################
# Diagnostics and Statistics
###########################################
background_dump_dest=/opt/oracle/product/10.2.0/asm/admin/+ASM/bdump
core_dump_dest=/opt/oracle/product/10.2.0/asm/admin/+ASM/cdump
user_dump_dest=/opt/oracle/product/10.2.0/asm/admin/+ASM/udump

###########################################
# Miscellaneous
###########################################
instance_type=asm

###########################################
# Pools
###########################################
large_pool_size=12M
db_cache_size = 64M
shared_pool_size = 128M # default is 48M

###########################################
# Security and Auditing
###########################################
remote_login_passwordfile=exclusive

asm_diskgroups='DSKGRP1'

+ASM1.instance_number=1
+ASM2.instance_number=2

*.processes=100

10gR2 ASM views

Viewing Information About Automatic Storage Management

V$ASM_DISKGROUP In an ASM instance, describes a disk group (number, name, size related info, state, and redundancy type).
In a DB instance, contains one row for every ASM disk group mounted by the local ASM instance.
This view performs disk discovery every time it is queried.

V$ASM_DISK In an ASM instance, contains one row for every disk discovered by the ASM instance, including disks that are not part of any disk group.
In a DB instance, contains rows only for disks in the disk groups in use by that DB instance.
This view performs disk discovery every time it is queried.

V$ASM_DISKGROUP_STAT Has the same columns as V$ASM_DISKGROUP, but to reduce overhead, does not perform a discovery when it is queried. It therefore does not return information on any disks that are new to the storage system. For the most accurate data, use
V$ASM_DISKGROUP instead.

V$ASM_DISK_STAT Has the same columns as V$ASM_DISK, but to reduce overhead, does not perform a discovery when it is queried. It therefore does not return information on any disks that are new to the storage system. For the most accurate data, use V$ASM_DISK instead.

V$ASM_FILE In an ASM instance, contains one row for every ASM file in every disk group mounted by the ASM instance.
In a DB instance, contains no rows.

V$ASM_TEMPLATE In an ASM or DB instance, contains one row for every template present in every disk group mounted by the ASM instance.

V$ASM_ALIAS In an ASM instance, contains one row for every alias present in every disk group mounted by the ASM instance.
In a DB instance, contains no rows.

V$ASM_OPERATION In an ASM instance, contains one row for every active ASM long running operation executing in the ASM instance.
In a DB instance, contains no rows.

V$ASM_CLIENT In an ASM instance, identifies databases using disk groups managed by the ASM instance.
In a DB instance, contains one row for the ASM instance if the database has any open ASM files.

10gR2 clusterware processes

oracle@pind22(PTCH2/DBTier):$ ps -ef|grep d.bin
oracle 7545 7544 0 Aug24 ? 00:00:32 /opt/oracle/product/10.2.0/crs/bin/evmd.bin
root 7687 5675 0 Aug24 ? 00:30:17 /opt/oracle/product/10.2.0/crs/bin/crsd.bin reboot
root 8102 7707 0 Aug24 ? 00:00:00 /opt/oracle/product/10.2.0/crs/bin/oprocd.bin run -t 1000 -m 500 -f
oracle 8231 7757 0 Aug24 ? 00:17:47 /opt/oracle/product/10.2.0/crs/bin/ocssd.bin

oracle@pind22(PTCH2/DBTier):$ ps -ef|grep racgimon
oracle 8736 1 0 Aug24 ? 00:00:04 /opt/oracle/product/10.2.0/asm/bin/racgimon daemon ora.pind22.ASM2.asm
oracle 25906 1 0 Sep09 ? 00:00:20 /opt/oracle/product/10.2.0/PTCH/bin/racgimon startd PTCH

EVMD: scans callout directory and invokes callouts in reactions to detected events.
CRSD: engine for high-availability operations. Uses the Oracle Cluster Registry (OCR) file for information such as cluster node list, cluster database instance to node mapping and CRS application resource profiles. The size is around 100MB and needs 2 copies.
OPROCD: is a process monitor for the cluster (not used on Linux and Window). As we are using Oracle Enterprise Linux and the process is running. It is used in Linux. We also hangcheck_timer for this.
OCSSD and RACGIMON: provides access to node membership and group service. Uses voting disk or quorum disk. The size of the disk is about 20MB and needs 3 copies.

The processes got started by Unix init process.

oracle@pind22(PTCH2/DBTier):$ ps -ef|grep init
root 5590 1 0 Aug24 ? 00:00:00 /bin/sh /etc/init.d/init.evmd run
root 5675 1 0 Aug24 ? 00:00:00 /bin/sh /etc/init.d/init.crsd run
root 5803 1 0 Aug24 ? 00:39:37 /bin/sh /etc/init.d/init.cssd fatal
root 7707 5803 0 Aug24 ? 00:00:00 /bin/sh /etc/init.d/init.cssd oprocd
root 7724 5803 0 Aug24 ? 00:00:00 /bin/sh /etc/init.d/init.cssd oclsomon
root 7757 5803 0 Aug24 ? 00:00:00 /bin/sh /etc/init.d/init.cssd daemon

using raw partitions

1. install shared disks
2. identify the shared disks to use
# fdisk -l
3. partition the device (assume using /dev/sda disk)
# fdisk /dev/sda
4. binding the partitions
4.1 identify the devices that are already bound
# /usr/bin/raw –qa
4.2 edit /etc/sysconfig/rawdevices in following format
/dev/raw/raw1 /dev/sda1
4.3 adjusting ownership and permission. For OCR root:dba and 640 respectively, and for Voting Disk oracle:dba and 660 respetively.
4.4 execute rawdevices command
# /sbin/service rawdevices restart

For red hat 5.0 using following binding mechanism. Edit 60-raw.rules and 99-raw-perms.rules, then un /sbin/start_udev

/etc/udev/rules.d/60-raw.rules
ACTION=="add", KERNEL=="emcpowerb1", RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add", KERNEL=="emcpowerc1", RUN+="/bin/raw /dev/raw/raw6 %N"
ACTION=="add", KERNEL=="emcpowero1", RUN+="/bin/raw /dev/raw/raw7 %N"
ACTION=="add", KERNEL=="emcpowerq1", RUN+="/bin/raw /dev/raw/raw8 %N"
ACTION=="add", KERNEL=="emcpowerr1", RUN+="/bin/raw /dev/raw/raw9 %N"

/etc/udev/rules.d/99-raw-perms.rules
KERNEL=="raw[5]" MODE="0640", GROUP="oinstall", OWNER="root"
KERNEL=="raw[6]" MODE="0666", GROUP="oinstall", OWNER="oracle"
KERNEL=="raw[7]" MODE="0666", GROUP="oinstall", OWNER="oracle"
KERNEL=="raw[8]" MODE="0666", GROUP="oinstall", OWNER="oracle"
KERNEL=="raw[9]" MODE="0640", GROUP="oinstall", OWNER="root"

email logfile on windows using blat

syntax:
Blat -to [optional switches (see below)]
Blat -install [[[]]] [-q]
Blat -profile [-delete | ""] [profile1] [profileN] [-q]
Blat -h [-q]

-install [ [ []]]
: set's SMTP server, sender, number of tries and port for profile
( and may be replaced by '-').

: file with the message body ('-' for console input, end with ^Z)
-to : recipient list (also -t) (comma separated)
-tf : recipient list filename
-subject : subject line (also -s)
-f : overrides the default sender address (must be known to server)
-i : a 'From:' address, not necessarily known to the SMTP server.
-cc : carbon copy recipient list (also -c) (comma separated)
-cf : cc recipient list filename
-bcc : blind carbon copy recipient list (also -bcc) (comma separated)
-bf : bcc recipient list filename
-organization : Organization field (also -o and -org)
-body : Message body
-x : Custom 'X-' header. eg: -x "X-INFO: Blat is Great!"
-r : Request return receipt.
-d : Request disposition notification.
-h : displays this help.
-q : supresses *all* output.
-debug : Echoes server communications to screen (disables '-q').
-noh : prevent X-Mailer header from showing homepage of blat
-noh2 : prevent X-Mailer header entirely
-p : send with SMTP server, user and port defined in .
-priority : set message priority 0 for low, 1 for high.
-server : Specify SMTP server to be used. (optionally, addr:port)
-port : port to be used on the server, defaults to SMTP (25)
-hostname : select the hostname used to send the message
-mime : MIME Quoted-Printable Content-Transfer-Encoding.
-enriched : Send an enriched text message (Content-Type=text/enriched)
-html : Send an HTML message (Content-Type=text/html)
-uuencode : Send (binary) file UUEncoded
-base64 : Send (binary) file using base64 (binary Mime)
-try : how many time blat should try to send. from '1' to 'INFINITE'
-attach : attach binary file to message (may be repeated)
-attacht : attach text file to message (may be repeated)
-ti : Set timeout to 'n' seconds.
-u : Username for AUTH LOGIN (use with -pw)
-pw : Password for AUTH LOGIN (use with -u)
-log : Log everything but usage to
-plain : Use AUTH PLAIN to login to SMTP server (use with -u -pw)
-charset : User defined charset. The default is ISO-8859-1

www.blat.net to download blat for windows.

blat %manual_load_logfile% -to

Blat -install

migration procedure for Oracle database 8i on Windows to 10g on Linux

migration procedure for Oracle database 8i on Windows (NT and 2000) to 10g Linux platform.

1.. Identify developers and business owners for the database and set up schedule to move and test the database.
2.. create the new database on Linux box using dbca with template USON_LINUX_DEV.dbt

2a. enable archive log

SQL> archive log list; # if archive log is not enabled, then shutdown database and startup mount, then alter database archivelog;

2b. enable flashback (a good feature for fixing user errors, need to enable archive log).

SQL> select flashback_on from v$database; the return is NO, the put database in mount stage, then alter database flashback on;

3.. check tablespaces on the source database (i.e., database on Windows). Create missing tablespaces in the target database (database on Linux).
Comments: 8i uses RBS, 10g uses UNDOTBS1.

Default tablespaces on 8i: SYSTEM,RBS,USERS,TEMP, and TOOLS.

Default tablespaces on 9i: SYSTEM, UNDOTBS1,USERS,TEMP, and SYSAUX.

Need to create TOOLS and other user defined tablespaces.

On Linux with ASM: create tablespace tools; command to create tablespace.

4.. Check database link on the source database. get a list of all database aliases listed on host column of dba_db_links. Then copy all entries for those database aliases from tnsnames.ora on source database to target database’ tnsnames.ora. Pay attention to the databases have been moved already.

5.. Check all jobs running against this database. For Window NT, at dos prompt, type at command. For Window 2000, use Window’s service.

6.. Move all source code from the source database host to the target database host in $ORACLE_BASE/admin/$ORACLE_SID/script/. Convert the dos batch job into shell script. Add environment variable setting in the shell scripts. Fix all file directories in the scripts. Put batch job log in $ORACLE_BASE/admin/$ORACLE_SID/log and data in $ORACLE_BASE/admin/$ORACLE_SID/data directories.

7.. Put the source database in the restrict mode.

8.. Make a full export of the target database on the database host (using the original exp command: i.e, 8i)

Exp system/manager full=y file=exp_full_${ORACLE_SID|.dmp log=exp_full_${ORACLE_SID}.log

9.. shutdown the source database.
10.. ftp the dump file and log file over to the target host in the binary mode. Put files in $ORACLE_BASE/admin/$ORACLE_SID/exp

11.. perform a full import with the ignore parameter enabled on the target database.


Imp system/manager full=y file=exp_full_${ORACLE_SID}.dmp log=imp_full_${ORACLE_SID}.log IGNORE=y

12.. review the import log file, fix error, work with developer to test the batch jobs. Ask developers to test the moved database.

sudo for oracle account

Add following to /etc/sudoers

oracle ALL=(ALL) NOPASSWD:ALL



This will enable oracle os account to run root.sh.

For remote OEM agent installation, this is required too.

mirror 10gR2 OCR and voting disks

During the ClusterWare installation phase, there is an option to choose mirroring of OCR and Voting Disks. As we did not mirror them, we did it. Here is the instruction for doing it.


VOTING DISKS
1. Login as root on pind22
2. . /home/oracle/.profile_crs ## source env
3. crsctl query css votedisk ##should return /dev/raw/raw6
4. take a backup: dd if=/dev/raw/raw6 of=/data/oradata/votingdisk.linn.bk
5. ls -al /dev/raw/* ##check pending disk device
6. add /dev/raw/raw7 and /dev/raw/raw8 as mirrors of voting disks online.
crsctl add css votedisk /dev/raw/raw7
crsctl add css votedisk /dev/raw/raw8
7. if adding online failed
crsctl stop crs ###on pind21/22, very important, need to shutdown crs on all cluster nodes
crsctl add css votedisk /dev/raw/raw7 -force
crsctl add css votedisk /dev/raw/raw8 –force
crsctl start crs ###on pind21/22
8. crsctl query css votedisk ## should return /dev/raw/raw6, /dev/raw/raw7, /dev/raw/raw8

OCR
1. login as root on pind22
2. . /home/oracle/.profile_crs ## source env
3. ocrcheck ## should return /dev/raw/raw5
4. ls –al /dev/raw/* ## /dev/raw/raw9 is pending disk device
5. ocrconfig –export /data/oradata/ocr.linn.dmp –s online ## for backup
6. ocrconfig –replace ocrmirror /dev/raw/raw9 ## add ocr mirror
7. ocrcheck ## should return /dev/raw/raw5 and /dev/raw/raw9 as ocr disk device


Output log:

[root@pind22 ~]# cd /home/oracle/
[root@pind22 oracle]# . .profile_crs
crs.root.pind22>crsctl query css votedisk
0. 0 /dev/raw/raw6

located 1 votedisk(s).
crs.root.pind22>dd if=/dev/raw/raw6 of=/data/oradata/votingdisk.linn.bk
2064384+0 records in
2064384+0 records out
1056964608 bytes (1.1 GB) copied, 399.387 seconds, 2.6 MB/s
crs.root.pind22>ls -al /dev/raw/*
crw-r----- 1 root oinstall 162, 5 Aug 13 10:45 /dev/raw/raw5
crw-rw-rw- 1 oracle oinstall 162, 6 Aug 24 13:18 /dev/raw/raw6
crw-rw-rw- 1 oracle oinstall 162, 7 Aug 13 10:45 /dev/raw/raw7
crw-rw-rw- 1 oracle oinstall 162, 8 Aug 13 10:45 /dev/raw/raw8
crw-r----- 1 root oinstall 162, 9 Aug 13 10:45 /dev/raw/raw9
crs.root.pind22>crsctl add css votedisk /dev/raw/raw7
Cluster is not in a ready state for online disk addition
crs.root.pind22>crsctl stop crs
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
crs.root.pind22>crsctl add css votedisk /dev/raw/raw7
Cluster is not in a ready state for online disk addition
crs.root.pind22>crsctl add css votedisk /dev/raw/raw7 -force
Now formatting voting disk: /dev/raw/raw7
successful addition of votedisk /dev/raw/raw7.
crs.root.pind22>crsctl add css votedisk /dev/raw/raw8 -force
Now formatting voting disk: /dev/raw/raw8
successful addition of votedisk /dev/raw/raw8.
crs.root.pind22>crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
crs.root.pind22>crsctl query css votedisk
0. 0 /dev/raw/raw6
1. 0 /dev/raw/raw7
2. 0 /dev/raw/raw8

located 3 votedisk(s).
crs.root.pind22>

crs.root.pind22>ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 1031920
Used space (kbytes) : 3320
Available space (kbytes) : 1028600
ID : 330979008
Device/File Name : /dev/raw/raw5
Device/File integrity check succeeded

Device/File not configured

Cluster registry integrity check succeeded

crs.root.pind22>ls -al /dev/raw/*
crw-r----- 1 root oinstall 162, 5 Aug 24 13:24 /dev/raw/raw5
crw-rw-rw- 1 oracle oinstall 162, 6 Aug 24 13:25 /dev/raw/raw6
crw-rw-rw- 1 oracle oinstall 162, 7 Aug 24 13:25 /dev/raw/raw7
crw-rw-rw- 1 oracle oinstall 162, 8 Aug 24 13:25 /dev/raw/raw8
crw-r----- 1 root oinstall 162, 9 Aug 13 10:45 /dev/raw/raw9
crs.root.pind22>ocrconfig -export /data/oradata/ocr.linn.dmp -s online
crs.root.pind22>ocrconfig -replace ocrmirror /dev/raw/raw9
crs.root.pind22>ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 1031920
Used space (kbytes) : 3320
Available space (kbytes) : 1028600
ID : 330979008
Device/File Name : /dev/raw/raw5
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw9
Device/File integrity check succeeded

Cluster registry integrity check succeeded

crs.root.pind22>


Due to bug 3972986 (see ref 2), Cluster is not in a ready state for online disk addition. Need to shutdown all databases and ASM, and then shutdown CRS.



REF:

1. OCR / Vote disk Maintenance Operations: (ADD/REMOVE/REPLACE/MOVE), including moving from RAW Devices to Block Devices. [ID 428681.1]
2. OCR Corruption after Adding/Removing voting disk to a cluster when CRS stack is running [ID 390880.1]

myadpatch

cd to patchtop (which has unzipped patchfiles)

adpatch patchtop=`pwd` driver=`ls u*.drv` logfile=adpatch_`ls u*drv|cut -d . -f 1`.log workers=$((2*`grep -c processor /proc/cpuinfo`))


for none interactive, set defaultsfile for adpatch.
defaultsfile=$APPL_TOP/admin/$TWO_TASK/adalldefaults.txt

fnd_conc_clone.setup_clean, cmclean.sql and fnd_net_services.remove_server

In fnd_net_services.remove_server

delete from fnd_app_servers
delete from fnd_appl_tops
delete from fnd_database_assignments
delete from fnd_database_instances
delete from fnd_database_services
delete from fnd_databases
delete from fnd_db_service_members
delete from fnd_oracle_homes
delete from fnd_system_server_map
delete from fnd_tns_alias_address_lists
delete from fnd_tns_alias_addresses
delete from fnd_tns_alias_descriptions
delete from fnd_tns_alias_set_usage
delete from fnd_tns_alias_sets
delete from fnd_tns_aliases
delete from fnd_tns_listener_ports
delete from fnd_tns_listeners


In fnd_conc_clone.setup_clean

Delete from fnd_concurrent_queue_size
Delete from fnd_concurrent_queues_tl
Delete from fnd_concurrent_queues
Delete from fnd_nodes;

truncate_table(OracleUserFND , 'FND_OAM_CONTEXT_FILES');
truncate_table(OracleUserFND , 'FND_OAM_APP_SYS_STATUS');

-- Added following JTF tables based on bug 2949216
truncate_table(OracleUserJTF , 'JTF_PREFAB_HA_COMPS');
truncate_table(OracleUserJTF , 'JTF_PREFAB_HA_FILTERS');
truncate_table(OracleUserJTF , 'JTF_PREFAB_HOST_APPS');
truncate_table(OracleUserJTF , 'JTF_PREFAB_WSH_POES_B');
truncate_table(OracleUserJTF , 'JTF_PREFAB_WSH_POES_TL');
truncate_table(OracleUserJTF , 'JTF_PREFAB_WSHP_POLICIES');
truncate_table(OracleUserJTF , 'JTF_PREFAB_CACHE_STATS');

truncate_table(OracleUserFND,'FND_APP_SERVERS');
truncate_table(OracleUserFND,'FND_APPL_TOPS');
truncate_table(OracleUserFND,'FND_APPS_SYSTEM');
truncate_table(OracleUserFND,'FND_DATABASE_ASSIGNMENTS');
truncate_table(OracleUserFND,'FND_DATABASE_INSTANCES');
truncate_table(OracleUserFND,'FND_DATABASE_SERVICES');
truncate_table(OracleUserFND,'FND_DATABASES');
truncate_table(OracleUserFND,'FND_DB_INSTANCE_PARAMS');
truncate_table(OracleUserFND,'FND_DB_SERVICE_MEMBERS');
truncate_table(OracleUserFND,'FND_OAM_CONTEXT_FILES');
truncate_table(OracleUserFND,'FND_ORACLE_HOMES');
truncate_table(OracleUserFND,'FND_SYSTEM_SERVER_MAP');
truncate_table(OracleUserFND,'FND_TNS_ALIAS_ADDRESS_LISTS');
truncate_table(OracleUserFND,'FND_TNS_ALIAS_ADDRESSES');
truncate_table(OracleUserFND,'FND_TNS_ALIAS_DESCRIPTIONS');
truncate_table(OracleUserFND,'FND_TNS_ALIAS_SET_USAGE');
truncate_table(OracleUserFND,'FND_TNS_ALIAS_SETS');
truncate_table(OracleUserFND,'FND_TNS_ALIASES');
truncate_table(OracleUserFND,'FND_TNS_LISTENER_PORTS');
truncate_table(OracleUserFND,'FND_TNS_LISTENERS');


fnd_conc_clone.setup_clean truncates all tables mentioned in fnd_net_services.remove_server procedure, thus do not need to run fnd_net_services.remove_server during cloning after running fnd_conc_clone.setup_clean.


In cmclean.sql

UPDATE fnd_concurrent_processes
UPDATE fnd_concurrent_queues
UPDATE fnd_concurrent_requests
UPDATE fnd_conflicts_domain
UPDATE fnd_concurrent_conflict_sets


As cmclean.sql and fnd_conc_clone.setup_clean touch different sets of concurrent request tables, it is better to run both during clone.

EBS Internal Concurrent Manager (ICM) starts all concurrent managers every minute

It was Friday morning at about 10:00am, we need to bounce the integration instance INT database tier to disable the archive log mode and apply a small patch in GL area. It was slow to shutdown and startup database. For the application patch, in the DEV, it only needs about 6 minute. However, in INT, it took about an hour.

The slowness of database caused a big problem to startup application tier. There are timeout when I tried to startup all nodes (two web/forms nodes and two concurrent manager and admin server nodes). Furthermore, the load average of database increased rapidly to about 500 and the server is no longer responding. We have to reboot the server.

After some digging, I also found that there are many processes on concurrent manager tier. The internal concurrent manager (ICM) log shows that ICM was starting all concurrent managers every minute. As there are a few concurrent processes configured for each manager, starting the concurrent manager will start all the concurrent processes. Each concurrent process has a corresponding database process. Thus, database server got overloaded and could not respond to new client request.

The slowness of database was determined to be a hugepage setting on Linux. The initial setting is for 8GB SGA. However, the INT database’s SGA got changed to 16GB. After resetting SGA back to 8GB, INT is back to normal.

However, ICM starts all concurrent managers when the database is 10 times slower than normal. This exposed a design fault for ICM. It appears that ICM is checking fnd_current_queues.target_processes and running_processes. If these two columns match, then ICM will go to sleep. Otherwise, start concurrent managers again. It appears the ICM is not checking timeout, Oracle errors etc.

A service request has been opened for Oracle to give us a patch to fix the ICM restarting concurrent managers very minute.

Sunday, May 30, 2010

Java Plug-in Fatal Error--Serveral Java Virtual Machines running in the same process caused an error

Go to File Menu -> Tools -> Manage Add-ons;
There make sure that only one Java Plug in is enabled!
This should solve the problem!

Also verify Control Panel-> Java-> Java(Tab) runtime options; make sure all point to the same javaw.exe file and that the version of Java is same!

Also recommended to clear Java cache.

This is also listed as a bug that is with Java 6 Update 10 http://bugs.sun.com/view_bug.do?bug_id=6516270

applsys password and adadmin adpatch

During adpatch and adadmin session, the ad tools ask ORACLE password of Application Object Library which is owned by APPLSYS. If the password for applsys is wrong or the account is locked/expired, the prompt for password appears again.

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....Unable to connect.

Error: The given ORACLE password is not the correct password.
Please re-enter the ORACLE username and password.

Enter the ORACLE password of Application Object Library [APPS] :

Check the password for apps and applsys and unlock them if necessary. Apps and applsys should have the same password.


REF:
Adpatch And Adadmin Utilities Will Not Accept Apps Password [ID 555251.1]

applying a new patch after the failed patch application

175485.1 How to apply an 11i patch when adpatch is already running
If you are applying a big patch which need hours and get into a problem which needs to apply another patch to fix the problem, you need above metalink internal note to apply this patch. As it is an internal note, you cannot download it from mysupport. Following is from beginapps.blogspot.com. check oracle-magic.blogspot.com for similar note.
However, if the patch is small, you can apply another patch by not continuing the previous adpatch run. After the patch fix, apply the previous patch again.
1. Using the adctrl utility, shutdown the workers.

a. adctrl
b. Select option 3 "Tell worker to shutdown/quit"

2. Backup the FND_INSTALL_PROCESSES table which is owned by the APPLSYS schema

a. sqlplus applsys/
b. create table fnd_Install_processes_back
as select * from fnd_Install_processes;
c. The 2 tables should have the same number of records.
select count(*) from fnd_Install_processes_back;
select count(*) from fnd_Install_processes;

3. Backup the AD_DEFERRED_JOBS table.

a. sqlplus applsys/
b. create table AD_DEFERRED_JOBS_back
as select * from AD_DEFERRED_JOBS;
c. The 2 tables should have the same number of records.
select count(*) from AD_DEFERRED_JOBS_back;
select count(*) from AD_DEFERRED_JOBS;

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

At this point, the adpatch session should have ended and the cursor should
be back at the Unix prompt.
a. cd $APPL_TOP/admin/
b. mv restart restart_back
c. mkdir restart

5. Drop the FND_INSTALL_PROCESSES table and the AD_DEFERRED_JOBS table.

a. sqlplus applsys/
b. drop table FND_INSTALL_PROCESSES;
c. drop table AD_DEFERRED_JOBS;

6. Apply the new patch.

7. Restore the .rf9 files located in $APPL_TOP/admin//restart_back
directory.

a. cd $APPL_TOP/admin/
b. mv restart restart_
c. mv restart_back restart

8. Restore the FND_INSTALL_PROCESSES table which is owned by the APPLSYS
schema.

a. sqlplus applsys/
b. create table fnd_Install_processes
as select * from fnd_Install_processes_back;
c. The 2 tables should have the same number of records.
select count(*) from fnd_Install_processes;
select count(*) from fnd_Install_processes_back;

9. Restore the AD_DEFERRED_JOBS table.

a. sqlplus applsys/
b. create table AD_DEFERRED_JOBS
as select * from AD_DEFERRED_JOBS_back;
c. The 2 tables should have the same number of records.
select count(*) from AD_DEFERRED_JOBS_back;
select count(*) from AD_DEFERRED_JOBS;

10. Re-create synonyms

a. sqlplus apps/apps
b. create synonym AD_DEFERRED_JOBS for APPLSYS.AD_DEFERRED_JOBS;
c. create synonym FND_INSTALL_PROCESSES FOR APPLSYS.FND_INSTALL_PROCESSES;

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

how to run hrglobal.drv

Hrglobal.drv and legislative data update

0. apply necessary legislative data update patch (either standalone data patch or combined with rollup patch. Apply required pre and post patches).

1. run data install

java oracle.apps.per.DataInstall apps appspw thin pind21:1571:PTCH1

choice 1: select legislative data to install/upgrade



Choice 1I (Global Human Resources Install)
Choice 5I (Canada Human Resources Install)
Choice 6I (Canada Payroll Install)
Choice 55I (United Kindom Human Resources Install)
Choice 56I (United Kindowm Payroll Install)
Choice 57I (United States Human Resources Install)
Choice 58I (United States Payroll Install)
(need to choose all with Installed under leg. data? Column)


Type enter key to return to main menu.



Choice 4 to exit to confirmation menu. Then type Y to exit and save.





2. Run hrglobal.drv

Login as applmgr
Cd $PER_TOP/patch/115/driver
Adpatch options=hotpatch driver=hrglobal.drv logfile=adpatch_hrglobal.log

Answer normal adpatch interview questions.


REF:

How to Install Legislative Data Using Data Installer and hrglobal.drv [ID 140511.1]
HRGLOBAL Basics [ID 300097.1]
Latest Oracle HRMS Legislative Data Patch Available (HR Global / hrglobal) [ID 145837.1]

How to bypass the regenerating seeded forms

CSFDCSTA.fmb has not used from release 11.5.8. However, running adadmin to regenerate all forms will have compilation error for package boby STAT. (Note 438795.1). You could just ignore the error message or you can disable the regeneration of this forms (Note 112327.1).

1. save a copy of csffile.drv in $CSF_TOP/admin/driver
cd $CSF_TOP/admin/driver
cp csffile.drv csffile.drv.orig

2. delete line with CSFDCSTA.fmb and CSFDCSTA.fmx in csffile.drv

3. run adadmin again and regenerate all forms in csf.

Ref:

Field Service Form CSFDCSTA.fmb Does not compile: Component ‘GET_SELECTED_TERR’ must be declared [ID 438795.1]

How Does ADADMIN know which forms fies to regenerate? [ID112327.1]

The troubling features of My Oracle Support as of March 8 2010

The classic metalink was retired during the weekend of November 6-8, 2009. My Oracle Support was in trial before then and I tried and did not like it. So I continued to use metalink until the cutoff date. After November 6-8, I did not have the choice although I hate My Oracle Support. I have compiled following features in My Oracle Support which I believe are troubling ones.

1. The first login page does not show me username/password fields but a sign-in button. I need to click the sign-in button and navigate to another page for username/password fields.
2. after login, I have to wait for a long time as the system is loading the dashboard.
3. The dashboard is confusing as there is too much info in it.
4. cannot use backspace button in SR upload message and SR: contact fields.
5. Service Request: radio button for technical SR and Non-Technical SR: should use check box. I want to display all of my service requests.
6. patch search: filter platform or language, not both.
7. session timeout: My Oracle Support Services Error: A server connection error occurred: IO Error #2032 Please try again later: should direct me to login page
8. logoff is slow than close the browser and start-over again.
9. Family pack and min-pack: does not include a link or pointer to more patches needed on top of these packs.
10. Talked to some Oracle reps in Sales, Education, Support etc. A lot of people know the problems with My Oracle Support, but no fix yet.
11. can not use the browser’s backpage button
12. service request updated (three choices during SR creation: update to SR, email, and phone): when choosing email option, analyst updated the service request and then My Oracle Support generated following email to me:

Please note that your Service Request Number 3-1220691331 has been updated. To view the update, please access My Oracle Support at https://support.oracle.com/ and choose the Service Requests tab.

Why not send me the actual updates?

13. service request escalation: there is no easy way to call analyst’s manager (no phone number or manager’s email address) or request for escalation. It is worse than metalink. In metalink, we know who is the manager for the support analyst.

In summary, the GUI design is total unacceptable. It is slow. The navigation is confusing and common keyboard features got disabled.

The GUI design follows same pattern as Oracle EBS. Comparing to Google’s web design, Oracle really needs to hire some product managers from Google.

how to run non-interactive ftp

##logfile="ftp.log"
##exec > $logfile 2>&1
echo 'THIS IS A TEST'
files=`find ftp* -mtime 0`
echo $files
for file in $files
do
ftp -vn peterpan <user oracle oracle
binary
pwd
mput $file
quit
EOF
done
echo 'FINISH'



peterpan here is the remote hostname with an account of oracle and password oracle.

non-interactively download data from websites

Here is an example on how to download current exchange data from a website:

wget "http://www.oanda.com/cgi-bin/fxcsv/fxcsv?client_id=oandatest&exch=USD&expr=EUR_BAM_INR" -O exchange.csv

Download data are stored in comma separate value in exchange.csv.

You could create a shell script to download other security data or even download books.

Tuesday, April 6, 2010

How to avoid ORA-01565 on database STARTUP due to failure to open spfile

We have an init.ora file points to the spfile:

oracle@pind41(PROD1/DBTier):$ cat initPROD1.ora
spfile='+DSKGRP1/PROD/PARAMETERFILE/spfilePROD.ora'

we started up the database using the actual initPROD1.ora.final file

oracle@pind41(PROD1/DBTier):$ ls -l initPROD1.ora.final
-rw-r--r-- 1 oracle oinstall 5438 Feb 21 08:07 initPROD1.ora.final

Then create spfile using following command:

SQL> create spfile='+DSKGRP1/PROD/PARAMETERFILE/spfilePROD.ora' using pfile;

SQL> shutdown immediate;
SQL> startup nomount
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DSKGRP1/PROD/PARAMETERFILE/spfilePROD.ora'
ORA-17503: ksfdopn:2 Failed to open file +DSKGRP1/PROD/PARAMETERFILE/spfilePROD.ora
ORA-01000: maximum open cursors exceeded

The above issue is due to creating spfile without specify the pfile so the default pfile was used to create the spfile. The default pfile is a pointer to the spfile.

Two ways to avoid the problem:

1. Follow Metalink Note 419509.1, specify the pfile with full path and file name when creating spfile.

2. rename initPROD1.ora to be initPROD1.ora.spfile and copy initPROD1.ora.final to initPROD1.ora, then startup database and create spfile. Copy initPROD1.ora.spfile to initPROD1.ora and then startup force.


REF:

ORA-01565 on database STARTUP due to failure to pen SPFILE[ID 419509.1].

schedule downtime and monitor adpatch, adadmin etc

1. schedule downtime: sitemap->maintenance->manage downtime schedules->schedule downtime

downtime page is at: http://{host}:{port}/OA_HTML/oam/nonUix/launchMode/restricted/downtime.html

2. OAM restricted mode

2.1 update contextfile, set s_trusted_admin_client_nodes to be the desktop ip address. (need to add load balancer ip address to if it is used).
2.2 Run adautocfg
2.3 Unlock database account ad_monitor and change password. Default password is lizard.
2.4 Run adadmin to put system in maintenance mode.
2.5 Start apache in restricted mode: adaprstctl.sh start|stop
2.6 login to OAM: http://{host}:{port}/servlets/weboam/oam/oamLogin
use ad_monitor to login to monitor the progress of adpatch / adadmin

login to the system using http://{host}:{port}/ to see the downtime maintenance page.

3. run adpatch or adadmin for system maintenance

4. remember to disable maintenance mode and run adaprstctl.sh stop

5. need to apply patch 4584326 if step 2.6 hangs.

6. Metalink Notes: 364236.1: Managing Downtime in Restricted Mode from OAM; 368503.1: Not able to login to Oracle applications manager

How to fix invalid database components

End users got invalid objects error and database eventually crashed. After starting up database, following components are invalidated: AMD (OLAP Catalog), CATPROC (Oracle Database Packages and Types), CONTEXT (Oracle Text) and ODM (Oracle Data Mining).

Attempt 1: use utlrp.sql to compile invalid objects: does not work.

Attempt 2: startup restrict and then run following: (does not work).
SQL>@?/rdbms/admin/catalog.sql
SQL>@?/rdbms/admin/catproc.sql
SQL>@?/rdbms/admin/utlrp.sql

Attempt 3: startup upgrade and then run following:
SQL>@?/rdbms/admin/catalog.sql
SQL>@?/rdbms/admin/catproc.sql
SQL>@?/rdbms/admin/utlrp.sql

It worked.

Here is the note from 10gR2 upgrade guide:

Note: The UPGRADE keyword allows you to open a pre-10.2
database. It also restricts logons to AS SYSDBA sessions, disables
system triggers, and performs additional operations that prepare the
environment for the upgrade.

Thus the upgrade keyword includes restricted mode. Furthermore, disables system triggers etc. Normally, upgrade key is used during an upgrade session. I believe we need to set _system_trig_enabled to be false under restricted mode before running catalog.sql, catproc.sql.

*._system_trig_enabled = TRUE # set FALSE for upgrades/migrations

Check and validate individual components:

SQL> Rem Indicate CATPROC load complete and check validity
SQL> BEGIN
2 dbms_registry.update_schema_list('CATPROC',
3 dbms_registry.schema_list_t('SYSTEM', 'OUTLN', 'DBSNMP'));
4 dbms_registry.loaded('CATPROC');
5 dbms_registry_sys.validate_catproc;
6 dbms_registry_sys.validate_catalog;
7 END;
8 /

Upgrade JDK to 1.6.0_017 in EBS 11i (11.5.10.2)

1. upgrade client plug-in to Jinitiator 1.3.1.x or JRE 1.5.0.x (native plug-in) before upgrading java to JDK 6.
2. down jdk 6.0 from http://java.sun.com/javase/downloads/index.jsp and run chmod
chmod +x $PATCH_TOP/jdk-6u17-linux-i586.bin
3. install jdk 6
mkdir $COMMON_TOP/util/java/1.6
cd $COMMON_TOP/util/java/1.6
$PATCH_TOP/jdk-6u17-linux-i586.bin
The installer will create a directory: jdk1.6.0_17 under $COMMON_TOP/util/java/1.6
4. apply ATG_PF.H.RUP5 5473858.
5. apply JDK 6 consolidated patch and other EBS interoperability patches
for 11.5.10.2: jdk 6 consolidated patch for 11.5.10CU2, patch 5622511 and contract core patch 5977502.
6. run the JDK 6 upgrade script to update configuration file
txkrun.pl –script=SetJDKCfg –contextfile=$CONTEXT_FILE –runautoconfig=Yes –appspass=appspwd –jdktop=$COMMON_TOP/util/java/1.6/jdk1.6.0_17
7. source env and check JRE related env variables are point to jdk1.6.0_17
8. replace $iAS_ORACLE_HOME/Apache/jdk to link to new jdk.
9. run adadmin to regenerate appsborg2.zip and product JAR files.

Reference:
Metalink Note 401561.1: Using J2SE version 6 with oracle e-business suite 11i

How to run adautocfg.sh and adcfgclone.sh in a script

Running adautocfg.sh and perl adcfgclone.pl will prompt for apps password. Here is the way to run it in non-interactive mode:

1. adautocfg.sh

adautocfg.sh appspass=appspw

using following method will generate invalid argument message but the message can be ignored.

echo appspw |adautocfg.sh

applptch@pind34(PTCH_806_BALANCE/Web:Forms:MWA):$ echo as46bw8 |adautocfg.sh
stty: standard input: Invalid argument
Enter the APPS user password :
stty: standard input: Invalid argument

2. adcfgclone.pl

echo appspw | perl adcfgclone.pl $CONTEXT_FILE

need to specify contextfile to prevent from cloning interview process for creating a new contextfile.

Note:
For suppressing stty error, add following in .bashrc

##to avoid following error
##stty: standard input: Invalid argument
if [ -t 0 ]; then
stty intr ^C
fi

menu_option for adadmin and adctrl

Menu Option Corresponding AD Administration Menu Choice
GEN_MESSAGES Generate message files
GEN_FORMS Generate form files
GEN_GRAPHICS Generate graphics files
GEN_REPORTS Generate reports files
GEN_JARS Generate product JAR files
RELINK Relink Applications programs
CREATE_ENV Create Applications environment file
COPY_FILES Copy files to destinations
CONVERT_CHARSET Convert character set
SCAN_APPLTOP Scan the APPL_TOP for exceptions
SCAM_CUSTOM_DIR Scan a CUSTOM directory for exceptions
LIST_SNAPSHOT List snapshots
UPDATE_CURRENT_VIEW Update current view snapshot
CREATE_SNAPSHOT Create named snapshot
EXPORT_SNAPSHOT Export snapshot to file
IMPORT_SNAPSHOT Import snapshot from file
DELETE_SNAPSHOT Delete named snapshot
CHECK_FILES Check for missing files
CMP_INVALID Compile APPS schema
CMP_MENU C ompile menu information
CMP_FLEXFIELDS Compile flexfield data in AOL tables
RELOAD_JARS Reload JAR files to database
VALIDATE_APPS Validate APPS schema
CREATE_GRANTS Recreate grants and synonyms for APPS schema
MAINTAIN_MLS Maintain multi-lingual tables
CHECK_DUAL Check DUAL table
MAINTAIN_MRC Maintain Multiple Reporting Currencies schema
CONVERT_MCURR Convert to Multiple Reporting Currencies
CONVERT_MULTI_ORG Convert to Multi-Org
ENABLE_MAINT_MODE Enable Maintenance Mode
DISABLE_MAINT_MODE Disable Maintenance Mode


$ adadmin defaultsfile=$APPL_TOP/admin/$TWO_TASK/admydefaults.txt menu_option=ENABLE_MAINT_MODE interactive=n



Menu Option Corresponding AD Control Menu Choice
ACKNOWLEDGE_QUIT Tell manager that a worker acknowledges quit
INFORM_FAILURE Tell manager that a worker failed its job
RESTART_JOB Tell worker to restart a failed job
SHOW_STATUS Show worker status
SHUTDOWN_WORKER Tell worker to quit
START_WORKER Restart a worker on the current machine

Note: Using any menu option on the command line, except for SHOW_STATUS, requires that you also use the worker_range= option. See the AD Controller command line help for details.

$ adctrl interactive=n defaults_file=$APPL_TOP/admin/prod/ctrldefs.txt \ logfile=adctr.log menu_option=SHOW_STATUS

ways to enable or disable or bypass maintenance mode during patching

1. run sql script

sqlplus -s apps/appspass @$AD_TOP/patch/115/sql/adsetmmd.sql ENABLE
sqlplus -s apps/appspass @$AD_TOP/patch/115/sql/adsetmmd.sql DISABLE

2. interactive adadmin

adadmin->(5) Change Maintenance Mode->(1) Enable Maintenance Mode

adadmin->(5) Change Maintenance Mode->(2) Disable Maintenance Mode


3. noninteractive adadmin

3.1 create defaults file:

adadmin defaultsfile=$APPL_TOP/admin/$TWO_TASK/admydefaults.txt

(for email notification prompt, need to answer No. answer Yes to give an email address)

(the passwords for system and applsys are hashed).

3.2 use the defaults file:

adadmin defaultsfile=$APPL_TOP/admin/$TWO_TASK/admydefaults.txt \ menu_option=DISABLE_MAINT_MODE interactive=n

adadmin defaultsfile=$APPL_TOP/admin/$TWO_TASK/admydefaults.txt \ menu_option=ENABLE_MAINT_MODE interactive=n


4. adpatch options=hotpatch to bypass maintenance mode

Need to follow Oracle Support to use this options while the system is up. For other patches, shutdown application first and then use hotpatch option to apply patches without enable maintenance mode.

rapidclone finishing tasks

1. dba_libraries
(see other blog entry, login as sys)

2. dba_directories
(see other blog entry, login as sys)

3. profile options
3.1 hard-coded mounting points in profile options
select * from fnd_profile_optuion_values –search for path
update fnd_profile_option_values
set profile_option_value=replace(profile_option_value,’/data/applprod’,’/data/applptch’);

3.2 update site name
update fnd_profile_option_values set profile_option_value ='Powell GOLD '||to_char(sysdate,'mm/dd/yyyy') where profile_option_id =(select profile_option_id from fnd_profile_options where profile_option_name='SITENAME');

3.3 update color schema (for easy differentiation among different environment)

update fnd_profile_option_values set profile_option_value ='RED' where profile_option_id =(select profile_option_id from fnd_profile_options where profile_option_name='FND_COLOR_SCHEME') and LEVEL_ID=10001 and LEVEL_VALUE=0;

Other colors
select * from fnd_lookups where lookup_type ='COLOR_SCHEME'

LOOKUP_TYPE LOOKUP_CODE MEANING
COLOR_SCHEME BLAF blaf
COLOR_SCHEME BLUE blue
COLOR_SCHEME KHAKI khaki
COLOR_SCHEME OLIVE olive
COLOR_SCHEME PURPLE purple
COLOR_SCHEME RED red
COLOR_SCHEME TEAL teal
COLOR_SCHEME TITANIUM titanium


4. printer settings

5. workflow
5.1 update over email address
update fnd_svc_comp_param_vals set parameter_value='oracle.powell@powellind.com' where parameter_id=(select parameter_id from fnd_svc_comp_params_tl where language='US' and display_name='Test Address');
5.2 update source system SID (PROD) and port (8000) in the URL
wf_notification_attributes.text_value
wf_item_attribute_values.text_value

5.3 wf_system
Select * from wf_system. Need to update name and display_name.
wf_system.GUID
wf_system.name

5.4 wf_agents.address
Select * from wf_agents. Need to update address
wf_agents.address

6. forms (optional)

fnd_form_functions.web_host_name
fnd_form_functions.web_agent_name

7. concurrent requests

fnd_concurrent_requests.log_file_name
fnd_concurrent_requests.out_file_name

8. cookie (in case load balancer and web servers on different domain)

example: web servers: .powellind.pri and load balancer: .powellind.com

update session_cookie_domain using the load balancer domain.

Update icx_parameters set session_cookie_domain = ‘.powellind.com’;

icx_parameters.session_cookie_domain

9. check $APPLCSF

10. dba_services (optional)
(see other blog entry, login as sys)

11. others

check fnd_concurrent_queues.node_name and node_name2, fnd_concurrent_requests.logfile_node_name.

postclone task (4) fix dba_services

New services are created during the cloning procedure. However, old services are not removed. Using dbms_service.delete_service(‘NAME’) to delete them.

SQL> col NAME format a20
SQL> col NETWORK_NAME format a45
SQL> select NAME,NETWORK_NAME,enabled from dba_services;

NAME NETWORK_NAME ENA
-------------------- --------------------------------------------- ---
SYS$BACKGROUND NO
SYS$USERS NO
PROD.powellind.com PROD.powellind.com
PROD PROD
PROD2 PROD2
PROD1 PROD1
PRODN.POWELLIND.COM PRODN.POWELLIND.COM
PRODN2 PRODN2
PRODN1 PRODN1
PRODN PRODN
APPLSYS.WF_CONTROL SYS$APPLSYS.WF_CONTROL.PRODN.POWELLIND.COM NO
DEV.POWELLIND.COM DEV.POWELLIND.COM NO
DEV2 DEV2 NO
DEV1 DEV1 NO
DEV DEV NO


SQL> exec dbms_service.delete_service('PROD.powellind.com');

PL/SQL procedure successfully completed.

SQL> exec dbms_service.delete_service('PROD');

PL/SQL procedure successfully completed.

SQL> exec dbms_service.delete_service('PROD2');

PL/SQL procedure successfully completed.

SQL> exec dbms_service.delete_service('PROD1');

PL/SQL procedure successfully completed.

SQL> exec dbms_service.delete_service('PRODN.POWELLIND.COM');

PL/SQL procedure successfully completed.

SQL> exec dbms_service.delete_service('PRODN2');

PL/SQL procedure successfully completed.

SQL> exec dbms_service.delete_service('PRODN1');

PL/SQL procedure successfully completed.

SQL> exec dbms_service.delete_service('PRODN');

PL/SQL procedure successfully completed.

SQL> exec dbms_service.STOP_SERVICE('APPLSYS.WF_CONTROL');

PL/SQL procedure successfully completed.

SQL> exec dbms_service.delete_service('APPLSYS.WF_CONTROL');

PL/SQL procedure successfully completed.

SQL> exec dbms_service.create_service('APPLSYS.WF_CONTROL','SYS$APPLSYS.WF_CONTROL.DEV.POWELLIND.COM');

PL/SQL procedure successfully completed.

SQL> exec dbms_service.start_SERVICE('APPLSYS.WF_CONTROL');

PL/SQL procedure successfully completed.

It is clean now:

SQL> select NAME,NETWORK_NAME,enabled from dba_services;

NAME NETWORK_NAME ENA
-------------------- --------------------------------------------- ---
SYS$BACKGROUND NO
SYS$USERS NO
APPLSYS.WF_CONTROL SYS$APPLSYS.WF_CONTROL.DEV.POWELLIND.COM NO
DEV.POWELLIND.COM DEV.POWELLIND.COM NO
DEV2 DEV2 NO
DEV1 DEV1 NO
DEV DEV


Reference:

1. Explicitly removing a Queue Service in RAC environment causes ORA-00600 [1 KWQVSS] [ID 602648.1]

postclone task (3) fix dba_directories

Database directories are not updated during the cloning procedure. You have to update them manually.

Select owner,directory_name,directory_path from dba_directories;

Use create or replace directory “directory_name” as “directory_path”; to update directories. Run from sys.

Use following query in the source system to find out the required priviledges that were granted:

Select * from dba_tab_privs where table_name in (select directory_name from dba_directories);


Directory has read and write privilege in database 10g.

Here is an example:

Drop Directory POWL_OUTBOUND_ACSIS;
Drop Directory POWL_OUTBOUND_EDI;
Drop Directory POWL_OUTBOUND_CERIDIAN;
Drop Directory CCR_CONFIG_DIR;
Drop Directory EBS_LL_CONFIG_DIR;
Drop Directory POWL_INBOUND_AMEX;
Drop Directory POWL_WIP_TRANS;

create or replace directory ADMIN_DIR
as '/opt/oracle/product/10.2.0/PTCH/md/admin';

create or replace directory WORK_DIR
as '/opt/oracle/product/10.2.0/PTCH/work';

create or replace directory DATA_PUMP_DIR
as '/opt/oracle/product/10.2.0/PTCH/rdbms/log';

create or replace directory ORACLE_OCM_CONFIG_DIR
as '/opt/oracle/product/10.2.0/PTCH/ccr/state';
grant ALL on dirctory ORACLE_OCM_CONFIG_DIR to ORACLE_OCM;


Create Directory CCR_CONFIG_DIR
As '/opt/oracle/product/10.2.0/db_2/ccr/state';

Create Directory EBS_LL_CONFIG_DIR
As '/opt/oracle/product/10.2.0/db_2/ccr/state';
grant ALL on dirctory EBS_LL_CONFIG_DIR to apps;

Create Directory POWL_INBOUND_GL
As '/pcp/applptch/common/xx_custom/inbound/gl';
Grant ALL on Directory POWL_INBOUND_GL to APPS;
Grant ALL on Directory POWL_INBOUND_GL to XX_CUSTOM;

Create Directory POWL_OUTBOUND_ACSIS
As '/pcp/applptch/common/xx_custom/outbound/acsis';
Grant ALL on Directory POWL_OUTBOUND_ACSIS to APPS;
Grant ALL on Directory POWL_OUTBOUND_ACSIS to XX_CUSTOM;

Create Directory POWL_OUTBOUND_EDI
As '/pcp/applptch/common/xx_custom/outbound/edi';
Grant ALL on Directory POWL_OUTBOUND_EDI to APPS;
Grant ALL on Directory POWL_OUTBOUND_EDI to XX_CUSTOM;

Create Directory POWL_OUTBOUND_CERIDIAN
As '/pcp/applptch/common/xx_custom/outbound/ceridian';
Grant ALL on Directory POWL_OUTBOUND_CERIDIAN to APPS;
Grant ALL on Directory POWL_OUTBOUND_CERIDIAN to XX_CUSTOM;

create or replace directory POWL_INBOUND_AMEX
As '/pcp/applptch/common/xx_custom/inbound/amex';
Grant ALL on Directory POWL_INBOUND_AMEX to APPS;
Grant ALL on Directory POWL_INBOUND_AMEX to XX_CUSTOM;

create or replace directory POWL_WIP_TRANS
As '/pcp/applptch/common/temp';
Grant ALL on Directory POWL_WIP_TRANS to APPS;
Grant ALL on Directory POWL_WIP_TRANS to XX_CUSTOM;

postclone task (2) fix dba_libraries

If you run adcfgclone.pl with dbTier component, following script will be called to update libraries: ctxsys.DR$LIBX, SYS.DBMS_SUMADV_LIB, and ORDSYS.ORDIMLIBS.

$ORACLE_HOME/appsutil/install//adupdlib.sql

If you manually created the database and only run adcfgclone.pl dbTechStack before cloning database, you need to run above script manually.

cd $ORACLE_HOME/appsutil/install//

sqlplus “/ as sysdba” @adupdlib.sql so

so is the library extension on linux and solaris. Check your system to see which extension you need to you.

SQL> col owner format a10
SQL> col file_spec format a60
SQL> set linesize 200
SQL> select OWNER,LIBRARY_NAME,FILE_SPEC
from dba_libraries where FILE_SPEC is not null;

OWNER LIBRARY_NAME FILE_SPEC
---------- ------------------------------ -----------------------------------------------------------
SYS DBMS_SUMADV_LIB /opt/oracle/product/10.2.0/DEV/lib/libqsmashr.so
SYSTEM NMUC_UTILS /opt/oracle/product/10.1.0/db_1/lib/libnmuc.so
SYSTEM EPS_LIB eps.so
ORDSYS ORDIMLIBS /opt/oracle/product/10.2.0/DEV/lib/libordim10.so
MDSYS SDO_GEOR_LIZARDTECH_LIB /opt/oracle/product/10.2.0/db_2/md/dll/liblt_dbmrsid_oci.so

Above is from my DEV environment. I am missing ctxsys.DR$LIBX (it is fine as only required for version before database 10g) and system.NUMUC_UTILS and MDSYS.SDO_GEOR_LIZARDTECH_LIB are wrong.

However, liblt_dbmrsid_oci.so does not exist on the system. Nevertheless, just create or replace it with correct path:

Create or replace library system.NMUC_UTILS as ‘/opt/oracle/product/10.2.0/DEV/lib/libnumuc.so’;
/

Create or replace library mdsys.SDO_GEOR_LIZARDTECH_LIB as
‘/opt/oracle/product/10.2.0/DEV/md/dll/liblt_dbmrsid_oci.so’;
/

Check following to see if grant execute on library to the intended users are correct:

Select * from dba_tab_priv where table_name in (select library_name from dba_libraries);

postclone task (1) fix symbolic links on apps tier

After cloning, the symbolic links need to be re-created. 6iserver in $IAS_ORACLE_HOME and jdk in $IAS_ORACLE_HOME/Apache. If your system has some customization, need to check the symbolic in $XX_CUSTOM_TOP. Following is my script to fix the symbolic links: fix_apps_symboliclink.sh


##run after source APPS.env
cd $IAS_ORACLE_HOME
rm 6iserver
ln -s $ORACLE_HOME 6iserver

cd $IAS_ORACLE_HOME/Apache
rm jdk
ln -s $OA_JRE_TOP jdk

cd $XX_CUSTOM_TOP/bin
rm POWLCERIDIAN
ln -s $FND_TOP/bin/fndcpesr POWLCERIDIAN

rm POWL_CERIDIAN_CMD
ln -s $FND_TOP/bin/fndcpesr POWL_CERIDIAN_CMD

rm POWL_MANUFAC_SUMMARY_RPT
ln -s $FND_TOP/bin/fndcpesr POWL_MANUFAC_SUMMARY_RPT

rm POWLPOACSIS
ln -s $FND_TOP/bin/fndcpesr POWLPOACSIS

rm POWLPOEDI
ln -s $FND_TOP/bin/fndcpesr POWLPOEDI

rm POWL_RS_STATION_RPT
ln -s $FND_TOP/bin/fndcpesr POWL_RS_STATION_RPT

rm XXPOW_CUSTOMER_BOM_RPT_LOG
ln -s $FND_TOP/bin/fndcpesr XXPOW_CUSTOMER_BOM_RPT_LOG

Using SUN JRE 1.6.0_017 with EBS 11i (11.5.10.2)

1.download the JRE plug-in Oracle E-Business Suite interoperability patch 6861618.

2. download the JRE 6 (JRE 1.6.0_X) plug-in from http://java.sun.com/javase/downloads/index.jsp.

3. download prerequisite patches (conditional)
For Developer 6i Patchset 19 users: patch 8717874.
For Developer 6i Patchset 18 users: patches 8753046 and 5884875.

4. rename jre-6uX-windows-i586 to j2se160X.exe. For example: rename jre-6u17-windows-i586 to j2se16017.exe

5. put j2se16017.exe in $COMMON_TOP/util/jinitiator on web tier and rename the old jinitiator or previous versions of jre.

6. apply prerequisite patches based on Developer 6i patchset level

7. apply interoperability patch 6861618 (need this patch when upgrade from jinitiator)

8. run txkSetPlugin.sh which in $PATCH_TOP/6861618/fnd/bin against the web nodes. It will update contextfile, update the version used by Workflow and run AutoConfig to incorporate the new values throughout your application. (need to run it when upgrade from jinitiator or upgrade from previous versions of jre on all web nodes)

txkSetPlugin.sh jversion

example: txkSetPlugin.sh 16017



Reference:
Deploying Sun JRE (Native Plug-in) for Windows clients in Oracle E-Business Suite 11i [ID 290807.1]

Status code and Phase code for Concurrent requests

Status code and Phase code for Concurrent requests
Here is what the abbreviation for status code and phase code means for Concurrent Requests in Oracle Apps

select lookup_type,lookup_code,meaning
from fnd_lookups
where lookup_type in ('CP_STATUS_CODE','CP_PHASE_CODE')

LOOKUP_TYPE LOOKUP_CODE MEANING
CP_PHASE_CODE C Completed
CP_PHASE_CODE I Inactive
CP_PHASE_CODE P Pending
CP_PHASE_CODE R Running

CP_STATUS_CODE A Waiting (1)
CP_STATUS_CODE B Resuming
CP_STATUS_CODE C Normal (1)
CP_STATUS_CODE D Cancelled
CP_STATUS_CODE E Error
CP_STATUS_CODE G Warning
CP_STATUS_CODE H On Hold
CP_STATUS_CODE I Normal (2)
CP_STATUS_CODE M No Manager
CP_STATUS_CODE P Scheduled
CP_STATUS_CODE Q Standby
CP_STATUS_CODE R Normal (3)
CP_STATUS_CODE S Suspended
CP_STATUS_CODE T Terminating
CP_STATUS_CODE U Disabled
CP_STATUS_CODE W Paused
CP_STATUS_CODE X Terminated
CP_STATUS_CODE Z Waiting (2)

Note above that there are three status codes for Normal: C, I, and R and there are two satus codes for Waiting: A and Z.
Thus a request in "Running" "Normal" state will have phase_code "R" and status_code"R"

logfile location for ad tools

1. Rapidclone, rapidinstall and aduatocfg.sh

$APPL_TOP/admin/${CONTEXT_NAME}/log/MMDDhhmm/adconfig.log

$APPL_TOP/admin/${CONTEXT_NAME}/log/ApplyAppsTier_MMDDhhmm.log

$ORACLE_HOME/appsutil/log/${CONTEXT_NAME}/ApplyDBTechStack_MMDDhhmm.log

$ORACLE_HOME/appsutil/log/${CONTEXT_NAME}/MMDDhhmm/adconfig.log

2. adadmin, adpatch, adaimgr, adctrl, autoconfig run from adpatch, relink from adadmin logs


$APPL_TOP/admin/${TWO_TASK}/log


3. Restart files for adadmin and adpatch

$APPL_TOP/admin/${TWO_TASK}/restart


4. adrelink.sh, admkappsutil.pl

$APPL_TOP/admin/log

For relink AD tools, need to use adrelink.sh. adrelink.sh can be used for other products or run adadmin relink option.


5. start/stop services:

$COMMON_TOP/admin/log/${CONTEXT_NAME}/MMDDhhmm.log


6. CONTEXT_NAME and TWO_TASK

CONTEXT_NAME=${SID}_hostname

TWO_TASK=${SID} or ${SID}_806_BALANCE

adpatch operations

1. prompts for required information about the patch
2. unloads patch metadata and verifies prerequisite patches have been applied (need most recent snaphosts:run adadmin->maintain snapshots option)
3. uploads patch history information to the database from previous run (if needed).
4. reads and validates the patch driver file.
5. reads product file driver files.
6. extracts object modules from the product libraries (so it can compare version numbers on the object modules it extracts)
7. compares the version numbers of the existing files against the files in the patch (version checking)
8. backs up any existing files that will be changed.
9. copies files
10. archives files into libraries.
11. relinks executables.
12. generates Java archive (JAR) files.
13. compiles JSP files.
14. updates database objects.
15. maintains the MRC schema, if needed.
16. compiles invalid database objects.
17. generates forms, reports, message, and graphics files.
18. runs AutoConfig to update configuration files, if any template files are introduced or updated by the patch.
19. saves patch history information to the database.