Wednesday, 9 May 2018

relink a single executable (binary file) using ADADMIN utility

In this post, I would like to write something useful for patching and fine-tuning. When times, we have to relink a particular binary file (executable) in connection with patching or else corrupted file etc. I am providing the step-by-step procedure of relinking a particular executable.

Login as owner of Application Tier and source the environment file before starting

]$ adadmin

You have to enter the answers to the prompt of adadmin as usual

At the AD Administration Main Menu select the option: Maintain Applications Files menu

1. At the Maintain Applications Files menu select the option: Relink Applications programs

2. At the prompt "Do you wish to proceed with the relink [Yes] ?" Hit return for the default option.

2. At the prompt "Enter the name of your Oracle Applications environment file below.
File name [*.env]" 
Hit return for the default option or correct the file if necessary.

3. At the prompt "Enter list of products to link ('all' for all products) [all] :" enter the product's short name associated with the target executable, such as "fnd".

4. At the prompt "Generate specific executables for each selected product [No] ?" enter Yes

5. At the prompt "Relink with debug information [No] ?" Hit return for the default option.

6. At the prompt "Enter executables to relink, or enter 'all' [all] :" the exact name of the executable to be relinked.


scripts]$ cd $AD_TOP

12.0.0]$ cd bin

bin]$ ls
adadmin    adchkdig    adcustomizer.sh  adgensgn.sh    admrgpch    adproc.sh    adsplice_wrapper  adutils.sh   adadminnew      adchkutl.sh     adcustupld.pl    adgentns.pl     admsi_main.pl    adpwhide.cmd    adsstart          advldmerge.pl     adadmin_wrapper     adclonectx.pl     adcvm.cmd      adgetlnxver.sh   admsi.pl     adpwmask        adtmplreport.cmd  adwait      adaimgr     adclone.pl      adcvm.sh     adgetnode.cmd    adncnv       adrebase        adtmplreport.sh   adworker      adbldxml.pl     adclone.sh      addefgen     adgetreg      adodfcmp      adregenv        adtopgen.sh       adxerr.pl     adcfginfo.cmd    adconfig.cmd      addlnctl.pl      adident      adogdgen.sh      adrelinknew.sh  aducsifm.pm      adcfginfo.sh     adconfig.pl     addmimp      adjava      adownmt.sh     adrelink.sh     aducsifm.sh     adchgatname.pl   adconfig.sh     addos2unix.pl    adjkey     adpatch      adsctest.sh     aducssp.pl    adchgbase.pl     adctrl    adgenhfver.pl    adlibin.sh     adpatchnew       adshell.pl      aducssp.sh    adchgjreopt.pl   adctrlnew     adgenhnm     adlibout.sh     adpatch_wrapper  adshell.sh      adunload.sh     adchkcfg.cmd adctrl_wrapper    adgennls.pl    admerge.pl    adphmigr.pl    adsplice    adurs     adchkcfg.sh      adcustomizer.cmd  adgenpsf.pl      admkappsutil.pl  adprmkey adsplicenew     adutils.pl

bin]$ mkdir bkp

bin]$ mv adpatch bkp

To relink adpatch:
bin]$ adrelink.sh force=y ‘ad adpatch’

**********************************************************
You are running adrelink, version 120.43
Start of adrelink session
Date/time is  Tue Jan 16 18:14:39 IST 2018
adrelink is exiting with status 0
End of adrelink session
Date/time is  Tue Jan 16 18:14:54 IST 2018
**********************************************************
Line-wrapping log file for readability ...
Done line-wrapping log file.
Original copy is /u02/home/apps/apps_st/appl/admin/log/adrelink.lsv
New copy is /u02/home/apps/apps_st/appl/admin/log/adrelink.log


Another short-cut is that

Go to cd $AD_TOP/bin


To relink  more than one like- adpatch, adsplice, and adadmin:

bin]$ adrelink.sh force=y "ad adpatch" "ad adsplice" "ad adadmin"



To relink all AD executables:

bin]$ adrelink.sh force=y "ad all"

Regenerate Form files in Apps R12 using adadmin

