Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Oracle Apps Application Object Library SQL scripts

Oracle apps provides a number of scripts which are very useful for the data
base administrator for DB monitoring & tracking purpose.
Here is the application server path were you can see the following SQL
scripts.

Oracle Applications $FND_TOP/sql directory has a collection of scripts. Most


of them can be used for different purposes.

SQL Script Purpose


Check requested table.columns for invalid trailing
spaces and control characters. These characters cause
‘FRM-40654: Record has been updated.’ Errors when
column is queried in a form. Please note
that afchrchk.sql SHOULD NOT run against
FND_FLEX_VALUES with option 3 (check for control
characters) set to Yes, and automatic fix set to Yes.
This will strip the control characters from the
COMPILED_VALUE_ATTRIBUTES column. Hence,
impacting the General Ledger natural account value
afchrchk.sql sets as they lose all their segment qualifiers.
Prints the Log file names of the managers that can run
afcmcreq.sql a given request
afcmrrq.sql For use by DBA’s for quick look of all running requests
Displays all defined Managers and shows current
afcmstat.sql status of manager processes.
Diagnoses inconsistencies in key flexfield segment
delimiters that may be introduced by the 10.7 upgrade
afffanld.sql because of an AutoInstall bug (492585).
Fixes cross-validation rules and lines by deleting any
which refer to non-existent flexfield structures, and by
disabling any rules which have no lines. User must
affixcvr.sql manually commit or rollback after execution.
Find data integrity problems in FND_HELP and delete
afhlpfix.sql the orphan rows.
Checks to see if the Concurrent Manager monitor is
afimchk.sql actually running
Script to detect if the Internal Concurrent Manager is
in a gridlock situation with another oracle process. The
script will print the user, process id, machine, program
afimlock.sql and the terminal which is causing the gridlock.
Sets the PMON method based on the argument ( for
afimpmon.sql CONC_PMON_METHOD )
afimveri.sql Resets the Concurrent Manager monitor
Grants select privileges and creates synonym for
afpub.sql APPLSYS PUBlic account
This script is used for sql tuning. The input is the
name of a file containing a sql statement. The output
is the execution plan for the statement along with
information about the index columns and the sizes of
the tables involved. The results are spooled to the
file explain.out. This is an elaboration of the old-
fashioned results from querying plan_table after
running “explain plan for…”. This script assumes the
file contains a single, bare SQL statement, with no
blank lines and no terminating “;” or “/”. Also
afqpmex.sql seeafqpmexq.slq/explainq.sql
This script is used for sql tuning. (See description
afqpmexq.sql forafqpmex.sql)
This script is used for sql tuning. The input is a table
name (without a schema prefix) and the output is
information about it’s indexes and the total size of the
allocated extents. The data for the DISTINCT_KEYS
afqpmind.sql column comes from the analyze command.
This script is used for sql tuning. The input is a table
name (without a schema prefix) and the output is
information about it’s indexes. The data for the
DISTINCT_KEYS column comes from the
afqpminq.sql analyze command.Also seeafqpmiq.sql/iq.sql.
afqpmiq.sql This script is used for sql tuning.
This script is used for sql tuning. It lists all sessions
that are waiting for a lock. The process holding the
root of the lock tree is the left most process printed.
Those printed to the right of it are waiting for locks to
afqpmlck.sql the left of it.
This script is used for performance monitoring. This
script analyzes a table of wait samples. The single
input parameter for the script is a table of wait
samples which has the same columns
as fnd_wait_samples.Some ways to create the input
table:create or replace view wait_samples_view as
select * from fnd_wait_samples; create table
temp_wait_samples as select * from
afqpmmws.sql fnd_wait_samples;
This script is used for sql tuning. It lists the session id,
user process id, server process id, OS user id, and
afqpmmys.sql Oracle user id for the current session.
This script is used for sql tuning. It returns the
cummulative totals for all wait events for the current
afqpmmyw.sql session.
This script is used for sql tuning. The input is the
process id of the Oracle server process. The output
includes the session id, the user process id, and the
afqpmopd.sql OS user id.
This script is used for sql tuning. The input is an OS
process id for the user process. The output includes
the session id, server process id, and OS user id for
afqpmpid.sql the process.
This script is used for sql tuning. The input is a
concurrent manager request_id, and the output is the
operating system process id of the corresponding
afqpmrid.sql FNDLIBR process.
This script is used for sql tuning. The input is the
Oracle session id and the output includes the user
process id, the server process id, the OS user id, and
afqpmsid.sql the program being run.
This script is used for sql tuning. The input is the user
process id and the output is a listing of the sql
afqpmsql.sql statement currently in progress.
This script is used for sql tuning. The input is the user
process id. The output is the execution plan and a
description of the tables and their indexes (the same
afqpmsqx.sql as is produced by qpmex.slq/explain.sql).
This script is used for sql tuning. It returns a snapshot
afqpmwta.sql of all the wait events in the database at this instant.
This script is used for sql tuning.The input is the user
process id and the output includes the table or index
name of the last I/O. This is a moderately long-
running script. When the DELAY column contains “CPU
– recent:” this indicates that the query is currently
using CPU and the last non-CPU delay will be reported.
When the current (or most recent) delay was not for
IO, the TABLE_OR_INDEX_NAME and TYPE columns
afqpmwti.sql are null.
This script is used for sql tuning. Input is the user
process id and the output is a snapshot of the current
afqpmwtp.sql action of the server process.
This script is used for sql tuning. It returns a snapshot
of all the wait events, but only for the real-time
afqpmwtr.sql processes. (compare to afqpmwta.sql/wait_all.sql)
afrqpend.sql Selects all the Pending Requests with status Q
afrqrun.sql Lists all Running, Terminating, Paused Requests
Prints the Log file names of the managers that can run
afrqscm.sql a given request
afrqstat.sql Summary of concurrent request execution since Date
afrqwait.sql Selects all the Pending Requests with status Q
afsecchk.sql Release 7.5 Referential Integrity Display
Used to set Program level priority for concurrent
afsetpri.sql programs
afsetseq.sql Set ORACLE Sequence
Set ORACLE Sequence. The difference between this
script (afsetsqx.sql) and afsetseq.sql is that this script
performs EXIT at the end as it is called directly from
afsetsqx.sql driver files.
afsyn01.sql Drop synonyms for old tables, views and sequences.
afuiddrv.sql Sets all sequences
afwebdbg.sql Print WebServer setup debugging information.
This script is used for performance monitoring. This
script analyzes a table of wait samples. The single
input parameter for the script is a table of wait
samples which has the same columns as
afxpmmws.sql fnd_wait_samples.
fdmchk.sql Check menu entry dangling references.
fdmfix.sql Check & fix menu entry dangling references.
FNDATPRG.sql Purge audit trail tables before a given date
Delete a concurrent program and SRS definition if
FNDCPDC2.sql needed, calls FNDCPDCP.sql
Delete a concurrent program and SRS definition if
FNDCPDCP.sql needed
fndfbdpm.sql Deletes a flexbuilder parameter.
Generate a list of FlexBuilder functions and
parameters for a given application. Some parameters
have multiple definitions, but this report lists each
fndfbfxn.sql parameter only once.
fndfbprm.sql Generate a list of FlexBuilder functions and
parameters, including detailed information about how
the parameter is defined for a given application. This
report includes all definitions for each parameter,
ordered by sequence number. The information in this
report corresponds to information in the Define
FlexBuilder Parameters form.
Finds independant segment values which don’t have
the default dependant segment value defined for
fndffbdd.sql them.
Copy flexfield value set from one database to another
creates a sql script filename.sql which can be run on
FNDFFCVS.sql another database to copy value sets
FNDFFDDS.sql Delete a descriptive flexfield definition from AOL tables
FNDFMFXR.sql Forms Trigger Exception Report
Creates Grants Only for a Full PRivileged Oracle ID.
This assumes fndgsspr.sql was run first to create a
limited set of SELECT only privileges which are not
fndgofpr.sql recreated here.
Revokes all AOL grants and drops all AOL synonyms
from a user. Must also revoke synonym
fndgsnpa.sql GL_CURRENCIES which uses FND_CURRENCIES.
Creates Grants and Synonyms for a Select only
fndgsspr.sql Privileged Oracle ID.
Creates a report of all messages for an application in
the given language.The report is located in the
application’s message directory and has the name
{language short name}.FDDTMFEXT. For example:
/applications/fnd/5.0/mesg/usaeng.msg. The
standalone FNDMDCMF (Create Message File) runs this
report after creating the binary message file to
FNDMDCMR.sql produce a human-readable version.
Copy application menus to another, custom application
fndmncpy.sql (Rel. 9 to 10 backup)
FNDNLADD.sql Add missing translation rows for FND _TL tables.
Check _TL tables for inconsistent or missing
translation data. FNDNLCHK does not fix anything, it
only reports bad data. Use FNDNLADD to fix errors
FNDNLCHK.sql found by FNDNLCHK.
fndnlhlp.sql Updates fnd_loader_formats
FNDNLICR.sql NLS Insert non-ISO currency
Update _TL tables to populate rows for new language
FNDNLINS.sql when a new language is installed.
FNDNLMVL.sql Install multi-language versions of _VL views.
Populate FND%_TL subtables with data from main
FND% tables ( In 10.5 this script is superceded
by FNDNLADD.sqland should not be used by
fndnmts.sql customers. )
fndnstm.sql Populate FND_ main tables with data from subtables.
fndrspfm.sql Report on Users who Access a Given Form
SRS Test Program – expects three arguments and
FNDRSTST.sql prints them
fndscats.sql Signon Audit Time Stamp
Set end time stamp (FND_LOGINS,
FND_LOGIN_RESPONSIBILITIES,
FNDSCETS.sql FND_LOGIN_RESP_FORMS)
Reports on which applications, sets and programs
have been assigned to which responsibility. Accepts
FNDSCGRP.sql application name and responsibility name.
FNDSCPRG.sql Purge signon audit tables from given date
This script ensures only one record exists in
FNDUDUAL.sql FND_DUAL.
Converts rows in FND_UNIQUE_IDENTIFIER_CONTROL
fndutcsq.sql to Sequences
srstest.sql SRS test script
TSTSQPLS.sql SQL script to test execution methods for RTs.
WorkFlow BacKGround engine, starts the background
wfbkg.sql engine, running for the indicated number of minutes.
WorkFlow Background Check. It displays a status
wfbkgchk.sql report on background work waiting to be processed.
wfdirchk.sql WorkFlow Directoy Servoices Data Model Check
WFNLADD.sql Add missing translation rows for WF _TL tables.
Add default language data for standalone Workflow
wfnldat.sql install.
wfnlena.sql Enable/disable an installed language (workflow)
wfntfsh.sql WorkFlow NoTiFication SHow status
WorkFlow PROTection level reset. It resets the
protection level for all objects in a specified item type
to the supplied value. After resetting the protection
level NOTHING in the item type will be customizable
wfprot.sql by a higher access level.
WorkFlow Primary,Unique and Foreign Key constraint
checker. It checks for all invalid workflow data that is
wfrefchk.sql missing primary key data for a foreign key
WorkFlow Handle error’ed activity. It displays a list of
errored activities for the indicated item. Type in the
name of the activity, and command to skip, retry, or
wfretry.sql reset.
WorkFlow ReMove ALL. It DELETES all workflow
wfrmall.sql information. ALL OF IT.
Deletes all invalid workflow data that is missing
wfrmbref.sql primary key data for a foreign key
WorkFlow ReMove ITem Attribute. It deletes all
wfrmita.sql workflow information for the specified item attribute.
WorkFlow ReMove ITMeS. It removes item status
information for items which match the supplied type
wfrmitms.sql and key patterns.
WorkFlow ReMove ITemType. It deletes ALL workflow
wfrmitt.sql information for the specified item type.
WorkFlow ReMove TYPE. It purges ALL runtime data
wfrmtype.sql associated with a given item type.
WorkFlow RUN a process. It creates and starts the
wfrun.sql specified process.
WorkFlow item STATUS report. It displays a status
wfstat.sql report on the indicated item (132 charachter output).
WorkFlow item STATUS report. It displays a status
wfstatus.sql report on the indicated item (132 charachter output).
WorkFlow VERsion display. It displays version
wfver.sql information for all WF source.
WorkFlow Version Check. It checks all workflow
activities for potentially invalid version histories (more
than one version of an activity active at any given
wfverchk.sql time). Correct any errors found.

You might also like