Home » Other » General » Problem with Oracle supplied perl script (GI 18c, Windows)
Problem with Oracle supplied perl script [message #678262] Thu, 21 November 2019 06:05 Go to previous message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
I have a big problem with an upgrade of a RAC from 12.1 to 18c (can't go to 19c, becaused this is SE2) on Windows. We've had a P1 TAR open for two months. I am convinced that the problem is with the perl script crsupgrade.pm, which does not seem to have been correctly ported from Unix. My perl skills are zero, which doesn't help. This is the problem block:
#-------------------------------------------------------------------------------
# Function: checks if the user running the upgrade matches with the owner
# of the old crs home.
# Args    : none
# Returns : TRUE or FALSE
#-------------------------------------------------------------------------------
sub checkOldCrsOwner
{
  my $ch = $CFG->OLD_CRS_HOME;
  my $cssd_bin = "$ch/bin/ocssd.bin";
  my $old_ch_owner = getBinaryOwner($cssd_bin);

  my $ch_owner = $CFG->params('ORACLE_OWNER');

  trace("new CH owner = $ch_owner");
  trace("old CH owner = $old_ch_owner");
  if ($old_ch_owner != $ch_owner)
  {
    print_error(360, $old_ch_owner, $ch_owner);
    return FALSE;
  }

  return TRUE;
}
The first problem is obvious: the fourth line of the function is looking for ocssd.bin which does not exist on Windows. I told them this, and they agreed that I must edit the line to
my $cssd_bin = "$ch\bin\ocssd.exe";
but now it fails with this error:
C:\app\18.0.0\grid18\crs\config\gridconfig.bat, -upgrade, ] error = [Missing braces on \o{} at C:\app\18.0.0\grid18\crs\install/crsupgrade.pm line 4016, near "$ch", Compilation failed in require at C:\app\18.0.0\grid18\crs\install\rootcrs.pl line 185., BEGIN failed--compilation aborted at C:\app\18.0.0\grid18\crs\install\rootcrs.pl line 185.]
(that line is indeed line 4016). I've been trying to understand what the problem is. Could it be that perl does not realize where the variable $ch ends and the string to which it pre-pended begins? Would this be something that would work on Unix with forward slash directory delimiters and fail on Windows with back slash delimiters? If so, where should I add the {} braces?
I've asked Support about this, but all they have done is set it to "Review Defect". My perl sjkills are not up to this, can anyone advise?
I'll attach the complete, unedited, perl script.
Thank you for any insight.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Oracle licensing
Next Topic: Trigger execution shows up in DBA_Objects with execution time as Last_DDL_Time
Goto Forum:
  


Current Time: Wed Apr 24 21:25:43 CDT 2024