Hitachi

JP1 Version 12 JP1/Performance Management - Remote Monitor for Oracle Description, User's Guide and Reference


2.4.2 Procedure for canceling setup(UNIX)

This subsection describes how to cancel setup of PFM - RM for Oracle.

Organization of this subsection

(1) Canceling setup of an instance environment

Canceling setup of an instance environment involves the tasks listed below.

To cancel setup of multiple instance environments, you must repeat the procedure for each environment.

The following describes the above tasks.

(a) Deleting a monitoring target

Check a monitoring target name before deleting the monitoring target. Delete the monitoring target on the PFM - RM host.

Use the jpcconf target list command to check the monitoring target name. Use the jpcconf target unsetup command to delete the monitoring target.

The following procedure describes how to delete a monitoring target.

  1. Check the monitoring target name.

    Execute the jpcconf target list command specified with the service key and the instance name that indicate the PFM - RM for Oracle whose monitoring target name you are going to delete.

    jpcconf target list -key RMOracle -inst instance-name
    Targets:
    targethost1
    targethost2
    Groups:
    All
  2. Stop the PFM - RM for Oracle service if the service is running in the instance environment.

    For details about how to stop the service, see the chapter on starting and stopping Performance Management in the JP1/Performance Management User's Guide.

  3. Delete the monitoring target.

    Execute the jpcconf target unsetup command specified with the service key, the instance name, and the monitoring target name that indicate PFM - RM for Oracle whose monitoring target you are going to delete.

    jpcconf target unsetup -key RMOracle -inst instance-name -target monitoring-target-name

    If the jpcconf target unsetup command ends successfully, the Oracle host specified by the monitoring target is no longer monitored.

Notes:
  • Canceling setup of the monitoring target does not delete the service information that is displayed with the jpctool service list command. Accordingly, use the jpctool service delete command to delete the service information on the host on which PFM - Manager has been installed. After executing the command, restart PFM - Manager.

  • If you delete the monitoring target while PFM - RM for Oracle is still running, the following message is output to the common message log and PFM - RM for Oracle stops: "KAVL18639-E ".

For the details about the commands, see the chapter on the commands in the manual JP1/Performance Management Reference.

(b) Deleting an instance environment

Check the instance name and delete the instance environment. Deletion of an instance environment is performed from a PFM - RM host.

To check the instance name, use the jpcconf inst list command. To delete an instance environment that has been created, use the jpcconf inst unsetup command.

To delete an instance environment:

  1. Check the instance name.

    Execute the jpcconf inst list command specified with the service key that indicates PFM - RM for Oracle. The following shows the command format:

    jpcconf inst list -key RMOracle

    For example, if the instance name is SDC, the command displays SDC.

  2. Stop all active PFM - RM for Oracle services in the instance environment.

    For details about how to stop services, see the chapter on starting and stopping Performance Management in the JP1/Performance Management User's Guide.

  3. Delete the instance environment.

    Execute the jpcconf inst unsetup command specified with the service key that indicates PFM - RM for Oracle and the instance name.

    For example, if the instance name is SDC, use the following command line:

    jpcconf inst unsetup -key RMOracle -inst SDC

    If execution is successful, the directories created as the instance environment are deleted, as well as the service IDs.

Note:

Canceling setup of an instance environment does not delete the service information that is displayed with the jpctool service list command. Use the jpctool service delete command to delete service information.

If you want to update the PFM - Web Console host to reflect the deletion of instance environment, you need to execute the jpctool service sync command to synchronize the agent information of the PFM - Manager host and that of the PFM - Web Console host.

The following shows sample conditions and a command line applicable for the conditions.

  • Instance name: SDC

  • Host name: host03

  • Service ID of the Remote Monitor Collector service: 1A1SDC[host03]

  • Service ID of the Remote Monitor Store service: 1S1SDC[host03]

jpctool service delete -id 1?1SDC[host03] -host host03

For details about the command, see the chapter on commands in the manual JP1/Performance Management Reference.

(c) Deleting the objects registered in the Oracle Database

This subsection describes the procedure for deleting the table and packages that were created in the Oracle Database being monitored. To execute this procedure, you must use the same Oracle account that you used when you registered the objects in the Oracle Database. Note that this procedure must be used only once for each account that is used to monitor the Oracle Database instance.

Note:

If you execute the procedure described below when no objects have been registered in the Oracle Database, an Oracle error message is displayed during execution of the sp_rdrp.sql script.

To delete the objects registered in the Oracle Database being monitored:

  1. Set up an environment where the Oracle sqlplus command can be executed.

    For details about Oracle environment setup, see your Oracle documentation.

  2. Navigate to the following folder that contains the sp_rdrp.sql script provided by the PFM - RM for Oracle:

    /opt/jp1pc/agt1/agent/sql
  3. Execute the sp_rdrp.sql script on the Oracle Database being monitored.

    PFM - RM for Oracle deletes monitoring procedures, work tables, and other objects that are required to monitor Oracle from Oracle.

    Example:

    If the monitoring target is Oracle Database 12c Release 1 or earlier, or Oracle Database 12c Release 2 or later in a non-CDB configuration

    sqlplus Oracle-account/password-for-the-Oracle-account@net-service-name-of-the-monitoring-target-database @sp_rdrp.sql

    If the monitoring target is Oracle Database 12c Release 2 or later in a CDB configuration

    sqlplus Oracle-account/password-for-the-Oracle-account@net-service-name-of-the-monitoring-target-PDB @sp_rdrp.sql

    Note:

    • sqlplus is a command provided by Oracle Corporation.

    • Oracle-account is the same Oracle account that was used to register the objects in the database.

    • LSC_14_PLAN_TABLE is placed in DBA_RECYCLEBIN and is not deleted completely. If you want to delete LSC_14_PLAN_TABLE completely, execute the PURGE TABLE LSC_14_PLAN_TABLE; command.

    • Note that if the Oracle account is sys, LSC_14_PLAN_TABLE is not stored in DBA_RECYCLEBIN. Therefore, you do not need to execute the PURGE TABLE LSC_14_PLAN_TABLE; command.

  4. Reset the value of the TIMED_STATISTICS Oracle initialization parameter.

    If the value of the TIMED_STATISTICS Oracle initialization parameter has been changed in order to collect records of PFM - RM for Oracle, reset the value, if necessary.

(2) Deleting an Oracle account used in PFM - RM for Oracle

Oracle accounts used in PFM - RM for Oracle are authorized to change the objects of other schemas freely in order to monitor the Oracle Database. For this reason, unnecessary Oracle accounts must be deleted. If the tablespaces that were used by a deleted account are unnecessary, also delete the tablespaces.

(a) Deleting an Oracle account

To delete an Oracle account, issue the DROP USER statement in an environment where the sqlplus Oracle command can be executed. Before issuing the statement, make sure that your Oracle account has the DROP USER system privilege.

To delete an Oracle account:

  1. Issue the DROP USER statement.

    Example:

    DROP USER Oracle-account CASCADE;

    If you add the CASCADE option, you can also delete the objects owned by the account.

For details about the DROP USER statement, see your Oracle documentation.

(b) Deleting the tablespaces used by a deleted Oracle account

When an Oracle account is deleted, the tablespaces used by the Oracle account become unnecessary. To delete these tablespaces, issue the DROP TABLESPACE statement in an environment where the sqlplus Oracle command can be executed. Before issuing the statement, make sure that your Oracle account has the DROP TABLESPACE system privilege.

To delete tablespaces:

  1. Issue the DROP TABLESPACE statement.

    For details about the DROP TABLESPACE statement, see your Oracle documentation.