DMK_ENV.pm
NAME
DMK_ENV.pm -- Core DMK library to set/get the environment, used by DMK perl scripts
SYNOPSIS
use DMK_ENV;
it exports the following functions and procedures that can directly be called by another perl-script:
set_internal_config_var()
set_internal_config_alias()
modify_path()
get_env()
get_home_version()
get_pdbfiles()
get_processes()
read_ora_homes()
read_ora_sids()
read_orabasetab()
read_dmk_config()
write_ora_sids()
and it exports the following global variables:
$iswin
For Unix=0, for Windows=1
$iswin
Is the script running in an interactive terminal (
tty -s
)? 1=yes%orahomes
Information about ORACLE_HOME's from
$etc/ora_homes
. For a detailed field description, see the header of the configuration file. For the current home, additional information is gathered: rel (release), ver (version), rooh (read-ony OH, roohctl)%orasids
Information about ORACLE_SID's from
$etc/ora_sids
(existing=1) or a new detected ORACLE_SID. For a detailed field description, see the header of the configuration file.%dmk_config_var
Information about variables set by
dmk-core.pl
([INTERNAL]) or from configuration files. For details about setting the variables, see$DMK_HOME/bin/dmk-core.pl
The hash is structured by section (INTERNAL/GLOBAL/SID/[ORACLE_SID]/[ORACLE_SID.PDB]), followed by the variable name.This hash is built by the "Tie::IxHash" module, so the chronoligical order is preserved in a loop.
%dmk_config_alias
Information about aliases set by
dmk-core.pl
([INTERNAL], usually "SID", "SID.PDB" and "cdd.*" aliases) or from configuration files. The hash is structured by section (INTERNAL/GLOBAL/SID/[ORACLE_SID]/[ORACLE_SID.PDB]), followed by the alias name.@sidlist
array with all ORACLE_SID's from
$etc/ora_sids (1st field)
@ora_homes
array with all lines of
$etc/ora_homes
$ora_homes_changed
Set to 1 if a change is detected with ORACLE_HOME's, e.g. a home was deleted (compared to
ora_homes
)@ora_sids
array with all lines of
$etc/ora_sids
$ora_sids_changed
Set to 1 if a change is detected with ORACLE_SID's, e.g. a SID was deleted or added (compared to
ora_sids
)$initialsid
Which SID should be set if dmk.sh is sourced without a SID. DMK automatically chooses a SID, but this can be overridden by the variable
DMK_INITIALSID
in the[GLOBAL]
section$grid_home
ORACLE_HOME of the used Grid-Infrasture.
$host_short
The hostname without domain.
$separator
Directory separator within a PATH variable. For Unix it is ":"
$DMK_ORATAB_STAT
,$DMK_ORAGCHOMELIST_STAT
$DMK_ORAINVENTORY_STAT
$DMK_ORA_HOMES_STAT
$DMK_ORA_SIDS_STAT
All these DMK_[configfile]_STAT variables contain the size in bytes and the timestamp in sec since 1970. It is used to detect changes of the environment. If it is unchanged, the time-consuming process of re-read the whole environment can be omitted.
FUNCTIONS, PROCEDURES
PROCEDURE set_internal_config_var
set variables generated by dmk (not via configfile), It is a wrapper to fill the %dmk_config_var hash
Parameter
$VAR: DMK variable name (usually uppercase)
$value: value of the variable
$option: nooption, nowarn (default)
POD ERRORS
Hey! The above document had some coding errors, which are explained below:
Around line 207:
Unterminated F<...> sequence
Last updated