Sunday, January 1, 2012

What Is Oracle Patch & How to Apply By Khurram

what is oracle patch & how to apply


patch is program (set of instructions) to fix a particular problem or enhance/ add a particular feature in existing program/product/software

in my view patch is refer as a form, rreport, routine, module, application up gradation subset. Which is of different type. e.g
·         standalone patch
·         mini pach
·         family patch
·         module up gradation patch
·         maintenance patch
·         release up gradation patch – rup

types of file in patch

cxxxx.drv         the ‘c’ or copy driver
dxxxx.drv         the ‘d’ or ‘database’ driver
gxxxx.drv         the ‘g’ or ‘generate’ driver  -form rep chart
jxxxx.zip         jar file

you can download patch file using metalink account from oracle.support


applying/installing patch

recommended always apply patch on test instance… so make a fresh clone of prod server on test instance

1.  log out all user from apps, shutdown the concurrent manager
2.  set the environment variable on application instance.
3.  enable maintenance mode using adadmin or adpatch options=hotpatch (do not bring application in maintenance mode)
unzip the patch (you can unzip file in windows environment & then move the patch folder on linax platform using any ftp tool)
4.  read the readme file and perform all pre-requsite (such as apply prerequisite patches)
5.  the sequence of applying patche in patch file is as under…
a.  first apply cxxxx.drv
b.  then install dxxxx.drv
c.  then install gxxxx.drv
6.  to start patching process type adpatch (press enter key)



7.  adpach’s application prompt default answer included in [] symbol to accept press enter key.
8.  adpatch.log file is a default log file but however it is highly recommended to name log file as per patch file name like p21345_r12_linux.log my recommendation is also mention date with patch log file
9.  some time patch process is too long.. so u r requested to provide 1 or multiple e-mail address for notification… but it is not mandatory
10.select the batch size default is 1000.. this prompt allows you to specify how many rows will be updated at a time. it is recommended that you accept the default unless you know your system well.
11.enter the name of the oracle applications environment that this appl_top belongs to. e.g prod or test
a.  applications environment name [prod]
12.for other question chose default values if you have not enough knowledge about your system
13.autopatch needs the password for your 'system' oracle schema (note provide operating system user password who is the owner of oracle application)
14.autopatch needs the password for oracle application [apps] (note provide apps user password)
15.enter the directory where your oracle applications patch has been unziped
16.please enter the name of your autopatch driver file: type the name of driver file that needs to be used for this session of adpatch. for example, d23456.drv
17.perform post configuration step in readme file as per recommendation
18.after completing must check the patch log file
19.disable maintenance mode using adadmin
20.start application services
21.and check the desired functionality

EBS - R12 MAINTENANCE MODE – (ADADMIN) By Khurram

maintenance mode – (adadmin)

when you are going to install a patch on application the recommended option is that enable maintenance node. to bring the application in maintenance mode. when you enable or disable ‘maintenance mode’, adadmin will execute the script.



enable maintenance mode:
@>/ad_top/patch/115/sql/adsetmmd.sql enable

disable maintenance mode:
@>/ad_top/patch/115/sql/adsetmmd.sql disable

to verify if the environment is in maintenance mode or not execute following script.

select fnd_profile.value('apps_maintenance_mode') as status
from dual;

if the status
“maint” =       maintenance mode has been enabled and the users will not be able to login.
“normal”       =       maintenance mode has been de-activated and the users will be able to login.



how to enable the maintenance mode





set the environment variable on application instance.
run the ad administration utility by typing adadmin on console window. chose option 5 from the selection menu.

1.generate applications file menu.
2.maintain applications file menu.
3.compile/reload applications database entities menu.
4.maintain applications database entities menu.
5.change maintenance mode.
6.exit ad administration.

Monday, September 26, 2011

Document Archiving System by Khurram

A Document Archiving System (DAS) is a computer system (or set of computer programs) used to track and store electronic documents and/or images of paper documents. It is usually also capable of keeping track of the different versions created by different users (history tracking). The term has some overlap with the concepts of content management systems. It is often viewed as a component of enterprise content management (ECM) systems and related to digital asset management, document imaging, workflow systems and records management systems

Work Flow for Documents Archiving for NAFH – Saudi Arabia




Tuesday, August 9, 2011

Oracle SQL Developer Data Modeler

Oracle SQL Developer Data Modeler

SQL Developer Data Modeler is a free data modeling and design tool, proving a full spectrum of data and database modeling tools and utilities, including modeling for Entity Relationship Diagrams (ERD), Relational (database design), Data Type and Multi-dimensional modeling, with forward and reverse engineering and DDL code generation. The Data Modeler imports from and exports to a variety of sources and targets, provides a variety of formatting options and validates the models through a predefined set of design rules.
















View Demo on Oracle Website
http://download.oracle.com/otn_hosted_doc/sqldev/DataModeler30NewFeaturesOverview/DataModeler30NewFeaturesOverview.html




