How to create the APM db in Oracle 11gR2

book

Article ID: 48624

calendar_today

Updated On:

Products

APP PERF MANAGEMENT CA Application Performance Management Agent (APM / Wily / Introscope) CUSTOMER EXPERIENCE MANAGER INTROSCOPE

Issue/Introduction

Make sure the Oracle EM is up and running:

ORACLE_HOME/emctl start dbconcole.

For example:

C:\app\Administrator\product\11.2.0\dbhome_2\BIN\emctl start dbconcole

  • Connect to the Oracle EM UI:

    <Please see attached file for image>

    Figure 1

  • Select Server > Security > Users

    <Please see attached file for image>

    Figure 2

  • Click "Create" button:

    <Please see attached file for image>

    Figure 3

  • Enter name. For example: cemuser, password=cemuser and set profile=DEFAULT,

    <Please see attached file for image>

    Figure 4

  • Select "Roles" tab,

  • Click "Edit list" button, make sure to select "Connect" and "Resources" Roles, click OK

    <Please see attached file for image>

    Figure 5

  • Select "System Privileges" tab

  • Click "Edit List" button, make sure to select "Analyze Any", "Create Any view", "Unlimited tablespace" system privileges, then click OK

    <Please see attached file for image>

    Figure 6

  • Click OK to create the user:

    <Please see attached file for image>

    Figure 7

  • Test connectivity for cemuser.

    C:\app\Administrator\product\11.2.0\dbhome_2\BIN>sqlplus cemuser/[email protected]
    SQL*Plus: Release 11.2.0.1.0 Production on Fri Aug 2 03:25:19 2013
    Copyright (c) 1982, 2010, Oracle. All rights reserved.

    Connected to:

    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options

  • For Oracle 11g r2 and above, the property deferred_segment_creation should be set to false, otherwise apm db creation will fail with the following error in the EM_HOME\install\schematools.log

    8/02/13 04:36:47.721 AM EDT [ERROR] [main] [com.wily.apm.dbutil.SqlExecutor] Sql error in file: initdb-oracle-9.5.0.0.sql
    java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (CEMUSER.FK7591FF002916E672) violated - parent key not found
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:194)
    at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1000)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
    at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1814)
    at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1779)
    at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:277)
    at com.wily.apm.dbutil.SqlExecutor.executeSql(SqlExecutor.java:250)
    at com.wily.apm.dbutil.SqlExecutor.executeSqlStatement(SqlExecutor.java:211)
    at com.wily.apm.dbutil.SqlExecutor.executeSqlFile(SqlExecutor.java:186)
    at com.wily.apm.dbutil.SqlExecutor.executeSqlFile(SqlExecutor.java:141)
    at com.wily.apm.dbutil.SqlExecutor.executeSqlFile(SqlExecutor.java:115)
    at com.wily.apm.dbtools.createschema.CreateSchema.createSchema(CreateSchema.java:160)
    at com.wily.apm.dbtools.createschema.CreateSchema.main(CreateSchema.java:110)

Solution:

<Please see attached file for image>

Figure 8

  • Launch the Introscope EM installer and when ask for the database, select Oracle:

    <Please see attached file for image>

    Figure 9

    <Please see attached file for image>

    Figure 10

Click Next

<Please see attached file for image>

Figure 11

NOTE: You need to find the correct SID/Service Name from your tnsnames.ora

In my example, it is orcl.ca.com

<Please see attached file for image>

Figure 12

Click Install.

<Please see attached file for image>

Figure 13

Review the EM_HOME\install\Introscope_9..x.x_InstallLog.log and make sure there are not errors.

Installation: Successful.

455 Successes
0 Warnings
0 NonFatalErrors
0 FatalErrors

Verify that tables have been created. You can use Oracle admin console > Schema > Tables>
Enter schema = cemuser

<Please see attached file for image>

Figure 14

How to configure the Introscope EMs instances to point to the new APM db?

Stop the EM instance
Update the below highlighted fields in EM_HOME\config\tess-db-cfg.xml accordingly to your settings:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="em.dbtype">Oracle</property>
<property name="hibernate.connection.username">cemuser</property>
<property name="hibernate.connection.password">cemuser</property>
<property name="plainTextPasswords">true</property>
<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=APMW8R2EBORC11G)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl.ca.com)))</property>
<property name="hibernate.connection.tcpKeepAlive">true</property>
</session-factory>
</hibernate-configuration>

Start the EM

Environment

Release:
Component: APMISP

Attachments

1558721489139000048624_sktwi1f5rjvs16w3q.gif get_app
1558721487335000048624_sktwi1f5rjvs16w3p.gif get_app
1558721485355000048624_sktwi1f5rjvs16w3o.gif get_app
1558721483359000048624_sktwi1f5rjvs16w3n.gif get_app
1558721481635000048624_sktwi1f5rjvs16w3m.gif get_app
1558721479578000048624_sktwi1f5rjvs16w3l.gif get_app
1558721477720000048624_sktwi1f5rjvs16w3k.gif get_app
1558721475634000048624_sktwi1f5rjvs16w3j.gif get_app
1558721473893000048624_sktwi1f5rjvs16w3i.gif get_app
1558721472189000048624_sktwi1f5rjvs16w3h.gif get_app
1558721470360000048624_sktwi1f5rjvs16w3g.gif get_app
1558721468081000048624_sktwi1f5rjvs16w3f.gif get_app
1558721466106000048624_sktwi1f5rjvs16w3e.gif get_app
1558721464087000048624_sktwi1f5rjvs16w3d.gif get_app