
Installgen
Features and Benefits
Installgen
Demo Available for download...
Bookmark This Page

#!/usr/local/bin/perl
# script: 77_sol_920_prod1_primary_standbysetup_1.pl
# Features: This perl script sets up the primary server in a standby database configuration.
# Tasks include:
# performing the RMAN backup of the primary server,
# dynamically changing init.ora parameters to the new standby settings,
# copying updated versions of the tnsnames.ora, init.ora,
# status monitoring, change role, backup files
# and archived logs to the standby server.
#
# Required Files: 77_sol_920_prod1_primary_standbysetup_1.pl
# 79_prod1_standby_status_1.pl
# 80_sol_prod1_standbydb_change_role_1.pl
# 70_prod1_primary_tnsnames_1.ora
# 71_prod1_failover_tnsnames_1.ora
# 72_prod1_client_taf_tnsnames_1.ora
# 75_sol_920_prod1_primary_init_1.ora
# 49_listener_ora_1.ora
# 74_sol_prod1_standby_listener_1.ora
# 76_sol_920_prod1_standby_init_1.ora
# 81_prod1_standby_startup_script_1
# 73_sol_prod1_standby_etc_profile_1.sh
# 10_sol_etc_profile_1.sh
# 46_sol_oratab_1.txt
# 86_sqlnet_1.ora
# 88_sol_standby_primary_listener_1.ora
# 89_sol_primary_standby_listener_1.ora
#
# Script Sequence#: 77
# Used By: run manually by DBA
# Copyright 2002 by .com Solutions Inc.
#
# ---------------------- Revision History ---------------
# Date By Changes
# 01-18-2002 dsimpson Initial Release
# 02-26-2002 dsimpson Changed maxpiecesize from 10G to 1900M
# to prevent any possible 32bit issues.
# 04-17-2002 dsimpson Added NOEXCLUDE to insure Read-Only tablespaces
# always get backed up.
# Added use of oem sid domain.
# 05-23-2002 dsimpson Re-wrote for use on Solaris.
# 10-21-2002 dsimpson Updated for use on Mac OS X.
# Added chmod 755 for /etc/profile,/etc/profile-standby
# 11-09-2002 dsimpson Changed Perl getlogin() to ENV{'LOGNAME'}
# when verifying logged in user running this script.
# This output file was created by Installgen version 1.38 on Sun Nov 10 14:20:50 2002. By .com Solutions Inc. www.dotcomsolutionsinc.net
use strict;
require File::Copy;
require File::Path;
# insure that environment variables are used by this perl script
#$ENV{'ORACLE_SID'} = "PROD1";
#$ENV{'ORACLE_HOME'} = "/u01/v901";
#$ENV{'LD_LIBRARY_PATH'} = "/u01/v901/lib:/u01/v901/lib64:/usr/dt/lib";
#$ENV{'NLS_LANG'} = "AMERICAN_AMERICA.US7ASCII";
# list of program and command line parameters to execute via operating system
my @proglist='';
# list of files to delete
my @filelist='';
my $answer='';
my $answer2='';
my $pause1='';
my $pause2='';
my $pause3='';
my $remote_mount2='';
my $backup_catalog_type='';
my $temp_sql_filename = "temp_sql.sql";
my $tempsqlcode="";
my $STANDBY_BACKUP_DEST='';
my $STANDBY_SERVER_MOUNT_POINT='';
my $server_hostname="blade1";
my $hostname_path_full = "/u01/v901" . "/network/admin/hostname";
# define subs
sub copy_to_standby($STANDBY_SERVER_MOUNT_POINT);
# make sure the oracle user is running this script
my ($login_name) = $ENV{'LOGNAME'};
if ($login_name ne "oracle")
{
# the user running this script is not oracle - exit
print "You must be logged in as the oracle user to run this script, exiting....";
# exit immediately!
die
}
# make sure STDOUT and STDERR are not buffered
select (STDOUT);
$|=1;
select (STDERR);
$|=1;
# execute 78_sol_920_prod1_standby_standbysetup_1.pl on standby server first - to remove old files
print "\n\n";
print "1) Manually copy the 78_sol_920_prod1_standby_standbysetup_1.pl script to\n";
print "the /export/oracle/ directory on the standby server.\n";
print "\n";
print "2) Execute the 78_sol_920_prod1_standby_standbysetup_1.pl script on the standby\n";
print "server ultra1 to remove old datafiles\n";
print "and mount directories via NFS.\n";
print "\n";
print "Then press the Return key to continue.\n";
print "\n";
$answer = ;
# create a hostname file in order to keep track of which server upon which 80_sol_prod1_standbydb_change_role_1.pl is running
print "Writing $hostname_path_full
";
open (FILE1,">$hostname_path_full") || die ("Could not open output file $hostname_path_full for writing.
Does the full directory path exist?");
print FILE1 $server_hostname;
close FILE1;
# copy new tnsnames.ora file to /u01/v901/network/admin - backup existing file
print "\n";
print "Copying new tnsnames.ora to /u01/v901/network/admin/tnsnames.ora (backing up existing file as orig-tnsnames.ora).\n";
print "\n";
rename ("/u01/v901/network/admin/tnsnames.ora","/u01/v901/network/admin/orig-tnsnames.ora");
File::Copy::copy("/export/oracle/70_prod1_primary_tnsnames_1.ora",'/u01/v901/network/admin/tnsnames.ora');
# copy the standby version of the tnsnames.ora file - for switchover/failover situations
print "\n";
print "Copying /export/oracle/71_prod1_failover_tnsnames_1.ora to /u01/v901/network/admin/tnsnames.ora-standby.\n";
print "\n";
File::Copy::copy("/export/oracle/71_prod1_failover_tnsnames_1.ora",'/u01/v901/network/admin/tnsnames.ora-standby');
# copy the standby version of the listener.ora file - for switchover/failover situations
print "\n";
print "Copying /export/oracle/89_sol_primary_standby_listener_1.ora to /u01/v901/network/admin/listener.ora-standby.\n";
print "\n";
File::Copy::copy("/export/oracle/89_sol_primary_standby_listener_1.ora","/u01/v901/network/admin/listener.ora-standby");
# filename49 already exists on this server from the initial install
# copy the standby version of the init.ora file - for switchover/failover situations
print "\n";
print "Copying /export/oracle/76_sol_920_prod1_standby_init_1.ora to /u01/v901/dbs/initprod1s.ora.\n";
print "\n";
File::Copy::copy("/export/oracle/76_sol_920_prod1_standby_init_1.ora","/u01/v901/dbs/initprod1s.ora");
# copy the change role script to /opt/server_scripts/prod1_standbydb_change_role.pl
print "\n";
print "Copying /export/oracle/80_sol_prod1_standbydb_change_role_1.pl to /opt/server_scripts/prod1_standbydb_change_role.pl.\n";
print "\n";
File::Copy::copy("/export/oracle/80_sol_prod1_standbydb_change_role_1.pl","/opt/server_scripts/prod1_standbydb_change_role.pl");
# copy the primary-standby version of the init.ora file
print "\n";
print "Copying new initprod1.ora to /u01/v901/dbs/initprod1.ora (backing up existing file as orig-initprod1.ora).\n";
print "\n";
rename ("/u01/v901/dbs/initprod1.ora","/u01/v901/dbs/orig-initprod1.ora");
File::Copy::copy("/export/oracle/75_sol_920_prod1_primary_init_1.ora","/u01/v901/dbs/initprod1.ora");
# copy the /var/opt/oracle/oratab standby file to /var/opt/oracle directory
print "\n";
print "Copying /export/oracle/28_sol_oratab_standby_1.txt to /var/opt/oracle/oratab-standby.\n";
print "\n";
File::Copy::copy("/export/oracle/28_sol_oratab_standby_1.txt","/var/opt/oracle/oratab-standby");
if (!-d '/backup/prod1s_backup_standby_mnt')
{
# standby backup directory mount point does not exist - create it
#File::Path::mkpath ('/backup/prod1s_backup_standby_mnt',1,0744);
system ('mkdir /backup/prod1s_backup_standby_mnt');
}
if (!-d '/archive/prod1s_archivelog_standby_mnt')
{
# standby archivelog directory mount point does not exist - create it
#File::Path::mkpath ('/archive/prod1s_archivelog_standby_mnt',1,0744);
system ('mkdir /archive/prod1s_archivelog_standby_mnt');
}
print "\n";
print "1) From a root terminal session, add the following lines to /etc/vfstab:\n";
print "ultra1:/backup - /backup/prod1s_backup_standby_mnt nfs - yes -\n";
print "ultra1:/archive - /archive/prod1s_archivelog_standby_mnt nfs - yes -\n";
print "\n";
print "2) Manually mount the standby server's NFS shared directories:\n";
print "mount -F nfs -o rw ultra1:/backup /backup/prod1s_backup_standby_mnt \n";
print "mount -F nfs -o rw ultra1:/archive /archive/prod1s_archivelog_standby_mnt \n";
print "\n";
print "3) Verify that the standby server directories have been mounted here on the primary server:\n";
print "If the df -k command does not show that the remote \n";
print "directories have been mounted, correct the problem in \n";
print "a root terminal session. \n";
print "df -k\n";
print "\n";
system ("/usr/sbin/df -k");
print "Then press the Return key after these tasks have been completed.\n";
$answer = ;
# root tasks - install new /etc/profile, startup script
print "\n";
print "From a root terminal session, execute the following commands:\n";
print "cp /export/oracle/10_sol_etc_profile_1.sh /etc/profile\n";
print "cp /export/oracle/73_sol_prod1_standby_etc_profile_1.sh /etc/profile-standby\n";
print "chmod 755 /etc/profile\n";
print "chmod 755 /etc/profile-standby\n";
# avoid putting standby startup script into place until this server is the standby
#print "cp /export/oracle/81_prod1_standby_startup_script_1 /etc/rc3.d/disabled-S81_prod1_standby_startup_script\n";
#print "chmod +x /etc/rc3.d/disabled-S81_prod1_standby_startup_script\n";
#print "chown oracle:dba /etc/init.d/dbora\n";
#print "chown oracle:dba /etc/rc3.d/S88dbora\n";
#print "chown oracle:dba /etc/rc3.d/disabled-S81_prod1_standby_startup_script\n";
print "\n";
print "Then press the Return key after these tasks have been completed.\n";
$answer = ;
# install status_pl script in /opt/server_scripts - to be activated in a switchover situation
print "\n";
print "Copying /export/oracle/79_prod1_standby_status_1.pl to /opt/server_scripts/prod1_standby_status.pl.\n";
print "\n";
File::Copy::copy("/export/oracle/79_prod1_standby_status_1.pl","/opt/server_scripts/prod1_standby_status.pl");
# remove old spfile - rebuild it in sqlplus
@filelist=("/u01/v901/dbs/spfileprod1.ora");
unlink (@filelist);
# dynamically change database init.ora parameters without shutting down primary database
print "\n";
print "Updating init.ora parameters dynamically on primary database...\n";
print "\n";
my $tempsqlcode=<<"EOF";
connect / as SYSDBA
set echo on
ARCHIVE LOG LIST;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=/archive mandatory REOPEN=30';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=prod1s REOPEN=15';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_1=enable;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=enable;
ALTER SYSTEM SET DG_BROKER_START=true;
-- the following statement is not used, because RMAN creates and copies each
-- of the controlfiles automatically
--ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/u01/prod1/standby_control01.ctl';
ALTER SYSTEM ARCHIVE LOG CURRENT;
-- re-create spfile from pfile
create spfile='/u01/v901/dbs/spfilepprod1.ora' FROM pfile='/u01/v901/dbs/initprod1.ora';
exit;
EOF
open (FILE1,">$temp_sql_filename") || die ("Could not open output file $temp_sql_filename for writing. \n Does the full directory path exist?");
print FILE1 ($tempsqlcode);
# close the output file
close (FILE1);
system("/u01/v901/bin/sqlplus /nolog \@$temp_sql_filename");
$STANDBY_SERVER_MOUNT_POINT = '/backup/prod1s_backup_standby_mnt';
# perform RMAN backup of primary database
# ask whether entire database will fit on /backup location
print "\n\n";
print "--------- RMAN backup process ---------\n";
print "Select the option number for the type of RMAN backup to use for creating the standby database:\n";
print "1) Backup entire database and archivelogs onto /backup location (no RMAN catalog - using controlfile info).\n";
print "2) Use existing RMAN backup of database (with or without an RMAN catalog).\n";
print "\n\n";
$answer = ;
chop($answer);
if ($answer == 1 )
{
# selected 1
# RMAN backup to /backup/%d_datafile_%s_%p.bak location
# Note: The standby controlfile is created as a separate task in order to
# allow the RMAN backup process to be generic enough to be used for creating a standby
# database or providing for recovery of the primary database (without turning it into a
# standby database in the process of a restore/recovery).
# back up database to /backup
my $tempsqlcode=<<"EOF";
configure retention policy to redundancy 1;
configure retention policy to recovery window of 1 days;
configure backup optimization on;
configure controlfile autobackup off;
configure default device type to Disk;
configure device type Disk parallelism 1;
configure datafile backup copies for device type Disk to 1;
configure channel device type Disk format '/backup/%d_datafile_%s_%p.bak';
configure maxsetsize to unlimited;
run {
allocate channel ch1 type Disk rate 1500K maxpiecesize = 1900M;
backup full database noexclude
include current controlfile
format '/backup/%d_datafile_%s_%p.bak'
tag 'prod1_stby_datafiles';
release channel ch1;
}
run {
allocate channel ch1 type Disk rate 1500K maxpiecesize = 1900M;
backup archivelog all
format '/archive/%d_archivelog_%s_%p.bak'
tag 'prod1_stby_archivelogs';
release channel ch1;
}
quit
EOF
open (FILE1,">$temp_sql_filename") || die ("Could not open output file $temp_sql_filename for writing. \n Does the full directory path exist?");
print FILE1 ($tempsqlcode);
# close the output file
close (FILE1);
@proglist = ("/u01/v901/bin/rman target / \@$temp_sql_filename");
system (@proglist);
# copy config files to standby server mount point
©_to_standby($STANDBY_SERVER_MOUNT_POINT);
}
if ($answer == 2 )
{
# selected 2
# RMAN - use existing backup
# copy config files to standby server mount point
©_to_standby($STANDBY_SERVER_MOUNT_POINT);
}
# ---------------
# --------------- code below here gets executed in all situations
# ---------------
# make all perl and shell scripts executable in /opt/server_scripts
system ("chmod +x /opt/server_scripts/*.pl");
system ("chmod +x /opt/server_scripts/*.sh");
# rename (then delete) existing standby control file if it exists so RMAN will not fail
print "\n";
print "Renaming /backup/standby_control01.ctl to /backup/standby_control01.ctl.old\n";
print "\n";
rename ("/backup/standby_control01.ctl","/backup/standby_control01.ctl.old");
# attempt to delete old standby controlfile - just to make sure
@filelist = ("/backup/standby_control01.ctl.old");
unlink (@filelist);
print "\n";
print "Creating standby controlfile with RMAN\n";
print "to location: /backup/standby_control01.ctl\n";
print "\n";
# Note: The standby controlfile is created as a separate task in order to
# allow the RMAN backup process to be generic enough to be used for creating a standby
# database or providing for recovery of the primary database (without turning it into a
# standby database in the process of a restore/recovery).
my $tempsqlcode_rman_controlfile=<<"EOF";
configure channel device type Disk format '/backup/standby_control01.ctl';
run {
backup current controlfile for standby;
SQL 'alter system archive log current';
}
quit
EOF
open (FILE1,">$temp_sql_filename") || die ("Could not open output file $temp_sql_filename for writing. \n Does the full directory path exist?");
print FILE1 ($tempsqlcode_rman_controlfile);
# close the output file
close (FILE1);
system ("/u01/v901/bin/rman target / \@$temp_sql_filename");
# rename (then delete) existing standby control on standby server mount point
print "\n";
print "Renaming, then deleting $STANDBY_SERVER_MOUNT_POINT/standby_control01.ctl before copying to $STANDBY_SERVER_MOUNT_POINT/standby_control01.ctl.\n";
print "\n";
rename ("$STANDBY_SERVER_MOUNT_POINT/standby_control01.ctl","$STANDBY_SERVER_MOUNT_POINT/standby_control01.ctl.old");
# attempt to delete old standby controlfile on standby server mount point - just to make sure
@filelist = ("$STANDBY_SERVER_MOUNT_POINT/standby_control01.ctl.old");
unlink (@filelist);
print "\n";
print "Archiving current online redo log file...\n";
print "\n";
# archive the current online redo log file - prior to copying all archivelogs
# to standby database server
my $tempsqlcode=<<"EOF";
connect / as sysdba
ALTER SYSTEM ARCHIVE LOG CURRENT;
quit
EOF
open (FILE1,">$temp_sql_filename") || die ("Could not open output file $temp_sql_filename for writing. \n Does the full directory path exist?");
print FILE1 ($tempsqlcode);
# close the output file
close (FILE1);
system ("/u01/v901/bin/sqlplus /nolog \@$temp_sql_filename");
# copy all of the archivelog files from the primary to the standby server
# copying of archivelog files must be done after the standby controlfile has been created
# Note: The format of each archivelog file is expected to be *.arc in order for
# the 78_sol_920_prod1_standby_standbysetup_1.pl script to copy the archivelogs to the archive directory on the
# standby server
# The primary server should have minimal or no activity at this time in order
# to prevent any logs from being missed.
print "\n";
print "Copying /archive/*.arc files to $STANDBY_SERVER_MOUNT_POINT.\n";
print "\n";
system ("cp /archive/*.arc $STANDBY_SERVER_MOUNT_POINT");
# copy standby controlfile, and backup files to the standby database
print "\n";
print "Copying backed up *.bak and *.ctl files from /backup to $STANDBY_SERVER_MOUNT_POINT.\n";
print "\n";
system ("cp /backup/*.bak $STANDBY_SERVER_MOUNT_POINT");
system ("cp /backup/*.ctl $STANDBY_SERVER_MOUNT_POINT");
system ("chmod 774 $STANDBY_SERVER_MOUNT_POINT/*.*");
print "\n\n";
print "Please continue running script 78_sol_920_prod1_standby_standbysetup_1.pl\n";
print "on the standby database server.\n";
print "\n";
print "Press the return key to continue.\n";
print "\n\n";
$pause2 = ;
print "\n\n";
print "Please enter the type of backup which was previously done:\n";
print "1) RMAN backup - without an RMAN catalog (using controlfile info).\n";
print "2) RMAN backup - with an RMAN catalog.\n";
print "\n\n";
$backup_catalog_type = ;
chop($backup_catalog_type);
if ($backup_catalog_type == 1)
{
# if RMAN backup using controlfile was used
print "\n";
print "Creating entire standby database with\n";
print "RMAN duplicate database feature.\n";
print "[Using RMAN info from controlfile.]\n";
print "\n";
# RMAN - duplicate database for standby - NOCATALOG
my $tempsqlcode=<<"EOF";
configure channel device type Disk format '/backup/%d_datafile_%s_%p.bak';
run {
allocate auxiliary channel aux1 type Disk maxpiecesize = 1900M;
duplicate target database for standby
nofilenamecheck
dorecover;
release channel aux1;
}
quit
EOF
open (FILE1,">$temp_sql_filename") || die ("Could not open output file $temp_sql_filename for writing. \n Does the full directory path exist?");
print FILE1 ($tempsqlcode);
# close the output file
close (FILE1);
@proglist = ("/u01/v901/bin/rman target / auxiliary sys/s9_21sv\@prod1s \@$temp_sql_filename");
system (@proglist);
}
# if RMAN backup using catalog was used
if ($backup_catalog_type == 2)
{
print "\n";
print "Copy the RMAN datafile and archivelog backup \n";
print "files to the same location on the standby.\n";
print "server as was used to back them up\n";
print "on the primary server.\n";
print "[If the /backup/ directory was previously used]\n";
print "[then this has already been done.]\n";
print "\n";
print "Press the return key to continue.\n";
print "\n\n";
$pause3 = ;
# RMAN - duplicate database for standby - using CATALOG
my $tempsqlcode=<<"EOF";
connect catalog rman/rt-ut\@oem1.world
configure channel device type Disk format '/backup/%d_datafile_%s_%p.bak';
run {
allocate auxiliary channel aux1 type Disk maxpiecesize = 1900M;
duplicate target database for standby
nofilenamecheck
dorecover;
release channel aux1;
}
quit
EOF
open (FILE1,">$temp_sql_filename") || die ("Could not open output file $temp_sql_filename for writing. \n Does the full directory path exist?");
print FILE1 ($tempsqlcode);
# close the output file
close (FILE1);
@proglist = ("/u01/v901/bin/rman target / auxiliary sys/s9_21sv\@prod1s \@$temp_sql_filename");
system (@proglist);
}
print "\n\n";
print "Please continue running script 78_sol_920_prod1_standby_standbysetup_1.pl on the standby database server.\n";
print "Press the return key to continue.\n";
print "\n\n";
$answer = ;
# ------------ copy_to_standby sub
sub copy_to_standby($STANDBY_SERVER_MOUNT_POINT) {
# this sub copies Oracle configuration files to the standby server mount point
# copy the standby version of the /etc/profile file to $STANDBY_SERVER_MOUNT_POINT location - for the standby database
print "\n";
print "Copying /export/oracle/73_sol_prod1_standby_etc_profile_1.sh to $STANDBY_SERVER_MOUNT_POINT/73_sol_prod1_standby_etc_profile_1.sh.\n";
print "\n";
File::Copy::copy("/export/oracle/73_sol_prod1_standby_etc_profile_1.sh","$STANDBY_SERVER_MOUNT_POINT/73_sol_prod1_standby_etc_profile_1.sh");
# copy the primary version of the /etc/profile file - for switchover/failover situations
print "\n";
print "Copying /export/oracle/10_sol_etc_profile_1.sh to $STANDBY_SERVER_MOUNT_POINT/10_sol_etc_profile_1.sh.\n";
print "\n";
File::Copy::copy("/export/oracle/10_sol_etc_profile_1.sh","$STANDBY_SERVER_MOUNT_POINT/10_sol_etc_profile_1.sh");
# copy the standby version of the tnsnames.ora file to $STANDBY_SERVER_MOUNT_POINT location - for the standby database
print "\n";
print "Copying /export/oracle/71_prod1_failover_tnsnames_1.ora to $STANDBY_SERVER_MOUNT_POINT/71_prod1_failover_tnsnames_1.ora.\n";
print "\n";
File::Copy::copy("/export/oracle/71_prod1_failover_tnsnames_1.ora","$STANDBY_SERVER_MOUNT_POINT/71_prod1_failover_tnsnames_1.ora");
# copy primary tnsnames.ora file to $STANDBY_SERVER_MOUNT_POINT location - for failover/switchover of the standby database
print "\n";
print "Copying /export/oracle/70_prod1_primary_tnsnames_1.ora to $STANDBY_SERVER_MOUNT_POINT/70_prod1_primary_tnsnames_1.ora.\n";
print "\n";
File::Copy::copy("/export/oracle/70_prod1_primary_tnsnames_1.ora","$STANDBY_SERVER_MOUNT_POINT/70_prod1_primary_tnsnames_1.ora");
# copy the standby server version of the listener.ora file to $STANDBY_SERVER_MOUNT_POINT location - for the standby database
print "\n";
print "Copying /export/oracle/74_sol_prod1_standby_listener_1.ora to $STANDBY_SERVER_MOUNT_POINT/74_sol_prod1_standby_listener_1.ora.\n";
print "\n";
File::Copy::copy("/export/oracle/74_sol_prod1_standby_listener_1.ora","$STANDBY_SERVER_MOUNT_POINT/74_sol_prod1_standby_listener_1.ora");
# copy the standby server version of the listener.ora file to $STANDBY_SERVER_MOUNT_POINT location - for failover situations - when operating as the primary server
print "\n";
print "Copying /export/oracle/88_sol_standby_primary_listener_1.ora to $STANDBY_SERVER_MOUNT_POINT/88_sol_standby_primary_listener_1.ora.\n";
print "\n";
File::Copy::copy("/export/oracle/88_sol_standby_primary_listener_1.ora","$STANDBY_SERVER_MOUNT_POINT/88_sol_standby_primary_listener_1.ora");
# copy the standby server version of the listener.ora file to $STANDBY_SERVER_MOUNT_POINT/ location - for standby operating mode
print "\n";
print "Copying /export/oracle/74_sol_prod1_standby_listener_1.ora to $STANDBY_SERVER_MOUNT_POINT/74_sol_prod1_standby_listener_1.ora.\n";
print "\n";
File::Copy::copy("/export/oracle/74_sol_prod1_standby_listener_1.ora","$STANDBY_SERVER_MOUNT_POINT/74_sol_prod1_standby_listener_1.ora");
# copy the sqlnet.ora file to $STANDBY_SERVER_MOUNT_POINT/ location
print "\n";
print "Copying /export/oracle/86_sqlnet_1.ora to $STANDBY_SERVER_MOUNT_POINT/86_sqlnet_1.ora.\n";
print "\n";
File::Copy::copy("/export/oracle/86_sqlnet_1.ora","$STANDBY_SERVER_MOUNT_POINT/86_sqlnet_1.ora");
# copy the /var/opt/oracle/oratab primary file to $STANDBY_SERVER_MOUNT_POINT/ location
print "\n";
print "Copying /export/oracle/46_sol_oratab_1.txt to $STANDBY_SERVER_MOUNT_POINT/46_sol_oratab_1.txt.\n";
print "\n";
File::Copy::copy("/export/oracle/46_sol_oratab_1.txt","$STANDBY_SERVER_MOUNT_POINT/46_sol_oratab_1.txt");
# copy the /var/opt/oracle/oratab standby file to $STANDBY_SERVER_MOUNT_POINT/ location
print "\n";
print "Copying /export/oracle/28_sol_oratab_standby_1.txt to $STANDBY_SERVER_MOUNT_POINT/28_sol_oratab_standby_1.txt.\n";
print "\n";
File::Copy::copy("/export/oracle/28_sol_oratab_standby_1.txt","$STANDBY_SERVER_MOUNT_POINT/28_sol_oratab_standby_1.txt");
# copy the standby version of the initprod1s.ora file to $STANDBY_SERVER_MOUNT_POINT location - for the standby database
print "\n";
print "Copying /export/oracle/76_sol_920_prod1_standby_init_1.ora to $STANDBY_SERVER_MOUNT_POINT/76_sol_920_prod1_standby_init_1.ora.\n";
print "\n";
File::Copy::copy("/export/oracle/76_sol_920_prod1_standby_init_1.ora","$STANDBY_SERVER_MOUNT_POINT/76_sol_920_prod1_standby_init_1.ora");
# copy primary init.ora file to $STANDBY_SERVER_MOUNT_POINT - for failover/switchover situations
print "\n";
print "Copying /export/oracle/75_sol_920_prod1_primary_init_1.ora to $STANDBY_SERVER_MOUNT_POINT/75_sol_920_prod1_primary_init_1.ora.\n";
print "\n";
File::Copy::copy("/export/oracle/75_sol_920_prod1_primary_init_1.ora","$STANDBY_SERVER_MOUNT_POINT/75_sol_920_prod1_primary_init_1.ora");
# copy the status monitoring perl script
print "\n";
print "Copying /export/oracle/79_prod1_standby_status_1.pl to $STANDBY_SERVER_MOUNT_POINT/79_prod1_standby_status_1.pl.\n";
print "\n";
File::Copy::copy("/export/oracle/79_prod1_standby_status_1.pl","$STANDBY_SERVER_MOUNT_POINT/79_prod1_standby_status_1.pl");
# copy the change role script to standby server
print "\n";
print "Copying /export/oracle/80_sol_prod1_standbydb_change_role_1.pl to $STANDBY_SERVER_MOUNT_POINT/80_sol_prod1_standbydb_change_role_1.pl.\n";
print "\n";
File::Copy::copy("/export/oracle/80_sol_prod1_standbydb_change_role_1.pl","$STANDBY_SERVER_MOUNT_POINT/80_sol_prod1_standbydb_change_role_1.pl");
# copy the standby startup script to standby server
print "\n";
print "Copying /export/oracle/81_prod1_standby_startup_script_1 to $STANDBY_SERVER_MOUNT_POINT/81_prod1_standby_startup_script_1.\n";
print "\n";
File::Copy::copy("/export/oracle/81_prod1_standby_startup_script_1","$STANDBY_SERVER_MOUNT_POINT/81_prod1_standby_startup_script_1");
# copy the Rotate logs script to standby server
print "\n";
print "Copying /export/oracle/13_sol_rotateoraclefiles_1.sh to $STANDBY_SERVER_MOUNT_POINT/13_sol_rotateoraclefiles_1.sh.\n";
print "\n";
File::Copy::copy("/export/oracle/13_sol_rotateoraclefiles_1.sh","$STANDBY_SERVER_MOUNT_POINT/13_sol_rotateoraclefiles_1.sh");
# ------------ copy_to_standby sub
}