~]$ cd $GL_TOP/forms/US
US]$ ls
GLXACCMB.fmx  GLXBDCAL.fmx  GLXCODEF.fmx  GLXELDEF.fmx  GLXIQBUD.fmx  GLXJIRUN.fmx  GLXRCREV.fmx  GLXSTAPO.fmx  GLXSTEAL.fmx  GLXSTSPM.fmx     GLXACINT.fmx  GLXBDDEF.fmx  GLXCOMAP.fmx  GLXELGEN.fmx  GLXIQCDR.fmx  GLXMADEF.fmx  GLXRJDEF.fmx  GLXSTARV.fmx  GLXSTENC.fmx  GLXSTSRC.fmx    GLXACSUM.fmx  GLXBDENT.fmx  GLXCOMST.fmx  GLXFCRVL.fmx  GLXIQFUN.fmx  GLXMAGEN.fmx  GLXRJGEN.fmx  GLXSTBCG.fmx  GLXSTGTC.fmx  GLXSTTRC.fmx     GLXACSUS.fmx  GLXBDFRZ.fmx  GLXCOPRG.fmx  GLXFCXLT.fmx  GLXJEENT.fmx  GLXMMWKB.fmx  GLXRTDLY.fmx  GLXSTCAL.fmx  GLXSTLST.fmx  GLXSTUOM.fmx     GLXALGEN.fmx  GLXBDORG.fmx  GLXCORST.fmx  GLXIQACC.fmx  GLXJEPST.fmx  GLXOCPER.fmx  GLXRTHST.fmx  GLXSTCAT.fmx  GLXSTPRG.fmx   GLXALVAS.fmx  GLXBDUPL.fmx  GLXCORUN.fmx  GLXIQAVG.fmx  GLXJEREV.fmx  GLXOCYCF.fmx  GLXRTTYP.fmx  GLXSTDAA.fmx  GLXSTPTY.fmx     GLXALWKB.fmx  GLXBDXFR.fmx  GLXCOWRK.fmx  GLXIQBCT.fmx  GLXJICOR.fmx  GLXRCENT.fmx  GLXSTACC.fmx  GLXSTDAC.fmx  GLXSTSCH.fmx
US]$ ls -l | wc -l
68
US]$ mkdir bkp
US]$ mv *.fmx bkp
US]$ ls
bkp
US]$ cd $AD_TOP/bin
US]$ adadmin
Is this the correct APPL_TOP [Yes] ? <Enter>
Filename [adadmin.log] : <Enter>
Do you wish to activate this feature [No] ? <Enter>
Please enter the batchsize [1000] : <Enter>
Is this the correct database [Yes] ? <Enter>
Enter the password for your 'SYSTEM' ORACLE schema: ******* <Enter>
Enter the ORACLE password of Application Object Library [APPS] : **** <Enter>

            AD Administration Main Menu
   --------------------------------------------------
   1.    Generate Applications Files menu
   2.    Maintain Applications Files menu
   3.    Compile/Reload Applications Database Entities menu
   4.    Maintain Applications Database Entities menu
   5.    Change Maintenance Mode
   6.    Exit AD Administration
Enter your choice [6] : 1 <Enter>

Generate Applications Files
   ----------------------------------------
   1.    Generate message files
   2.    Generate form files
   3.    Generate report files
   4.    Generate product JAR files
   5.    Return to Main Menu

Enter your choice [5] : 2 <Enter>
Enter the number of workers [4] : <Enter>
using this character set [Yes] ? <Enter>
Do you want to regenerate Oracle Forms PL/SQL library files [Yes] ? <Enter>
Do you want to regenerate Oracle Forms menu files [Yes] ? <Enter>
Do you want to regenerate Oracle Forms executable files [Yes] ? <Enter>
Enter list of products ('all' for all products) [all] : gl <Enter>
Generate specific forms objects for each selected product [No] ? <Enter>
Enter list of languages ('all' for all of the above) [all] : <Enter>
Is this the correct set of languages [Yes] ? <Enter>
Review the messages above, then press [Return] to continue. <Enter>

