Thursday, June 13, 2019

Application Check List

Application Information Gathering
=================================

Existing Operating Units
========================

select ORGANIZATION_ID, NAME
from hr_operating_units
order by ORGANIZATION_ID;


Registered Applications
=======================

select application_id, application_short_name, basepath
from fnd_application
order by application_id;

Registered ORACLE Schemas
=========================

select fou.oracle_id, fou.oracle_username
        , fou.install_group_num, fou.read_only_flag
        , decode(nvl(du.username,' X '),' X ','No','Yes') in_dba_users
        , nvl(du.default_tablespace,'Unknown') default_tablespace
        , nvl(du.temporary_tablespace,'Unknown') temporary_tablespace
from dba_users du, fnd_oracle_userid fou
where du.username(+) = fou.oracle_username
order by 1

Product Installation Status, Version Info and Patch Level
=========================================================

select decode(nvl(a.APPLICATION_short_name,'Not Found'),
        'SQLAP','AP','SQLGL','GL','OFA','FA',
        'Not Found','id '||to_char(fpi.application_id),
        a.APPLICATION_short_name) apps,
        decode(fpi.status,'I','Installed','S','Shared',
               'N','Inactive',fpi.status) status,
        fpi.product_version,
        nvl(fpi.patch_level,'-- Not Available --') Patchset,
        to_char(fpi.last_update_date,'dd-Mon-RRRR') "Update Date"
from fnd_oracle_userid o, fnd_application a, fnd_product_installations fpi
where fpi.application_id = a.application_id(+)
  and fpi.oracle_id = o.oracle_id(+)
order by 1,2;


 Product Database Configuration
 ==============================

select decode(nvl(a.APPLICATION_short_name,'Not Found'),
        'SQLAP','AP','SQLGL','GL','OFA','FA',
        'Not Found','id '||to_char(fpi.application_id),
        a.APPLICATION_short_name) apps,
        decode(nvl(o.ORACLE_username,'Not Found'),
               'Not Found','id '||to_char(fpi.oracle_id),
               o.ORACLE_username) ORACLE_username,
        decode(fpi.db_status,'I','Installed','L','Custom','N','Not Installed',
        'S','Shared',fpi.db_status) "DB Status",
        fpi.install_group_num,
        fpi.sizing_factor,
        fpi.tablespace, fpi.index_tablespace
from fnd_oracle_userid o, fnd_application a, fnd_product_installations fpi
where fpi.application_id = a.application_id(+)
  and fpi.oracle_id = o.oracle_id(+)
order by 1,2

Adding Report to Request Group using API



/**********************************************************************
*PURPOSE: To Add a Concurrent Program to a Request Group from backend *                                 
**********************************************************************/
--

DECLARE
    l_program_short_name    VARCHAR2 (200);
    l_program_application   VARCHAR2 (200);
    l_request_group         VARCHAR2 (200);
    l_group_application     VARCHAR2 (200);
    l_check                 VARCHAR2 (2);
--
BEGIN
    --
    l_program_short_name := 'XXINVNLCDNT';
    l_program_application := 'Inventory';
    l_request_group := 'OM Concurrent Programs';
    l_group_application := 'Order Management';
    --
    --Calling API to assign concurrent program to a reqest group
    --
    apps.fnd_program.add_to_group (
        program_short_name    => l_program_short_name,
        program_application   => l_program_application,
        request_group         => l_request_group,
        group_application     => l_group_application);
    --
    COMMIT;

    --
    BEGIN
        --
        --To check whether a paramter is assigned to a Concurrent Program or not
        --
        SELECT 'Y'
          INTO l_check
          FROM fnd_request_groups       frg,
               fnd_request_group_units  frgu,
               fnd_concurrent_programs  fcp
         WHERE     frg.request_group_id = frgu.request_group_id
               AND frg.application_id = frgu.application_id
               AND frgu.request_unit_id = fcp.concurrent_program_id
               AND frgu.unit_application_id = fcp.application_id
               AND fcp.concurrent_program_name = 'XXINVNLCDNT';

        --
        DBMS_OUTPUT.put_line (
            'Adding Concurrent Program to Request Group Succeeded');
    --
    EXCEPTION
        WHEN NO_DATA_FOUND
        THEN
            DBMS_OUTPUT.put_line (
                'Adding Concurrent Program to Request Group Failed');
    END;
END;

Monday, May 6, 2019

FNDCPASS Error Java system class reported: release of classes.bin in the database does not match that of the oracle executable - USER ( APPS ) has been detected in FND_WEB_SEC.GET_OP_VALUE

FNDCPASS system/***** SYSTEM APPLSYS *****

+----------------------------------------------------------------------------+
Working...
Oracle error -29548: ORA-29548: Java system class reported: release of classes.bin in the database does not match that of the oracle executable - USER ( APPS ) has been detected in FND_WEB_SEC.GET_OP_VALUE.

1. Create and run the following SQL script from a new SQLPLUS session
-- Start of File rmcorejvm.sql
connect / as sysdba
spool rmcorejvm.log
set echo on
set serveroutput on
select owner, status, count(*) from all_objects
   where object_type like '%JAVA%' group by owner, status;
execute rmjvm.run(false);
shutdown immediate
set echo off
spool off
exit
-- End of File rmcorejvm.sql


2. Review the log for any errors that cannot be explained by the action taken

 3. If the above SQL script completed successfully, then create and run the following SQL script from a new SQLPLUS session.
-- Start of File corejvminst.sql
connect / as sysdba
spool corejvminst.log
set serveroutput on
set echo on
startup mount
alter system set "_system_trig_enabled" = false scope=memory;
alter database open;
select owner, status, count(*) from all_objects
    where object_type like '%JAVA%' group by owner, status;
create or replace java system
/
shutdown immediate
set echo off
spool off
exit
-- End of File corejvminst.sql

4. Restart the database and resolve any invalid java objects
connect / as sysdba
startup
select owner, status, count(*) from all_objects where object_type like '%JAVA%' group by owner, status;

If invalid(s) exists, then execute:
@?/rdbms/admin/utlrp.sql

Followed by a check for Invalid(s):
select owner, status, count(*) from all_objects where object_type like '%JAVA%' group by owner, status;

The core JVM objects should now be fully re-installed. The count of Java objects owned by the SYS user should be the same as before the re-installation.


How to Perform a Non-Default Oracle JVM Re-installation (Doc ID 429787.1)

Sunday, April 7, 2019

Testing IMAP connection using AFJVAPRG

This test will verify Oracle Workflow Java Mailer connection with IMAP Server.



$AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=imap -Ddbcfile=$INST_TOP/appl/fnd/12.0.0/secure/PROD.dbc -Dserver=mail.server.com -Dconnect_timeout=120 -Ddebug=Y -Dlogfile=./imaptest.log -Daccount="imap_username" -Dpassword="password" -DdebugMailSession=Y oracle.apps.fnd.wf.mailer.Mailer



Thursday, March 14, 2019

Getting Started With Oracle Fusion Application Business Intelligence

Getting Started With Oracle Fusion Application Business Intelligence

About Report Customization
Reports extract the data from Business applications and present it in the formats required for the organization. Reports provide the information needed for internal operations and statutory compliance; reports also provide the business documents for communicating with customers. Many product-specific reports are provided with Oracle Fusion Applications; for example, the invoice register, the pick slip report, the payroll summary, the journals report, and the customer credit memo. To meet the specific needs of the enterprise, we may need to customize the reports provided or we may need to create new reports to capture and present different data.
Understanding the BI Publisher reporting architecture will help us to understand the report customization scenarios and tasks. A report in Oracle BI Publisher consists of the following components:
A data model that defines the data source, data structure, and parameters for the report. A data model can be used by multiple reports. Each report has one data model.
One or more layouts to define the presentation, formatting, and visualizations of the data. A report may have multiple layouts of the data model.
A set of properties that specify run-time and formatting options
Optionally, a report may also include:
Translations to provide localized versions of a report

What We Can Customize
In many cases, Oracle BI Publisher reports delivered with Oracle Fusion applications will contain the appropriate data elements, but may not provide the presentation of the data just as required by the business. Oracle BI Publisher enables to customize the layouts for reports leveraging the built in data models. If the reports provided by Oracle Fusion applications do not include the data we require, we can create a new report based on a custom data model.
Note:
Do not edit the predefined report objects. If you change a report and a subsequent patch includes a new version of the report, the patch overwrites any customization. If subsequent patches do not include a new version of the report, the customization are retained. When customizing reports, always make a copy of the original object and edit the copy.
Some common report customization scenarios are shown in the following table.

Customization Use Case
Described in
Edit the layout of a report provided with an application
For example: Add your company logo to the Receivables Credit Memo report
Add a new layout to a report provided with an application
For example: Design a new form letter users can select when they run the Receivables Credit Memo
Create a new report based on a data model provided with an application
Edit a data model provided with an application
For example: Add a field to a data model
Create a new data model
For example: Define a new query against Oracle Fusion applications tables
Create a new report based on a custom data model

Report Customization Tasks
Depending on how a report is implemented in Oracle Fusion Applications and the type of customization you make you may also have to perform additional tasks to implement your custom report in the system.

If you create a new report and you wish to schedule this report through Oracle Enterprise Scheduler Service, you must create an Oracle Enterprise Scheduler Service job for the report. If you require Oracle Enterprise Scheduler Service to send parameter values to the Oracle BI Publisher report via a parameter view object, you must also create the view object.

If you create a custom layout and you require translations of the layout, you must also provide the translations. Oracle BI Publisher provides a tool for extracting the translation file for some layout types. The translation file can be translated into the required languages then uploaded to the report.

Tools for Customizing Reports
Customize reports either within the Oracle BI Publisher application or using one of the tools or applications.
Tools for Customizing Report Components
Report Data Model -> BI Publisher's data model editor
Report properties -> BI Publisher's report editor

Tools for Customizing Layouts
RTF template -> Microsoft Word with BI Publisher's Template Builder for Word
BI Publisher template (XPT) -> BI Publisher's layout editor
PDF template -> Adobe Acrobat Professional
Excel template -> Microsoft Excel with BI Publisher's Template Builder for Excel
eText Template -> Microsoft Word

Before You Begin Customizing Reports
Familiarize with the Oracle Fusion application architecture that enables customization, as described in Chapter 1, "Customizing and Extending Oracle Fusion Applications.". Also understand the typical workflows for working with runtime customizations, as described in Chapter 2, "Understanding the Customization Development Lifecycle."

In addition, be familiar with the following Oracle BI Publisher-specific requirements:
Ensure that you have proper permissions for editing and creating Oracle Business Intelligence Publisher objects
To create or edit reports and report layouts requires the BIAuthor Role (or a role that includes the BIAuthor Role) as well as write permissions on the objects in the catalog to be edited.
To create or edit data models requires a custom role that includes the BIAuthor Role and the developDataModel permission (oracle.bi.publisher.developDataModel). Note that the ability to create Oracle BI Publisher data models allows the user to write and execute SQL, therefore implementors must consider carefully to whom they grant the developDataModel permission, and on which environments.
To create the custom role for editing data models, follow the guidelines in the "Configuring Roles" section in the Oracle Fusion Applications Administrator's Guide.
For more information about setting permissions in the catalog, see the "Managing Objects in the Oracle BI Presentation Catalog" chapter in the Oracle Fusion Middleware User's Guide for Oracle Business Intelligence Enterprise Edition (Oracle Fusion Applications Edition).

Understand how the patching process for catalog objects impacts customizations
If a patch includes an update to a catalog object that was delivered with an Oracle Fusion application (for example, the Payables Invoice Register report) the patch will overwrite any customizations applied to the original report. To avoid overwriting a customization, do not customize a predefined Oracle Fusion application object in place; create a copy of the object and customize the copy.

Understand how permissions are set for and inherited by catalog objects
For a user to view a report, the user's role must have read permissions on every object referenced by a report. Permissions can be inherited from the folder in which the object resides.
For ease of maintenance, Oracle recommends that you place customized reports within the same folder as the original; or, if creating a new report that you place it within the same folder as other reports for the same job role.
If you choose to create new folders, bear in mind the catalog security permissions required (see the "Managing Objects in the Oracle BI Presentation Catalog" chapter in the Oracle Fusion Middleware User's Guide for Oracle Business Intelligence Enterprise Edition (Oracle Fusion Applications Edition)).

Be aware of any application-specific guidelines for customizing reports
See application-specific documentation in the Oracle Enterprise Repository for Oracle Fusion Applications.

Be aware of property settings that determine how the report can be run and viewed
Some reports are configured to run only through an external application or through the Oracle Enterprise Scheduler. While customizing a report, you may want to configure it temporarily for viewing online to facilitate testing. See Task: Review Report Settings for Online Viewing for information about these settings.

Know how to navigate to Oracle BI Presentation Catalog objects
Navigate to the Oracle BI Presentation Catalog as follows:
On the Navigator, under Tools, click Reports and Analytics. In the Reports and Analytics pane, click Browse Catalog.

Alternatively, log in to Oracle Business Intelligence directly (example: http://host:port/analytics/saw.dll).
Oracle Fusion Applications reporting objects are organized by product family in the catalog typically as follows:
   Top Level: Shared Folders
    Product Family Folder (example: Financials)
       Product folder (example: Payables)
       --Report group folders (example: Invoices)
       -- Reports
       -- Data Model folder
      


Wednesday, March 13, 2019

Top 10 Backup and Recovery Best Practices

Top 10 Backup and Recovery Best Practices
Assuming that you are doing the Backup and Recovery basics
- Running in Archivelog mode
- Multiplexing the controlfile
- Taking regular backups
- Periodically doing a complete restore to test your procedures.
- Restore and recovery validate will not uncover nologging issues. Consider turning on force-logging if they need all transactions to be recovered, and not face nologging problems ( ALTER DATABASE FORCE LOGGING; )

1. Turn on block checking.
The aim is to detect, very early the presence of corrupt blocks in the database. This has a slight performance overhead, but will allow Oracle to detect early corruption caused by underlying disk, storage system, or I/O system problems.

SQL> alter system set db_block_checking = true scope=both;

2. Turn on Block Change Tracking tracking when using RMAN incremental backups (10g and higher)
The Change Tracking File contains information that allows the RMAN incremental backup process to avoid reading data that has not been modified since the last backup. When Block Change Tracking is not used, all blocks must be read to determine if they have been modified since the last backup.

SQL> alter database enable block change tracking using file '/u01/oradata/ora1/change_tracking.f';

3. Duplex redo log groups and members and have more than one archive log destination.
If an archivelog is corrupted or lost, by having multiple copies in multiple locations, the other logs will still be available and could be used.
If an online log is deleted or becomes corrupt, you will have another member that can be used to recover if required.

SQL> alter system set log_archive_dest_2='location=/new/location/archive2' scope=both;
SQL> alter database add logfile member '/new/location/redo21.log' to group 1;

4. When backing up the database with RMAN use the CHECK LOGICAL option.
This will cause RMAN to check for logical corruption within a block, in addition to the normal checksum verification. This is the best way to ensure that you will get a good backup.

RMAN> backup check logical database plus archivelog delete input;

5. Test your backups.
This will do everything except actually restore the database. This is the best method to determine if your backup is good and usable before being in a situation where it is critical and issues exist.
If using RMAN this can be done with:

RMAN> restore validate database;

6. When using RMAN have each datafile in a single backup piece
When doing a partial restore RMAN must read through the entire piece to get the datafile/archivelog requested. The smaller the backup piece the quicker the restore can complete. This is especially relevent with tape backups of large databases or where the restore is only on individual / few files.
However, very small values for filesperset will also cause larger numbers of backup pieces to be created, which can reduce backup performance and increase processing time for maintenance operations. So those factors must be weighed against the desired restore performance.

RMAN> backup database filesperset 1 plus archivelog delete input;

7. Maintain your RMAN catalog/controlfile
Choose your retention policy carefully. Make sure that it complements your tape subsystem retention policy, requirements for backup recovery strategy. If not using a catalog, ensure that your CONTROL_FILE_RECORD_KEEP_TIME parameter matches your retention policy.

SQL> alter system set control_file_record_keep_time=21 scope=both;

This will keep 21 days of backup records in the control file.

Run regular catalog maintenance.
REASON: Delete obsolete will remove backups that are outside your retention policy.
If obsolete backups are not deleted, the catalog will continue to grow until performance
becomes an issue.

RMAN> delete obsolete;

REASON: crosschecking will check that the catalog/controlfile matches the physical backups.
If a backup is missing, it will set the piece to 'EXPIRED' so when a restore is started,
that it will not be eligible, and an earlier backup will be used. To remove the expired
backups from the catalog/controlfile use the delete expired command.

RMAN> crosscheck backup;
RMAN> delete expired backup;

8. Prepare for loss of controlfiles.
This will ensure that you always have an up to date controlfile available that has been taken at the end of the current backup, rather then during the backup itself.

RMAN> configure controlfile autobackup on;

keep your backup logs
REASON: The backup log contains parameters for your tape access, locations on controlfile backups
that can be utilised if complete loss occurs.

9. Test your recovery
REASON: During a recovery situation this will let you know how the recovery will go without
actually doing it, and can avoid having to restore source datafiles again.

SQL> recover database test;

10. In RMAN backups do not specify 'delete all input' when backing up archivelogs
REASON: Delete all input' will backup from one destination then delete both copies of the archivelog where as 'delete input' will backup from one location and then delete what has been backed up. The next backup will back up those from location 2 as well as new logs from location 1, then delete all that are backed up. This means that you will have the archivelogs since the last backup available on disk in location 2 (as well as backed up once) and two copies backup up prior to the previous backup.

User Experience while using Java Web Start in Oracle E-Business Suite

User Experience while using Java Web Start in Oracle E-Business Suite

Java Web Start launches E-Business Suite Java-based functionality as Java Web Start applications instead of as applets. Java Web Start is part of the Java Runtime Environment (JRE).
Until now, E-Business Suite's Java-based content required a browser that supports Netscape Plug-in Application Programming Interface (NPAPI) plug-ins.
Some browsers are phasing out NPAPI plug-in support.  Some browsers were released without NPAPI plug-in support.  This prevents the Java plug-in from working.
With the release of Java Web Start, E-Business Suite 12.1 and 12.2 users can launch Java-based content (e.g. Oracle Forms) from browsers that do not support Java plug-ins via NPAPI.  Java Web Start in EBS works with:
Microsoft Internet Explorer
Microsoft Edge
Firefox Rapid Release (32-bit and 64-bit)
Firefox Extended Support Release (32-bit and 64-bit)
Google Chrome

Technology architecture change
Java Web Start changes the way that Java runs on end-users' computers but this technical change is generally invisible to end-users.
Java Web Start applications are launched from browsers using the Java Network Launching Protocol (JNLP).

Apply Patches for EBS Environment Document ID: 2188898.1 (Using Java Web Start with Oracle E-Business Suite)

Set Java web start launcher as default program for .jnlp file.
If default file try is not set. You will not see below forms launcher.

Supported Browsers:-
Microsoft Internet Explorer
Internet Explorer supports both Java Web Start and the Java Plug-in for launching the Forms application and regular Java applets as part of Oracle E-Business Suite.
Default behavior:-
Launching Java content with Java Web Start should provide a comparable user experience to that seen with the Java Plug-in. The frmservlet.jnlp is downloaded to the web browser's cache directory and automatically removed from that location by the Java Web Start Launcher.
There are no specific browser configuration steps required.

Mozilla Firefox Extended Support Release (ESR)
Firefox ESR 60.x supports only Java Web Start for launching the Forms application and regular Java applets as part of Oracle E-Business Suite. Firefox ESR 60.x is supported on both Windows and macOS platforms.
Default behavior:-
By default, Firefox requires the user to choose the appropriate action on what to do with the JNLP file that is downloaded when launching, for example, the Forms application using Java Web Start. 
1. Open Mozilla Firefox.
2. Log in to Oracle E-Business Suite.
3. Choose a responsibility (for example, System Administrator).
4. Click on an Oracle Forms-based menu item (such as Security → User → Define) to initiate the download of the frmservlet.jnlp file.
5. Firefox displays the following message: "What should Firefox do with this file?", as shown in the following image:
 
6. Choose the first option "Open with" and in the corresponding drop-down list, select 'Java(TM) Web Start Launcher (default)."
7. Select the checkbox "Do this automatically for files like this from now on" in order to associate the JNLP file extension with the Java Web Start Launcher executable on the client PC.
8. Click OK.
By doing this once, launching Java content with Java Web Start provides a comparable user experience to that seen with the Java Plug-in. Future instances of the Forms application or a Java applet will now launch using Java Web Start.
Each new frmservlet.jnlp (Windows) or frmservlet-n (macOS) file is saved into the default download location as defined in Firefox. The Java Web Start Launcher will automatically remove this file from that location.
Note (Windows only): If the user had inadvertently chosen "Save As" and saves the JNLP file to the desktop, then the user will need to manually launch it from the desktop.

Google Chrome
Google Chrome has not supported the Java Plug-in since release 45. Therefore, the Forms application and regular Java applets as part of the Oracle E-Business Suite can only run with Java Web Start.
Default behavior:-
The following describes a common use case of launching the Forms application with Java Web Start using Google Chrome. The same concept applies to regular Java applets.
1. Open Google Chrome.
2. Log in to Oracle E-Business Suite.
3. Choose a responsibility (for example, System Administrator).
4. Click on an Oracle Forms-based menu item (such as Security → User → Define) to initiate the download of the frmservlet.jnlp file.
5. Google Chrome displays the following message: "This type of file can harm your computer. Do you want to keep frmservlet.jnlp anyway?"
 
6. Click Keep to save the frmservlet.jnlp file.
7. Click the frmservlet.jnlp file in the download bar to execute it.
 
8. The Forms application is now started with Java Web Start.
Note: The warning message in step 5 is expected due to restrictions enforced by Google Chrome.
A new frmservlet.jnlp file is downloaded each time the Forms application or a regular Java applet is launched. The file is saved in the default download location as defined in Google Chrome. Upon executing frmservlet.jnlp, the Java Web Start launcher will automatically remove this file.
Behavior when having a specific location for each download preference set
Google Chrome has the option to present a Save As dialog window for every file downloaded. This feature is described on the Chrome Help page Download a file on Chrome. More specifically, the section "Change download locations" covers the "Ask where to save each file before downloading" user preference.
The following describes a common use case of launching the Forms application with Java Web Start using Google Chrome when the "Ask where to save each file before downloading" preference is enabled.
1. Open Google Chrome.
2. Log in to Oracle E-Business Suite.
3. Choose a responsibility (such as System Administrator).
4. Click on an Oracle Forms based menu item (for example, Security → User → Define) to initiate the download of frmservlet.jnlp.
5. Google Chrome displays a Save As dialog window, asking where to save the frmservlet.jnlp.
6. Click frmservlet.jnlp in the download bar to execute it:
 
7. The Forms application is started with Java Web Start.

Microsoft Edge
The Forms application and regular Java applets as part of Oracle E-Business Suite can run only with Java Web Start when using the Microsoft Edge web browser. It has never supported NPAPI-based extensions such as the Java Plug-in.
Default behavior:-
The following describes a common use case of launching the Forms application with Java Web Start using Edge. The same concept applies to regular Java applets.
1. Open the Edge web browser.
2. Log in to Oracle E-Business Suite.
3. Choose a responsibility (such as System Administrator).
4. Click on an Oracle Forms based menu item (for example, Security → User → Define) to initiate the download of frmservlet.jnlp.
5. A new browser tab opens and the downloaded frmservlet.jnlp is saved in the Downloads folder as shown in the following image:
 
6. Click Open to execute the file frmservlet.jnlp.
7. The Forms application is started with Java Web Start.
The Java Web Start launcher automatically removes the downloaded frmservlet.jnlp file from the browser's download folder.
The extra blank browser tab in step 5 remains open even after opening the Forms application. This is the expected behavior as a result of web browser limitations. At any point in time, it is safe to close this browser tab that opened when downloading the frmservlet.jnlp file.

Apple Safari
When using the Safari web browser on macOS, Oracle E-Business Suite always uses the Java Plug-in instead of Java Web Start for launching the Forms application and Java applets. It automatically falls back to the Java Plug-in, even if the environment (at the site level) is configured for Java Web Start.

Some Tips About FNDLOAD

Data Synchronization  Data Synchronization is a process in which some setup data would be synchronized, and this would be more important w...