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

#! /usr/local/bin/perl
# script: 27_win_920_rman_oem_setup_1.pl
# Features: This perl script registers a production database into the RMAN
# recovery catalog. This script is run from the production server,
# not the OEM/OMS server.
#
# Script Sequence#: 27
# Used By: executed by script 4_win_920_postinstall_1.pl during setup
#
# Copyright 2002 by .com Solutions Inc.
#
# ---------------------- Revision History ---------------
# Date By Changes
# 12-03-2001 dsimpson Initial Release
# 12-30-2001 dsimpson Added use of ENV variable ORACLE_SID, and
# 04-17-2002 dsimpson Added use of oem sid domain.
# declared proglist.
# This output file was created by Installgen version 1.38 on Thu Nov 14 17:48:05 2002. By .com Solutions Inc. www.dotcomsolutionsinc.net
use strict;
# insure that environment variable is used by this perl script
$ENV{'ORACLE_SID'} = "PROD3";
my $temp_sql_filename = "temp_sql.sql";
my $tempsqlcode="";
my @proglist = '';
# connect to the target database (prod3 ) which is currently being set up
# and register the prod3 database into the recovery catalog in database prod5
# create tempfile for rman code
my $tempsqlcode=<<"EOF";
connect catalog rman/rmanpassword\@prod5.world
register database;
exit;
EOF
# write out tempfile rman code
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 = ("c:\\v901\\bin\\rman.exe target / \@$temp_sql_filename");
system (@proglist);