~]$ cd $GL_TOP//forms/US
US]$ ls
GLXACCMB.fmx  GLXBDCAL.fmx  GLXCODEF.fmx  GLXELDEF.fmx  GLXIQBUD.fmx  GLXJIRUN.fmx  GLXRCREV.fmx  GLXSTAPO.fmx  GLXSTEAL.fmx  GLXSTSPM.fmx     GLXACINT.fmx  GLXBDDEF.fmx  GLXCOMAP.fmx  GLXELGEN.fmx  GLXIQCDR.fmx  GLXMADEF.fmx  GLXRJDEF.fmx  GLXSTARV.fmx  GLXSTENC.fmx  GLXSTSRC.fmx    GLXACSUM.fmx  GLXBDENT.fmx  GLXCOMST.fmx  GLXFCRVL.fmx  GLXIQFUN.fmx  GLXMAGEN.fmx  GLXRJGEN.fmx  GLXSTBCG.fmx  GLXSTGTC.fmx  GLXSTTRC.fmx     GLXACSUS.fmx  GLXBDFRZ.fmx  GLXCOPRG.fmx  GLXFCXLT.fmx  GLXJEENT.fmx  GLXMMWKB.fmx  GLXRTDLY.fmx  GLXSTCAL.fmx  GLXSTLST.fmx  GLXSTUOM.fmx     GLXALGEN.fmx  GLXBDORG.fmx  GLXCORST.fmx  GLXIQACC.fmx  GLXJEPST.fmx  GLXOCPER.fmx  GLXRTHST.fmx  GLXSTCAT.fmx  GLXSTPRG.fmx   GLXALVAS.fmx  GLXBDUPL.fmx  GLXCORUN.fmx  GLXIQAVG.fmx  GLXJEREV.fmx  GLXOCYCF.fmx  GLXRTTYP.fmx  GLXSTDAA.fmx  GLXSTPTY.fmx     GLXALWKB.fmx  GLXBDXFR.fmx  GLXCOWRK.fmx  GLXIQBCT.fmx  GLXJICOR.fmx  GLXRCENT.fmx  GLXSTACC.fmx  GLXSTDAC.fmx  GLXSTSCH.fmx bkp

US]$ ls -l | wc -l
69

 Errors and warnings are listed in the log file
/u01/node20/apps/apps_st/appl/admin/PROD/log/adadmin.log

and in other log files in the same directory.

Regenerate Message files in Apps R12 using adadmin

[node20@applmgr ~]$

[node20@applmgr ~]$ cd $GL_TOP

[node20@applmgr 12.0.0]$ ls
admin  forms  html  lib  mds    mesg  patch    sql
bin    help   java  log  media  out   reports

[node20@applmgr 12.0.0]$ cd mesg/
[node20@applmgr mesg]$ ls
US.msb

[node20@applmgr mesg]$ mv US.msb US.msb.bkp

[node20@applmgr mesg]$ ls
US.msb.bkp1

[node20@applmgr mesg]$ adadmin

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

                     Oracle Applications AD Administration

                                 Version 12.0.0

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

Your default directory is '/u01/node20/apps/apps_st/appl'.
Is this the correct APPL_TOP [Yes] ? <Enter>

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

Filename [adadmin.log] : <Enter>

************* Start of AD Administration session *************
AD Administration version: 12.0.0
AD Administration started at: Wed may 09 2018 08:19:22

APPL_TOP is set to /u01/node20/apps/apps_st/appl

You can be notified by email if a failure occurs.
Do you wish to activate this feature [No] ? <Enter>

Please enter the batchsize [1000] : <Enter>


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

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

Sample Applications System names are: "prod", "test", "demo" and
"Development_2".

Applications System Name [PROD] : <Enter>


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

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

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

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


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


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


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


Do you currently have concurrent program files installed
in this APPL_TOP [YES] ? <Enter>


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

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

Sample APPL_TOP Names are: "prod_all", "demo3_forms2", and "forms1".

APPL_TOP Name [oracledb1] : <Enter>



You are about to use or modify Oracle Applications product tables
in your ORACLE database 'PROD'
using ORACLE executables in '/u01/node20/apps/tech_st/10.1.2'.

Is this the correct database [Yes] ? <Enter>

AD Administration needs the password for your 'SYSTEM' ORACLE schema
in order to determine your installation configuration.

Enter the password for your 'SYSTEM' ORACLE schema: ******* <Enter>


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] : **** <Enter>

AD Administration is verifying your username/password.
The status of various features in this run of AD Administration is:

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



Identifier for the current session is 19770

Reading product information from file...

