11 Perform System Maintenance Tasks

This section describes the process of running Oracle Fusion Applications utilities to perform routine system maintenance tasks.

The following topics are discussed:

11.1 Introduction to AD Administration

AD Administration is a standalone utility that performs administration maintenance tasks for the products in the Oracle Fusion Applications home and the Applications Core Oracle home. The general purpose of the maintenance tasks is to keep the Oracle Fusion Applications files and database objects up-to-date. Some maintenance tasks should be performed systemwide on a regular basis, while others are required infrequently.

To run AD Administration, use the command-line utility, adadmin. This utility has a wrapper script that sets the environment and calls the utility. From the AD Administration main menu, select from a list of submenus that contain these task groups:

After the utility starts, enter system information by responding to a series of prompts.

11.2 Maintain Snapshot Information

A snapshot represents each unique combination of Oracle home, product, and version at any given point of time. It includes information on each file maintained by Oracle Fusion Applications AutoPatch (AutoPatch) and a summary of database patches that have been applied to that Oracle home. The information maintained for each file includes the subdirectory where it is located, the name of the file and its version, and the file metadata. The files tracked in the snapshot are those files located in the following product family subdirectories: components, db, and patch. Because snapshots track only files for which there can be different versions as shipped by Oracle, they do not track C executable files or log files.

Each time Oracle Fusion Applications Patch Manager (Patch Manager) or AutoPatch are run, the snapshot is updated to include any new file copied to the Oracle home. When a patch is applied, Patch Manager performs version-checking against the file to determine which files must be replaced.

The snapshot can be either a current view or a named view.

A current view snapshot is a copy of the current file system of the Oracle home created by Patch Manager. The current view is then updated every time a patch is applied and every time the Update Current View Snapshot process runs to maintain a consistent view. Patch Manager uses the current view snapshot to determine if all prerequisite patches have been applied to the Oracle home.

For more information, see Use the Maintain Snapshot Information Menu.

A named view snapshot is a copy of the current view snapshot created at a particular time and it is never updated. One or more named view snapshots can be compared to the current view snapshot or refer to previous states of the Oracle home, as needed. Complete file, file version information, and patch history is stored in a named view snapshot.

Properly maintained snapshots make possible to:

  • Compare two different Oracle homes

  • Compare the same Oracle home at different times

  • Track the current status of an Oracle home

Snapshot information is stored in several tables. They contain details such as:

  • The name, type, and other attributes of each snapshot

  • The list of files, file versions, and other attributes of each file recorded by the snapshot

  • The list of patches and bug fixes recorded by the snapshot

The following table describes the tables related to snapshots.

Table 11-1 Snapshot Tables

Table Name Description

AD_SNAPSHOTS

Records one entry for each snapshot.

AD_SNAPSHOT_BUGFIXES

Records all patches ever applied at the moment of snapshot creation for a specific snapshot.

AD_SNAPSHOT_FILES

Records all files associated with a particular snapshot.

AD_FILES

Records all files associated with every snapshot in the system. Contains one entry for each file, regardless of how many snapshots and snapshot versions exist. This table may contain files that are no longer in the system to save files for past snapshots.

AD_FILE_VERSIONS

Records all versions for each file that are present in any snapshot.

AD_BUGS

Records all patches that have been applied to the Oracle home.

11.2.1 Use the Maintain Snapshot Information Menu

A task can be selected from the Maintain Snapshot Information submenu. Select the last option in the list to return to the AD Administration main menu. The following tasks are available:

  • List Snapshots: This action queries the database, lists all snapshots and displays the name, type, and comments for each snapshot stored in the AD_SNAPSHOTS table.

  • Update Current View Snapshot: If the current view snapshot is not up-to-date, it can be updated. An example of when this task may need to be run is when a snapshot may not have been updated as the result of an interruption during a patching session. All of the other snapshot maintenance tasks are based on the results of this task. It is possible to choose to scan the entire Oracle Fusion Applications Oracle home for all installed product families to determine which component directories should be examined or choose a specific product family. For each of those components, it scans these product family subdirectories: components, db, and patch, and then updates the database as follows:

    1. Inserts and updates the current view snapshot whenever the Update Current View Snapshot runs.

    2. Modifies the file and file version information for the current view snapshot.

    3. Sets the RAN_SNAPSHOT_FLAG column in the AD_SNAPSHOTS table to Y to indicate that the Update Current View Snapshot ran.

  • Create a Named View Snapshot: This action lists the current view snapshot and requires a name to be provided. It then performs the following actions:

    1. Creates the named view snapshot.

    2. Creates a file information list for this snapshot by copying from the current view snapshot.

    3. Copies the bug fix list from the current view snapshot.

  • Export a Snapshot to a File: This action lists the snapshots available for export as shown above. Then it copies the snapshot file details and snapshot bug fix information to an output file specified at the prompt.
  • Import a Snapshot from a File: This action prompts for the full path and name of the file to be imported. It then updates the snapshot tables with the imported snapshot details.

  • Delete a Named View Snapshot: This action lists the snapshots available for deletion. For the snapshot selected, it deletes the file details and snapshot bug fix entries from the snapshot tables.

11.3 Maintain Applications Database Entities

Database entities are objects or data related to Oracle Fusion Applications. During standard system use, some database entities may become invalid, for example, through user error or after applying a large patch. Oracle recommends to verify the integrity of database entities as a regular maintenance procedure, or whenever the activity of the system indicates that database entities may need revalidation.

AD Administration contains several tasks designed to manage database entities. Access them from the Maintain Applications Database Entities submenu. Some tasks in this menu report on issues, or potential issues, and others actually resolve the issues.

The following tasks are available:

11.3.1 Compile Invalid Objects

As patches are applied and manual changes are made to the database, the number of invalid objects can increase. This process compiles invalid database objects in all schemas in the database. As soon as the compile process is complete, AD Administration generates an HTML report that contains information about any objects that remain invalid.

11.3.2 Run the Health Check

The health check process is a centralized set of validity checks that can be performed to ensure that the database is compatible with Oracle Fusion Applications. It validates the schemas and the database objects they contain to verify that they are valid.

The checks performed are as follows:

  • Confirms the presence and validity of ADM_DDL in the FUSION_RUNTIME schema

  • Identifies grants given to Oracle Fusion Applications and grants given by way of roles. Ensures that no grant is given with the admin option set to Yes. This task grants privileges to roles used by the FUSION_RUNTIME schema.

  • Performs various checks on Oracle Fusion Application such as ensuring that synonyms point to valid, existing tables.

  • Verifies that privileges are given to roles used by the FUSION_RUNTIME schema.

  • Generates a list of invalid objects, compiles the invalid objects, and issues a report that includes the commands to recompile the objects that remain invalid.

The health check process produces a report with its findings, named ad_health_check_report.html. It also creates two scripts that contain a set of corrective actions that can be taken to fix the issues found by the analysis. The scripts may contain steps to be followed to resolve an issue and they may also contain SQL actions that are executed when running the script. The HTML file and both scripts are located in the FA_ORACLE_HOME /admin/SID/log directory.

The following scripts are created:

  • ad_health_fix_sys.sql: Run this script as sysdba.

  • ad_health_fix_fus.sql: Run this script as fusion.

11.3.3 Recreate Grants and Synonyms

This task grants privileges to roles used by the FUSION_RUNTIME schema.

11.3.4 Maintain Multilingual Tables

The standard Oracle Fusion Applications Multilingual Support (MLS) table architecture requires that the multilingual tables (those ending with _TL) be fully populated for all active languages. For each row in the base table, there must be a corresponding row in the MLS table for each active language. The Maintain Multilingual Tables utility standardizes and centralizes the synchronization logic for all tables in Oracle Fusion Applications. It relies on the Application/XDF dictionary data to know which tables to synchronize and inserts records only when they are missing for a given language. When a language is installed, this task automatically runs. It can also be run from the AD Administration menu when the data in the _TL table is not synchronized. For more information, see Perform Optional Language Installations in the Fusion Applications Installation Guide.

11.4 Run Maintenance Tasks Non-Interactively

The previous sections described how to run AD Administration interactively: start the adadmin utility and respond to system prompts, select a submenu from the main menu, and then select the task to be run from that submenu. To run AD Administration non-interactively, specify a defaults file that contains the information necessary to run one of the maintenance tasks. The first time the defaults file is created, the adadmin command runs interactively, and then the defaults file for the task performed can be reused.

