package RDA::Extern::Apex; # $Id: Apex.pm,v 1.3 2009/01/13 17:05:59 mschenke Exp $ # ARCS: $Header: /u02/webapps/workbench/cvs/RDA_4/src/scripting/lib/RDA/Extern/Apex.pm,v 1.3 2009/01/13 17:05:59 mschenke Exp $ # # Change History # 20090113 MSC Change the copyright notice. =head1 NAME RDA::Extern::Apex - Interface to Get APEX Configuration Information =head1 SYNOPSIS require RDA::Extern::Apex; =head1 DESCRIPTION The following method is available: =cut use strict; BEGIN { use Exporter; use File::Spec; use RDA::Agent; } # Define global constants my $FMT = '\\s*PlsqlDatabaseConnectString\\s*(.*)\\s+' .'(((Net)?ServiceName|SID|TNS)Format)'; =head2 S This method extracts the details of all different database connections from the configuration file. It attempts to preserve collection indications provided in the previous setup run. It returns the database identifier list. =cut sub get_db_set { my ($agt, $cfg) = @_; my ($cnt, $fmt, $hst, $itm, $loc, $prt, $sid, $val, @set, @tb_sid, %tb_flg, %tb_dba, %tb_fmt, %tb_loc, %tb_usr); # Get the previous settings foreach $itm (split(/\|/, $agt->get_setting('APEX_DB_SETS', ''))) { next unless $itm && ($sid = $agt->get_setting("APEX_SID_$itm")); $tb_flg{$sid} = $agt->get_setting("APEX_FLAG_$itm"); $tb_usr{$sid} = $agt->get_setting("APEX_USER_$itm"); $tb_dba{$sid} = $agt->get_setting("APEX_SYSDBA_$itm"); } # Extract database connection details from the configuration file if (open(IN, "<$cfg")) { while () { next if m/^