Oracle Forms 12c - Setting up Forms Diagnostics Agent

Posted by Dirk Nachbar on Monday, October 17, 2016 with 2 comments
With the Oracle Forms 12c Diagnostics Agent you can populate the DMS (Dynamic Monitoring Service) metrics for Oracle Forms 12c simply into Oracle Database Tables, which allows you to have a historical view on the Oracle Forms related Performance Data out of DMS.

The installation comes in 2 major parts, first setup a Oracle Database User and the underlying objects and second part deploy the Forms Diagnostics Agent into your Oracle WebLogic Server.

Database Setup Part

A first create the required user and create the required objects in your Oracle Database which is hosting the Metadata Repository for your Oracle Forms & Reports 12c installation. In the Software Home directory of your Oracle Forms & Reports 12c installation, you can find under the directory $ORACLE_HOME/forms two scripts, first one forms_create_diagnostics_user.sql and second forms_create_diagnostics_schema.sql
Connect with sqlplus as sysdba to your Oracle Database and perform following steps:
First you have to create the User for the Forms Diagnostics Agent, the SQL Script forms_create_diagnostics_user.sql will prompt you for the Username and the Pasword, here in my example its the Username = forms_diag and the Password = MySecretPwd12c

connect / as sysdba
@forms_create_diagnostics_user.sql
User id : forms_diag
Password : MySecretPwd12c
old   1: DROP USER &&userid
new   1: DROP USER forms_diag
DROP USER forms_diag
          *
ERROR at line 1:
ORA-01918: user 'FORMS_DIAG' does not exist

Commit complete.

old   1: CREATE USER &&userid
new   1: CREATE USER forms_diag
old   2: IDENTIFIED BY &&password
new   2: IDENTIFIED BY MySecretPwd12c

User created.

old   1: GRANT CONNECT, RESOURCE TO &&userid
new   1: GRANT CONNECT, RESOURCE TO forms_diag

Grant succeeded.

Commit complete.

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

Important Notice: the above executed SQL Script provided by Oracle is not complete, as the created User doesn't have any privileges on the default tablespace USERS. In order to correct this, execute following command:

connect / as sysdba
alter user FORMS_DIAG quota unlimited on USERS;

As next we have to create the necessary objects within the above created User for the Forms Diagnostics Agent, connect to the Database as your newly created Forms Diagnostics Agent User and execute the second script forms_create_diagnostics_schema.sql

connect forms_diag/MySecretPwd12c
@forms_create_diagnostics_schema.sql
. . .
Table created.

Commit complete.

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

WebLogic Server Setup Part

Now you have to create a new Data Source within the Oracle WebLogic Server which is used for your Oracle Forms & Reports 12c environment.

Connect with a browser to your WebLogic Server Console via http://servername:adminport/console and login as weblogic user.
Navigate in the Domain Structure to "Domain / Services / Data Sources" and create a new Data Source by clicking the button "New".


Choose as new Data Source "Generic Data Source"


Provide a Name for the new Data Source of your choice and set the JNDI Name to "oracle/forms/agentDS"


Leave the new screen untouched and proceed with the button "Next"


Leave the new screen untouched and proceed with the button "Next"


Provide the Database Name which is hosting your Forms Diagnostics Agent User, the Hostname of the Database Server, Oracle Listener Port, Database Username and two times the password


As next you have to test the Data Source by clicking the button "Test Configuration"


If the test is successful, you should see following message:


As Target, select your Admin Server for your Oracle WebLogic Server.


The next step is to deploy the Forms Diagnostics Agent war file. Navigate in the Domain Structure to "Domain / Deployments", activate in the Change Center the Lock & Edit Mode and click under Configuration of the Deployments the button "Install"


Set the Path to your $ORACLE_HOME/forms/j2ee/formsagentapp.war and proceed with the button "Next"


Verify that "Install this deployment as an application" is marked and proceed with the button "Next"


Choose as deployment target the Admin Server of your Oracle WebLogic Server and proceed with the button "Next"


Leave the next screen untouched and proceed with the button "Finish"


Finally activate your deployment with the button "Activate Changes" under the Control Center.


Under your deployments you can find now your newly deploy Forms Diagnostics Agent named "formsagentapp". The deployment is currently in the State "Prepared". Simply click the "formsagentapp"


Under the Control tab of the "formsagentapp", mark the checkbox in front of the formsagentapp and click the button "Start / Servicing all requests"


Confirm the Application Start with the button "Yes"


Finally you should see the formsagentapp in the State "Active"


Now we can login to the Forms Diagnostics Agent Console via http://servername:adminport/formsagent/AgentConsole.jsp, provide at first the weblogic username and his password and proceed with "Submit"


Within the Forms Diagnostics Agent Console we can start and stop the Agent and define the frequency of the data collection.


After you activated the Agent, you should see following within the Forms Diagnostics Agent Console.



That's the complete configuration and activating of the Forms Diagnostics Agent, now we can start some Oracle Forms, perform some activities in the Oracle Forms and check what we can see under the tables of the Forms Diagnostics Agent User in the Oracle Database.

There 10 tables under the Forms Diagnostics Agent User:

  • ADMIN_SERVER
    • Contains information about the Oracle WebLogic Server Admin Server
  • AGENT
    • Holds informations about all executed data collections, like Collection Timestamp, Frequence in minutes and so on
  • FRM_DB
    • Holds information about the database connects used in the Oracle Forms Applications
  • FRM_DB_LOGIN
    • unfortunatelly not populated, seems there is an unexpected feature :-)
  • FRM_RUNTIME
    • Holds information about the used formsweb.cfg configuration section used for the Forms Application, Connect and Disconnect Time, Starting Form Name, Current Forms Status (Running, Exited), CPU Time on Exit and so on.
  • FRM_TRACE
    • Holds information about the Forms Trace File if enabled
  • FRM_TRACE_USE
    • Holds detailed information about Forms Trace if enabled
  • FRM_USER
    • Holds information about user, IP address and if used SSO Login Name
  • HISTORY
    • Holds historical data of all captured Forms Application Executions, like Number of Bytes send and received, Network Round Trips, CPU Time and so on
  • WLS_APP
    • Holds information about the underlying Oracle WebLogic Managed Server hosting the Forms Servlet

With the Forms Diagnostics Agent it's really simple to collect all necessary DMS metric data within a couple of tables and enables you easily to have a look some specific Performance Data.




Reaktionen: