Wednesday 30 November 2022

How to enable and retrieve FND debug log messages

 

SOLUTION

1) Set up profiles for the User / Responsibility to be used to reproduce the issue

Responsibility: System Administrator
Navigation: Profile > System

Query up the Application, Responsibility and User you will use to reproduce the issue you want to debug.
For example:
Application = Receivables
Responsibility = Receivables Manager
User = MYUSER1
Profile = FNDÞbug%

then set the profiles as shown below:

Profile NameSuggested valueComments
FND: Debug Log EnabledYESThis turns the debugging feature on
FND: Debug Log Filename  or FND: Debug Log Filename for Middle-Tier

leave this blank/null at all levelsUse when you want debug messages to get stored to a file.

Note however, that the preferred method of downloading debug messages to a .xls file is provided in step 5 below.
FND: Debug Log LevelStatement

Following are options listed from least to most detailed debugging :

Unexpected, Error, Exception, Event, Procedure, Statement

FND: Debug Log Module

%

Indicate what modules to debug. You can use something like 'ar%' or even  '%arp_rounding%' to limit modules debugged

Following are examples on how you would set the above profiles depending on what you want to debug :

sample setting to debug everything :

FND: Debug Log Enabled YES
FND: Debug Log Filename NULL
FND: Debug Log Level STATEMENT
FND: Debug Log Module %

sample setting to debug ONLY Receivables :

FND: Debug Log Enabled YES
FND: Debug Log Filename NULL
FND: Debug Log Level STATEMENT
FND: Debug Log Module ar%

2) Since the debugging routine will start writing messages to the table, we want to know which messages pertain to our test.
    a) If you are tracking the debug messages for a concurrent request, take note of the Concurrent Request id

    b) Otherwise, retrieve the current max value of log sequence as follows:

SELECT MAX(LOG_SEQUENCE) before_seq
FROM FND_LOG_MESSAGES;


3) Run your test case, try to stay on track in reproducing the issue and leave out extraneous steps so that you don't end up with debug messages that are not relevant to your issue. It is ideal to not have anyone else using the Responsibility you have enabled debug for, so that only messages pertaining to your testcase are picked up.

4) If you ran the script above to get the log_sequence, do it again now, after you have completed the steps to reproduce the issue:

SELECT MAX(LOG_SEQUENCE) after_seq
FROM FND_LOG_MESSAGES;


5) For ease of review by Development, spool the output of the following to a .xls spreadsheet :

You have the option to retrieve the columns you would like to see from FND_LOG_MESSAGES.

If you want to retrieve only a few columns to keep the spreadsheet small, you can do the following:

a) Retrieve the debug messages for a concurrent request ID:

SELECT log.module, log.message_text message
FROM fnd_log_messages log,
     fnd_log_transaction_context con
WHERE con.transaction_id = &request_id
AND con.transaction_type = 'REQUEST'
AND con.transaction_context_id = log.transaction_context_id
ORDER BY log.log_sequence; 

b) Otherwise, retrieve debug messages using a log_sequence range:

SELECT module, message_text
FROM fnd_log_messages
WHERE log_sequence between &before_seq and &after_seq
ORDER BY log_sequence;

If you want to retrieve all the columns for detailed debugging and troubleshooting, you can do the following:

a) Retrieve the debug messages for a concurrent request ID:

SELECT log.*
FROM fnd_log_messages log,
     fnd_log_transaction_context con
WHERE con.transaction_id = &request_id
AND con.transaction_type = 'REQUEST'
AND con.transaction_context_id = log.transaction_context_id
ORDER BY log.log_sequence;

b) Otherwise, retrieve debug messages using a log_sequence range:

SELECT *
FROM fnd_log_messages
WHERE log_sequence between &before_seq and &after_seq
ORDER BY log_sequence;

 

6) Don't forget to turn OFF debugging, otherwise all your actions will be logged and this could impact performance of the application.

FND: Debug Log Enabled = NO 

FNG Debug messages does not write in to FND_LOG_MESSAGES

 

CAUSE

The issue addressed in the following Bug:

Bug 20632815 SETTINGS FND: DEBUG OPTIONS DOES NOT WRITE TO FND_LOG_MESSAGES

When the sequence "FND_LOG_MESSAGES_S" reaches its maximum, no message is logged in FND_LOG_MESSAGES.

When "FND_LOG_MESSAGES_S" reaches its maximum, you need to cycle through the sequence to remove rows from FND_LOG_MESSAGES.

SOLUTION

To resolve this issue, test the following steps on your development instance and move to appropriate environment if necessary (Note: for 11i, go directly to step 4):

1. Download Patch 20632815 along with any required prerequisite patches.

2. Ensure a valid backup exists before applying the recommended patch.

3. Apply the patch for your version along with any required prerequisite patches per the readme file instructions.

4. Follow the steps below to purge FND_LOG_MESSAGES:

   A. verify that CYCLE_FLAG is Y for the sequence FND_LOG_MESSAGES_S.

   select CYCLE_FLAG from dba_sequences where SEQUENCE_NAME = 'FND_LOG_MESSAGES_S';

   B. verify that there is a new executable defined 'FNDLOGPUR'

   Navigation: System Administrator -> Concurrent -> Program -> Executable  and Query for 'FNDLOGPUR'

   C. Verify that there is a new Concurrent Program defined 'Purge FND Logs' (short name FNDLOGPUR)

   Navigation: System Administrator -> Concurrent -> Program -> Define and Query for 'Purge FND Logs'

   D. Verify that newly created CP is available for SYSADMIN user to be run.

   Navigation: System Administrator -> Requests -> Run . Run 'Purge FND Logs'.

   Concurrent Program 'Purge FND Logs' is used to purge rows from FND_LOG_MESSAGES. It takes one optional parameter - 'Till Date'.
   This program deletes all the rows from FND_LOG_MESSAGES with TIMESTAMP value < 'Till Date'. If Till date is not entered, it is defaulted to sysdate-365.

5. Retest the Fnd Debug log functionality and confirm the messages now appear as expected.

Tuesday 29 November 2022

Dr Edgar F Codd Computer scientist

What is a RDBMS (Relational Database Management System)?

RDBMS is stands for Relational Database Management System. RDBMS is the foundation for SQL and all current database management systems, including MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.

A Relational database management system (RDBMS) is a database management system (DBMS) based on E. F. Codd's relational model.

Relational Database Management System

In the jargon of Database Management Systems, there is a rule that is unspoken. Since there aren't many databases that follow all of E.F. Codd's rules, the unspoken rule has been getting more attention.

  • A management system or piece of software is considered to be a Database Management System if it complies with any one of the five or six rules set by E.F. Codd (DBMS).
  • If a management system or programme adheres to any of E.F. Codd's seven to nine recommended guidelines, it qualifies as a semi-relational database management system (semi- RDBMS).
  • In order to be considered a full Relational Database Management System, a management system or software must comply with all 9–12 of E.F. Codd's suggested rules (RDBMS).
Here is the list of Codd's Rules.

Rule 0 − Foundation rule

Any relational database management system (RDBMS) that is proposed or argued to be an RDBMS should be able to handle all of the stored data using its relational features.

Rule 1 − Rule of Information

Relational databases should store data as relationships. In Relational Database Management Systems, tables are what are called "relations." It is important to store the value as an entity in the table cells, whether it is user-defined data or meta-data.

Rule 2 − Rule of Guaranteed Access

It is against the rules to use pointers to get to data logically. Every atomic data entity should be accessed in a logical way by using the table name, the primary key represented by a specific row value, and the column name represented by an attribute value.

Rule 3 − Rule of Systematic Null Value Support

Relational databases do not have any problems with null values. They should always be thought of as "missing information." Null values don't depend on the type of data. You shouldn't mix them up with blanks, 0s, or empty strings. Null values can also be seen as "data that doesn't apply" or "information that isn't known."

Rule 4 − Rule of Active and online relational Catalog

Metadata is the data about the database or the data about the database in the language of Database Management Systems. "Data dictionary" is the name of the live online catalogue that stores the metadata. The so-called "data dictionary" can only be accessed by authored users with the right permissions, and the same query languages used to get to the database should be used to get to the data in the "data dictionary."

Rule 5 − Rule of Comprehensive Data Sub-language

Integrity constraints, views, data manipulations, transactions, and authorizations should all be able to be written in a single, strong language.

Rule 6 − Rule of Updating Views

Views should reflect the updates of their respective base tables and vice versa. A view is a logical table which shows restricted data. Views generally make the data readable but not modifiable. Views help in data abstraction.

Rule 7 − Rule of Set level insertion, update and deletion

The data should be able to be retrieved, added, changed, and deleted with just one operation.

Rule 8 − Rule of Physical Data Independence

Batch and end-user operations are separated in terms of how they are stored and how they are accessed.

Rule 9 − Rule of Logical Data Independence

Batch users and end users can change the database schema without having to recreate it or the applications that use it.

Rule 10 − Rule of Integrity Independence

Integrity constraints should be kept in the data dictionary as metadata, not in the application programmes.

Rule 11 − Rule of Distribution Independence

The Manipulation of Data The language of the relational system shouldn't care about where the physical data is stored, and it shouldn't matter if the physical data is stored in one place or in many places.

Rule 12 − Rule of Non Subversion

Any row should follow the rules for security and integrity. No special privileges are applicable.


Almost all full scale DBMSs are RDMSs. Oracle implements 11+ rules and so does Sybase. FoxPro only uses 7+ rules, while SQL Server uses 11+ rules.

OADBTransactionImpl in Oracle Application Framework (OAF)

OADBTransactionImpl is a class in Oracle Application Framework (OAF), which is a framework for building Oracle E-Business Suite applications...