EM 12c: Pa_execute_sql.pl Reports $overall_sql_result for Each Database in Enterprise Manager 12c Cloud Control Deployment Procedure (Doc ID 2193975.1)

Last updated on JANUARY 11, 2017

Applies to:

Enterprise Manager for Oracle Database - Version 12.1.0.4.0 and later
Information in this document applies to any platform.

Symptoms

SQL Apply script pa_execute_sql.pl is being used on multiple databases.
This script uses the value of $overall_sql_result to show the status of each database.
The field is meant to show the overall status at the end of the script and should not be used to show the status of the application of the sql script to each individual database.
If one database returns an error, then every database following the one with the error will show an error even if it didn't produce an error.

From the script:
print "\n##################################################################################### \n";
  print $log_file_handle "\n##################################################################################### \n";

  print "## Output for execution of SQL script: $sqlscript on Database: $oracle_sids[$i] \n";
  print $log_file_handle "## Output for execution of SQL script: $sqlscript on Database: $oracle_sids[$i] \n";

  print "##################################################################################### \n";
  print $log_file_handle "##################################################################################### \n";

  logf ("SQL script $sqlscript returned with ErrorCode=$overall_sql_result");

EM Database Plug-in patch version is 12.1.0.7.160229.
If patching many databases in a single deployment procedure run (70 databases), it's very time consuming to go thru the output to find the actual error.

 

Changes

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms