BULK_CHANGES does not update Agent values set on Schedules, Request Job Conditions, and Components
search cancel

BULK_CHANGES does not update Agent values set on Schedules, Request Job Conditions, and Components

book

Article ID: 404672

calendar_today

Updated On:

Products

CA Automic Applications Manager (AM)

Issue/Introduction

The BULK_CHANGES Job has the ability to change a number of core Job characteristics in bulk such as but not limited to Jobs' Application, Queue, or Agent.

When bulk changing Agents, BULK_CHANGES only makes the change on the core Job level definition. 

When the Agent is defined in a Schedule, a Request Job condition, or on a Component, BULK_CHANGES does not update these values.

Cause

This is part by design and part by limitation as the BULK_CHANGES only references the SO_JOB_TABLE. 

Resolution

An additional script will be included in Applications Manager version 9.7's "sql" directory that can be run from sqlplus (or any sql client) to update Agent values set on Schedules, Conditions, Request Job Condition, AND Jobs.

Workaround:

  1. Download the attached aw_agent_bulk_changes.sql
  2. Place in the $AW_HOME/sql or %AW_HOME%\sql (Windows OS) directory
  3. From the sql directory, connect to the database as the Applications Manager Oracle User from the sqlplus command prompt (or any sql client)
  4. Run the script by typing @aw_agent_bulk_changes and hitting Enter
  5. When prompted, enter the "from" agent value and the "to" agent value (not case sensitive) and hit Enter

This will change all Agent values set on Schedules, Conditions, Request Job Condition, AND Jobs from the "from" Agent value to the "to" Agent value.

NOTE - that this is a all or nothing change so please confirm the changes you want to make before running the script.

NOTE - A BACK UP OF THE DATABASE BASE SCHEMA SHOULD BE TAKEN BEFORE RUNNING THE SCRIPT

Below is an example of the script being run:

SQL>  @aw_agent_bulk_changes
$Date$  $Author$ $Rev$
DEFINE _DATE           = "15-JUL-25" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "amdb" (CHAR)
DEFINE _USER           = "amoracleuser" (CHAR)
DEFINE _PRIVILEGE      = "" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1903000000" (CHAR)
DEFINE _EDITOR         = "vi" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0" (CHAR)
DEFINE _O_RELEASE      = "1903000000" (CHAR)
Enter value for from_agent: Agent_A
Enter value for to_agent: Agent_B
update so_job_table set so_oper_seq = 1 where so_oper_seq =4
agent_type=AWSQLP agent_type=FALSE
1 rows updated or so_job_table
update aw_module_sched set aw_agent_seq = 1 where aw_agent_seq =4
SYSTEM 
rundate=16-JUL-25 start_time=0
datetime=071625 00:00:00 
1 rows updated for aw_module_sched
update so_chain_detail set so_oper_seq = 1 where so_oper_seq =4
1 rows updated for so_chain_details
update so_object_cond set so_act_arg =replace (so_act_arg,' -o Agent_A ', ' -o
Agent_B ') where so_action = 'REQUEST JOB' and so_act_arg like ('% -o Agent_A
%')
agent_type=CHAIN agent_type=FALSE
1 rows updated for so_chain_arg
 

PL/SQL procedure successfully completed.

The important lines are in bold. Note that some lines are debugging/trigger lines that can be ignored.

Attachments

aw_agent_bulk_changes.sql get_app