Problem with Oracle supplied perl script [message #678262] |
Thu, 21 November 2019 06:05 |
John Watson
Messages: 8962 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 tomy $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.
|
|
|
|
|
Re: Problem with Oracle supplied perl script [message #678266 is a reply to message #678262] |
Thu, 21 November 2019 07:48 |
John Watson
Messages: 8962 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Amazing! Support has come back with something:
Hi,
Please modify the crsupgrade.pm as follows:
- current file:
4013 sub checkOldCrsOwner
4014 {
4015 my $ch = $CFG->OLD_CRS_HOME;
4016 my $cssd_bin = "$ch\bin\ocssd.exe";
4017 my $old_ch_owner = getBinaryOwner($cssd_bin);
4018
- new change needed:
4013 sub checkOldCrsOwner
4014 {
4015 my $ch = $CFG->OLD_CRS_HOME;
4016 my $cssd_bin;
4017 $cssd_bin = catfile($ch, "bin", "ocssd.exe");
4018 my $old_ch_owner = getBinaryOwner($cssd_bin);
|
|
|