This section describes the steps necessary to create a defaults file and save it to run one of the AD Administration tasks without user intervention. For long-running tasks, such as compiling the schema, use the non-interactive functionality.

11.4.1 Create a Defaults File

To create a defaults file, add the option defaultsfile=defaults file location to the adadmin command. The following example syntax shows how to create a defaults file for compiling the schemas:

For Oracle Fusion Applications

(UNIX) FA_ORACLE_HOME/lcm/ad/bin/adadmin.sh defaultsfile=APPLICATIONS_CONFIG/lcm/admin/default_compile.txt

For Oracle Fusion Applications Core

(UNIX) FA_ORACLE_HOME/lcm/ad/bin/adadmin.sh defaultsfile=APPLICATIONS_CONFIG/atgpf/admin/default_compile.txt

The next time this same task is performed non-interactively, call the adadmin command in non-interactive mode and specify the defaults file. Then run the adadmin command interactively to record the history of the session in the specified defaults file.

The following example specifies the defaults file:

(UNIX) FA_ORACLE_HOME/lcm/ad/bin/adadmin.sh defaultsfile=APPLICATIONS_CONFIG/lcm/admin/default_compile.txt interactive=no

When the defaults file are used in non-interactive mode, the adadmin session reads the contents of the defaults file to respond to the prompts.

11.4.2 Select a Menu Option Non-Interactively

A specific AD Administration menu option can be selected by specifying the menu name when calling the adadmin command. This functionality makes possible to perform specific tasks somewhat non-interactively without using a defaults file. The initial adadmin prompts must be responded to. The following example shows how to run adadmin to compile the schemas:

(UNIX) FA_ORACLE_HOME/lcm/ad/bin/adadmin.sh menu_option=CMP_INVALID

If a menu option that contains additional prompts, such as List Snapshots, is selected; then those prompts must be responded to interactively. The following table provides a list of menu names that can be specified with menu_option when running the adadmin command.

Table 11-2 AD Administration Menu Options

Menu Name Description

LIST-SNAPSHOT

Lists snapshots

UPDATE_CURRENT_VIEW

Updates the current view snapshot

UPDT_PROD_CURR_VIEW

Updates the current view snapshot for a product

CREATE_SNAPSHOT

Creates a named view snapshot

EXPORT_SNAPSHOT

Exports a snapshot to a file

IMPORT_SNAPSHOT

Imports a snapshot from a file

DELETE_SNAPSHOT

Deletes a named view snapshot

CMP_INVALID

Compiles schemas

HEALTH_CHECK

Performs the health check analysis

CREATE_GRANTS

Re-creates grants and synonyms for the FUSION_RUNTIME schema

MAINTAIN_MLS

Maintains multi-lingual tables

11.4.3 Select a Menu Option While Using a Defaults File

The functionality provided by adding menu_option to the adadmin command can be combined along with specifying a defaults file, which makes it possible to bypass responding to prompts interactively. However, if the menu_option selection is added to the adadmin command while referencing an existing defaults file, the session executes only that menu choice from the defaults file. For example, if the defaults file was created to compile schemas and update the current view snapshot, the following command would update only the current view snapshot:

(UNIX) FA_ORACLE_HOME/lcm/ad/bin/adadmin.sh menu_option=update_current_view defaultsfile=APPLICATIONS_CONFIG/lcm/admin/mydefaults.txt

11.5 Run the HomeChecker Utility

The HomeChecker utility verifies the correctness of any Oracle Fusion Applications Oracle home directory by verifying that the duplicated Oracle Applications Development Framework (Oracle ADF) libraries within Oracle Fusion Applications are synchronized with each other. While separate copies of the libraries are maintained, they are treated logically as a unit and this utility verifies that the libraries are still consistent with each other. HomeChecker also ensures that the artifacts within the Oracle home match the central Oracle Inventory to confirm that the artifacts were laid down either as part of the initial installation or by a subsequent patch. For more information, see Oracle Universal Installer (OUI) Inventory.

The HomeChecker output displays the following information:

  • Libraries that are not synchronized

  • Oracle Fusion Applications artifacts that are not synchronized

  • Libraries that are synchronized

  • Oracle Fusion Applications artifacts that are synchronized

The HomeChecker utility would be most likely run when working with Oracle Support Services to diagnose issues with the environment.