Reading language and territory information from file...

Reading language information from applUS.txt ...

AD Administration warning:
 Product Data File
 /u01/node20/apps/apps_st/appl/admin/zfaprod.txt
 does not exist for product "zfa".
This product is registered in the database but the
above file does not exist in APPL_TOP.  The product
will be ignored without error.


AD Administration warning:
 Product Data File
 /u01/node20/apps/apps_st/appl/admin/zsaprod.txt
 does not exist for product "zsa".
This product is registered in the database but the
above file does not exist in APPL_TOP.  The product
will be ignored without error.


AD Administration warning:
 Product Data File
 /u01/node20/apps/apps_st/appl/admin/jtsprod.txt
 does not exist for product "jts".
This product is registered in the database but the
above file does not exist in APPL_TOP.  The product
will be ignored without error.


Reading database to see what industry is currently installed.

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

Code   Language                                Status
----   --------------------------------------- ---------
US     American English                        Base

Your base language will be AMERICAN.

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

Saving product information.

AD code level : [B.1]

            AD Administration Main Menu
   --------------------------------------------------

   1.    Generate Applications Files menu

   2.    Maintain Applications Files menu

   3.    Compile/Reload Applications Database Entities menu

   4.    Maintain Applications Database Entities menu

   5.    Change Maintenance Mode

   6.    Exit AD Administration



Enter your choice [6] : 1 <Enter>

         Generate Applications Files
   ----------------------------------------

   1.    Generate message files

   2.    Generate form files

   3.    Generate report files

   4.    Generate product JAR files

   5.    Return to Main Menu

Enter your choice [5] : 1 <Enter>


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


Enter the number of workers [4] : <Enter>

Your current character set is "UTF8".

Do you want to generate Oracle Message files
using this character set [Yes] ? <Enter>


Enter list of products ('all' for all products) [all] : GL <Enter>


The current set of installed languages is: US <Enter>

Please select languages for generating Oracle Message files.
You may select all of the above languages, or just a subset.

Enter list of languages ('all' for all of the above) [all] : US <Enter>


You selected the following languages: US <Enter>

Is this the correct set of languages [Yes] ? <Enter>


Setting up environment...

Generating message files...



Creating the AD_UTIL_PARAMS table...
Table AD_UTIL_PARAMS already exists, so dropping the table and recreating it.

Creating FND_INSTALL_PROCESSES table...

Writing dependencies of jobs to run to appldep.txt file...

There are now 1 jobs remaining (current phase=admin):
    0 running, 1 ready to run and 0 waiting.

Reading completed jobs from restart file (if any).

There are now 1 jobs remaining (current phase=admin):
    0 running, 1 ready to run and 0 waiting.


Determining which java executables are supported by adJavaWorker...

Starting worker processes.

Worker process 1 started.

Worker process 2 started.

Worker process 3 started.

Worker process 4 started.

Checking if all jobs have their actual and symbolic arguments in sync....

Done.

Writing jobs to run to restart file.

Reading jobs from FND_INSTALL_PROCESSES table ...


Done reading jobs from FND_INSTALL_PROCESSES table ...

Telling workers to read 'todo' restart file.
************* Start of AD Worker session *************
AD Worker version: 12.0.0
AD Worker started at:  Wed may 09 2018 08:20:02

APPL_TOP is set to /u01/node20/apps/apps_st/appl

************* Start of AD Worker session *************
AD Worker version: 12.0.0
AD Worker started at: Wed may 09 2018 08:20:02

APPL_TOP is set to /u01/node20/apps/apps_st/appl

************* Start of AD Worker session *************
AD Worker version: 12.0.0
AD Worker started at: Wed may 09 2018 08:20:02

APPL_TOP is set to /u01/node20/apps/apps_st/appl

************* Start of AD Worker session *************
AD Worker version: 12.0.0
AD Worker started at: Wed may 09 2018 08:20:02

APPL_TOP is set to /u01/node20/apps/apps_st/appl

Done.

Starting phase 1000 (admin): Administration


There are now 1 jobs remaining (current phase=admin):
    0 running, 1 ready to run and 0 waiting.

 Assigned: file US.msb       on worker  1 for product gl  username GL.
Completed: file US.msb       on worker  1 for product gl  username GL.