Tuesday, August 2, 2011

EBS -R12 Log File Locations

EBS -R12 Log File Locations













Log Description
Log Location
Start up/Shutdown error message text files
$INST_TOP/apps/$CONTEXT_NAME/logs/appl/admin/log
Start up/Shutdown error message related to tech stack
$INST_TOP/apps/$CONTEXT_NAME/logs/ora/  (10.1.2 & 10.1.3)
$INST_TOP/apps/$CONTEXT_NAME/logs/ora/10.1.3/Apache/error_log[timestamp]
$INST_TOP/apps/$CONTEXT_NAME/logs/ora/10.1.3/opmn/ (OC4J~…, oa*, opmn.log)
$INST_TOP/apps/$CONTEXT_NAME/logs/ora/10.1.2/network/ (listener log)
$INST_TOP/apps/$CONTEXT_NAME/logs/appl/conc/log  (CM log files)
Pre-clone log files in source instance Database Tier
/$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/(StageDBTier_MMDDHHMM.log)
Pre-clone log files in source instance Application Tier
$INST_TOP/apps/$CONTEXT_NAME/admin/log/ (StageAppsTier_MMDDHHMM.log)
Pre-clone log files in target instance Database Tier
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/ApplyDBTier_<time>.log
Pre-clone log files in target instance Application Tier
$INST_TOP/apps/$CONTEXT_NAME/admin/log/ApplyAppsTier_<time>.log
Application Tier adpatch log
$APPL_TOP/admin/$SID/log/
Developer (Developer/Forms & Reports 10.1.2) Patch
$ORACLE_HOME/.patch_storage
Web Server (Apache) patch
$IAS_ORACLE_HOME/.patch_storage
Database Tier opatch log
$ORACLE_HOME/.patch_storage
Database Tier Autoconfig log
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/MMDDHHMM/adconfig.log
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/MMDDHHMM/NetServiceHandler.log
Application Tier Autoconfig log 
$INST_TOP/apps/$CONTEXT_NAME/admin/log/$MMDDHHMM/adconfig.log
Autoconfig context file location
$INST_TOP/apps/$CONTEXT_NAME/appl/admin/$CONTEXT_NAME.xml
Alert Log Files
$ORACLE_HOME/admin/$CONTEXT_NAME/bdump/alert_$SID.log

Thursday, July 28, 2011

Table Locked By EBS User - By Khurram

Table Locked By EBS-R12 User - By Khurram



SELECT
      d_c.owner As Schema_Name
      ,d_c.object_name As Schema_Obj
      ,d_c.object_type As Schema_Obj_Type
      ,v_p.pid As Process_ID
      ,v_p.spid AS OS_Process_ID
      ,v_s.process As Process_#
      ,v_s.status As Session_Status
      ,v_s.module As Apps_Module
      ,v_s.machine As Apps_MAchine
      ,f_u.user_name As Locked_By
      ,f_l.start_time As Locked_On
      ,v_s.osuser As OS_User
      ,v_l_o.oracle_username As Apps_User     
FROM
      fnd_logins        f_l
      ,fnd_user         f_u
      ,v$locked_object  v_l_o
      ,dba_objects      d_c
      ,v$process        v_p
      ,v$session        v_s   
WHERE
      v_l_o.object_id = d_c.object_id
AND   v_s.sid = v_l_o.session_id
AND   v_p.pid = f_l.pid(+)
AND   f_l.user_id = f_u.user_id(+)
AND   v_s.paddr = v_p.addr
AND   v_p.spid = f_l.process_spid(+)
AND   nvl(v_s.status,'ABC') != 'KILLED'
AND   d_c.object_name LIKE '%' || upper('&Table_Name_R_LeaveBlank') || '%'

;

Oracle - Foreign Currency in Word by Khurram













create or replace function Spell_Number( p_number in number )

return varchar2

as

/*------------------------------------------------------------------------
Author            Khurram Altaf
Created On        July 27, 2011
Trigger           Spell_Number
Description       Generates a Word Expression against Number
------------------------------------------------------------------------*/

type myArray is table of varchar2(255);

l_str

myArray := myArray( '',

' thousand ', ' million ',

' billion ', ' trillion ',

' quadrillion ', ' quintillion ',

' sextillion ', ' septillion ',

' octillion ', ' nonillion ',

' decillion ', ' undecillion ',

' duodecillion ' );

l_num varchar2(50) default trunc( p_number );

l_return varchar2(4000);

begin

for i in 1..l_str.count

loop

exit when l_num is null;

if ( substr(l_num, length(l_num)-2, 3) <> 0 )

then

l_return := to_char(to_date(substr(l_num, length(l_num)-2, 3),'J' ),
'Jsp' ) || l_str(i) || l_return;

end if;

l_num := substr( l_num, 1, length(l_num)-3 );

end loop;

return l_return;

end;

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

select Spell_Number(193246) from dual;

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