Telling workers to quit...


All workers have quit.


Dropping FND_INSTALL_PROCESSES table...


FND_INSTALL_PROCESSES table dropped.


Dropping AD_DEFERRED_JOBS table...


AD_DEFERRED_JOBS table dropped.

Review the messages above, then press [Return] to continue.

Backing up restart files, if any......Done.

         Generate Applications Files
   ----------------------------------------

   1.    Generate message files

   2.    Generate form files

   3.    Generate report files

   4.    Generate product JAR files

   5.    Return to Main Menu

Enter your choice [5] : <Enter>

            AD Administration Main Menu
   --------------------------------------------------

   1.    Generate Applications Files menu

   2.    Maintain Applications Files menu

   3.    Compile/Reload Applications Database Entities menu

   4.    Maintain Applications Database Entities menu

   5.    Change Maintenance Mode

   6.    Exit AD Administration



Enter your choice [6] : <Enter>



Backing up restart files, if any......Done.

sqlplus -s APPS/***** @/u01/node20/apps/apps_st/appl/ad/12.0.0/sql/adtimrpt.sql 19770 adt19770

A job timing report has been generated for the current session.
You should check the file
    /u01/node20/apps/apps_st/appl/admin/PROD/out/adt19770.lst

for details.


Purging timing information for prior sessions.

sqlplus -s APPS/***** @/u01/node20/apps/apps_st/appl/ad/12.0.0/sql/adtpurge.sql 10 1000

Done purging timing information for prior sessions.

AD Administration is complete.

Errors and warnings are listed in the log file
/u01/node20/apps/apps_st/appl/admin/PROD/log/adadmin.log

and in other log files in the same directory.

[node20@applmgr mesg]$ ls
US.msb  US.msb.bkp

Tuesday, 8 May 2018

Flashback table past time in 11gr2

$ export ORACLE_SID=prod

~]$ sqlplus / as sysdba

SQL> startup

SQL> grant connect, resource to javed identified by javed;

SQL> conn javed/javed

SQL> create table emp (eno number(10));

SQL> insert into emp values(&eno);         (insert many rows)

SQL> commit;

SQL> select * from emp;

SQL> select to_char(sysdate, 'hh24:mi:ss dd-mon-yyyy') from dual;

           TO_CHAR(SYSDATE,'HH2
           18:28:12    01-may-2018



Flashback Query:-

SQL> select * from emp as of timestamp to_timestamp('18:28:12 01-may-
2018','hh24:mi:ss dd-mon-yyyy');



Flashback table past time:-

SQL> delete from emp;

SQL> select table_name,ROW_MOVEMENT from user_tables;

TABLE_NAME               ROW_MOVE
EMP                                   DISABLED

SQL> alter table emp enable row movement;

SQL> select table_name,ROW_MOVEMENT from user_tables;

TABLE_NAME            ROW_MOVE
EMP                                ENABLED

SQL> flashback table emp to timestamp to_timestamp('18:28:12 01-may-
2018','hh24:mi:ss dd-mon-yyyy');

Flashback complete.

SQL> select * from emp;

SQL> alter table emp disable row movement;

SQL> select table_name,ROW_MOVEMENT from user_tables;

TABLE_NAME                 ROW_MOVEMENT
EMP                                     DISABLED
SYS_TEMP_FBT                DISABLED

How to Change/replace the Oracle Logo with Your Own logo in E-Business Suite R12.1

STEP1--> copy your logo in $OA_MEDIA directory. the logo should be in .gif format
]$ echo $OA_MEDIA
copy logo on this location manually.


STEP2--> Log in to E-Business Suite as a sysadmin user
chose System Administrator
click on Profile
select System
type in profile option  %image% & click on find.

Logo size should be (125X30) pixels 
  


STEP3--> Query profile “Corporate Branding Image for Oracle Applications” in profile option name.



STEP4--> Paste your custom image file name (e.g. company.gif) in Site option then Save the changes.



STEP5--> Log out & stop all apps services from E-Business Suite. Log back & start all apps services and open a new browser window.

A custom logo will display in place of the Oracle logo in E-Business Suite.

relink a single executable (binary file) using ADADMIN utility

In this post, I would like to write something useful for patching and fine-tuning. When times, we have to relink a particular binary file ...