# S402ASM.def: Collects Automatic Storage Management Information # $Id: S402ASM.def,v 1.26 2008/02/25 17:32:56 mschenke Exp $ # ARCS: $Header: /home/cvs/repository/RDA_4/src/scripting/lib/modules/S402ASM.def,v 1.26 2008/02/25 17:32:56 mschenke Exp $ # # Change History # 20080225 MSC Change the copyright notice. =head1 NAME S402ASM - Collects Automatic Storage Management Information =head1 DESCRIPTION This module collects Automatic Storage Management information (Oracle Database 10g). This module must be run as SYSDBA to collect the whole information. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing ASM module ...',tput('off') # Initialization var $ORACLE_HOME = getSetting('ASM_ORACLE_HOME','') var $ORACLE_SID = getSetting('ASM_ORACLE_SID','+ASM') var $ADVANCED = getSetting('ASM_ADVANCED') var $DISTINCT_HOME = getSetting('ASM_DISTINCT_HOME',0) var $BDUMP_MAX = getSetting('ASM_TRACE_BDUMP',2) var $UDUMP_AGE = getSetting('ASM_TRACE_UDUMP',0) var $LOG_AGE = getSetting('ASM_TRACE_AGE',15) var $LOG_ERRORS = max(1,getSetting('ASM_TRACE_ERRORS',250)) var $LOG_TRESHOLD = getSetting('ASM_TRACE_TRESHOLD',20480) var $LOG_RATIO = max(1,getSetting('ASM_TRACE_RATIO',10)) var $LOG_VOLUME = getSetting('ASM_TRACE_VOLUME',10) var $SQL_LOGIN = uc(getSetting('ASM_LOGIN','/')) var $OSN = getOsName() var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' toc '1:ASM' # Load the libraries run DBinfo() run INSTinfo() run library() # Auto detect the ASM_ORACLE_SID in a cluster if compare('eq',$ORACLE_SID,'*') {# If ORA_CRS_HOME environment variable is not set, find it if possible var $ORA_CRS_HOME = getEnv('ORA_CRS_HOME') if !testDir('d',$ORA_CRS_HOME) {if match($OSN,'solaris') {if grepFile('/etc/init.d/init.cssd','^ORA_CRS_HOME=','f') var $ORA_CRS_HOME = value(last) } elsif match($OSN,'hpux') {if grepFile('/sbin/init.d/init.cssd','^ORA_CRS_HOME=','f') var $ORA_CRS_HOME = value(last) } elsif match($OSN,'aix') {if grepFile('/etc/init.cssd','^ORA_CRS_HOME=','f') var $ORA_CRS_HOME = value(last) } elsif match($OSN,'dec_osf') {if grepFile('/sbin/init.d/init.cssd','^ORA_CRS_HOME=','f') var $ORA_CRS_HOME = value(last) } elsif match($OSN,'linux') {if grepFile('/etc/init.d/init.cssd','^ORA_CRS_HOME=','f') var $ORA_CRS_HOME = value(last) } } # Get the ASM Oracle SID var $ORACLE_SID = '+ASM' if testDir('d',$ORA_CRS_HOME) {var $pat = concat('\.',quote(getSetting('MACHINE_NAME')),'\.([^\.]+)\.asm$') loop $lin (grepCommand(catCommand($ORA_CRS_HOME,'bin','crs_stat'),'\.asm$')) {if match($lin,$pat) {var $ORACLE_SID = concat('+',last) debug ' Inside ASM module, auto-detecting ',$ORACLE_SID break } } } } # Change the database context var $sid = setSqlSid($ORACLE_SID) var $try = setSqlFailure(0) if compare('eq',$SQL_LOGIN,'/') var $old = setSqlLogin('@ AS SYSDBA','') else {if hasSqlPassword($usr,$sid) var $pwd = undef else var $pwd = askPassword(concat('Enter ',$SQL_LOGIN,'@',$ORACLE_SID,\ ' user password:')) var $old = setSqlLogin(concat($SQL_LOGIN,'@ AS SYSDBA'),$pwd) } if $DISTINCT_HOME {var $env = setEnv('ORACLE_HOME',$ORACLE_HOME) =head2 product_info - ASM Product Information Gathers the ASM product information if ASM is installed in a separate Oracle Home. =cut debug ' Inside ASM module, processing Product Information (can take time)' report product_info write '---+!! ASM Oracle Home Product Information' write $TOC write '---+ Files in Oracle Home' call statDir('an',$ORACLE_HOME) write $TOP var $fil = catFile($ORACLE_HOME,'inventory','ContentsXML','comps.xml') if testFile('fr',$fil) call inventory_details($fil,getSetting('ASM_INTERIM')) toc '2:[[',getFile(),'][rda_report][Product Information]]' } =head2 init_ora - INIT.ORA Determines if the spfile is used. RDA connects to the database and looks for a value coming from the spfile parameter. If a value is found, RDA does not search for F. A select for C is executed to determine whether to skip the search for F. =cut debug ' Inside ASM module, processing INIT.ORA' report init_ora set $sql {SELECT '|' || p.name || '|' || p.value || '|' " FROM v$parameter p " WHERE p.name = 'spfile' " AND p.value IS NOT NULL; } call loadSql($sql) var $NO_SQL = grepLastSql('^ORA-01034:','f') var $SPFile_In_Use = grepLastSql('\|spfile\|','f') if $SPFile_In_Use write 'SPFile appears to be in use on this server%BR%\ Review "V$Parameters" and "Database SPFile Parameters" links \ for parameter settings.' elsif getSetting('ASM_PFILE_LOCAL') {var $fil = replace(getSetting('ASM_PFILE_LOCATION'),'\*',$ORACLE_SID) var %treated = () prefix {write '---+!! INIT.ORA Information' write $TOC write '---+ Contents of INIT.ORA ',$fil } if writeFile($fil) {write $TOP var $treated{$fil} = 1 # Extract the IFILE, ignoring comments in the Oracle supplied INIT.ORA while value(grepFile($fil,'^[^#]*ifile','fi')) {var $fil = trim(last) var $fil = replace($fil,"'",'',true) var $fil = replace($fil,'\?',$ORACLE_HOME) var $fil = replace($fil,'\$ORACLE_HOME',$ORACLE_HOME) var $fil = replace($fil,'\${ORACLE_HOME}',$ORACLE_HOME) var $fil = replace($fil,'%ORACLE_HOME%',$ORACLE_HOME) break exists($treated{$fil}) write '---+ Contents of IFILE ',$fil call writeFile($fil) write $TOP var $treated{$fil} = 1 } } else {unprefix write $fil,' is not readable or does not exist.%BR%\ File permissions are as follows:%BR%' call statFile('b',$fil) write '%BR%User: ',id(),'%BR%' } } else write 'INIT.ORA not located on this server.' toc '2:[[',getFile(),'][rda_report][INIT.ORA]]' =head2 vspparameters - SPFile Parameters Gets C information. =cut if !$NO_SQL {debug ' Inside ASM module, processing V$SPParameter' debug ' SPFile_In_Use is ',$SPFile_In_Use report vspparameters if $SPFile_In_Use {write '---+!! SPFile Parameter Values' write '|*SID*|*Name*|*Value*|*Is Specified?*| *Ordinal*|*Update Comment*|' set $sql {SELECT '|' || " s.sid || '|' || " s.name || '|' || " NVL(s.value, ' ') || '|' || " s.isspecified || '| ' || " s.ordinal || '|' || " NVL(s.update_comment, ' ') || '|' " FROM v$spparameter s " ORDER BY s.name, s.sid; } call writeSql($sql) if getSqlMessage() write last,'%BR%' } else {write '---+!! SPFile Parameter Values' write 'This database instance is not using an spfile.' } if isCreated() toc '2:[[',getFile(),'][rda_report][SPFile Parameters]]' =head2 vparameters - V$Parameters Gets C information. =cut debug ' Inside ASM module, processing V$Parameter' report vparameters var $TTL = undef var @TTL = ('',\ '---+!! Automatic Storage Management Parameters') var @HDR = ('',\ '|*Parameter Name*|*Value*|*Default*|*Modified*|') set $sql {SELECT '|' || " SUBSTR(name, 0, 512) || '|' || " NVL(SUBSTR(value, 0, 512), '%NULL%') || '|' || " isdefault || '|' || " ismodified || '|' " FROM v$parameter " ORDER BY name; } call separator(1) call writeSql($sql) call separator(0,'V$Parameters') =head2 overview - Overview Extracts the ASM information from the database. =cut debug ' Inside the ASM module, gathering overview information' report overview var $TTL = '---+!! Automatic Storage Management Overview' if $ADVANCED {var @TTL = ('',\ '---+ Disk Groups',\ '---+ Partner Information',\ '---+ Robust Disk Information') var @HDR = ('',\ '| *Grp*|*Name*|*State*|*Type*| *Total MiB*| *Free MiB*|',\ '| *Grp*| *Disk*| *number_kfdpartner*| *parity_kfdpartner*| \ *active_kfdpartner*|',\ '| *Group Number*| *Disk Number*| *Incarnation*|*Mount Status*|\ *Header Status*|*Mode Status*|*State*|*Library*| *Total MiB*| \ *Free MiB*|*Name*|*FailGroup*|*Label*|*Path*|*Create Date*|\ *Mount Date*| *Reads*| *Writes*| *Read Errs*| *Write Errs*|\ *Read Time*|*Write Time*| *Bytes Read*| *Bytes Written*|') set $sql {SELECT '| ' || " group_number || '|' || " name || '|' || " state || '|' || " type || '| ' || " total_mb || '| ' || " free_mb || '|' " FROM v$asm_diskgroup; "PROMPT ___Macro_separator(2)___ "SELECT '| ' || " grp || '| ' || " disk || '| ' || " number_kfdpartner || '| ' || " parity_kfdpartner || '| ' || " active_kfdpartner || '|' " FROM x$kfdpartner; "PROMPT ___Macro_separator(3)___ "SELECT '[[[' || CHR(10) || '| ' || " group_number || '| ' || " disk_number || '| ' || " incarnation || '|' || " mount_status || ' |' || " header_status || ' |' || " mode_status || ' |' || " state || ' |' || " library || ' | ' || " total_mb || '| ' || " free_mb || '| ' || " name || '| ' || " failgroup || ' |' || " label || ' |' || " path || ' |' || " TO_CHAR(create_date,'DD-Mon-YYYY') || ' |' || " TO_CHAR(mount_date,'DD-Mon-YYYY') || ' | ' || " reads || '| ' || " writes || '| ' || " read_errs || '| ' || " write_errs || '| ' || " read_time || ' | ' || " write_time || '| ' || " bytes_read || '| ' || " bytes_written || '|' || " CHR(10) || ']]]' " FROM v$asm_disk; } call separator(1) call writeSql($sql,2) call separator(0,'Overview') # Creating separate datafiles for the long-running queries. prefix write '---+ Allocation Information' suspend overview data kfdat prefix {write '---+ Allocation Information (Disk)' write '| *group_kfdat*| *number_kfdat*| *aunum_kfdat*| *v_kfdat*| \ *fnum_kfdat*| *i_kfdat*| *xnum_kfdat*|*raw_kfdat*|' } set $sql {SELECT '| ' || " group_kfdat || '| ' || " number_kfdat || '| ' || " aunum_kfdat || '| ' || " v_kfdat || '| ' || " fnum_kfdat || '| ' || " i_kfdat || '| ' || " xnum_kfdat || '|' || " raw_kfdat || '|' " FROM x$kfdat; } call writeSql($sql,2) if isCreated() {var $url = getFile('.') resume overview write '|*Disk*|',concat('[[',$url,'][_blank][x$kfdat]]'),'|' suspend overview } data kffxp prefix {write '---+ Allocation Information (ASM File)' write '| *Grp*| *Num*|*Incarn*|*pxn_kffxp*| *xnum_kffxp*| *Lxn*| *Disk*| \ *au_kffxp*| *Flg*| *Chk*|' } set $sql {SELECT '| ' || " group_kffxp || '| ' || " number_kffxp || '|' || " incarn_kffxp || '|' || " pxn_kffxp || '| ' || " xnum_kffxp || '| ' || " lxn_kffxp || '| ' || " disk_kffxp || '|' || " au_kffxp || '| ' || " flags_kffxp || '| ' || " chk_kffxp || '|' " FROM x$kffxp; } call writeSql($sql,2) if isCreated() {var $url = getFile('.') resume overview write '|*ASM File*|',concat('[[',$url,'][_blank][x$kffxp]]'),'|' } else resume overview if hasOutput(true) write $TOP } else {var @TTL = ('',\ '---+ Disk Group Information ',\ '---+ Disk Information') var @HDR = ('',\ '| *Grp*|*Name*|*State*|*Type*| *Total MiB*| *Free MiB*|',\ '| *Group Number*| *Disk Number*|*Name*|*Mount Status*|\ *Header Status*|*Mode Status*|*State*|*Redundancy*|\ *Failgroup*|*Path*| *Total MiB*| *Free MiB*|') set $sql {SELECT '| ' || " group_number || '|' || " name || '|' || " state || '|' || " type || '| ' || " total_mb || '| ' || " free_mb || '|' " FROM v$asm_diskgroup; "PROMPT ___Macro_separator(2)___ "SELECT '[[[' || CHR(10) || '| ' || " group_number || '| ' || " disk_number || '| ' || " name || '| ' || " mount_status || ' |' || " header_status || ' |' || " mode_status || ' |' || " state || ' |' || " redundancy || ' |' || " failgroup || ' |' || " path || ' |' || " total_mb || ' | ' || " free_mb || '| ' || " CHR(10) || ']]]' " FROM v$asm_disk " WHERE group_number = 1 " ORDER BY group_number,disk_number; } call separator(1) call writeSql($sql,2) call separator(0,'Overview') } =head2 storage_info - Storage Information Gathers the ASM storage information. =cut debug ' Inside ASM module, gathering storage information' report storage_info var $TTL = '---+!! Storage Information' var @TTL = ('',\ '---+ List of DB clients connected to ASM instance',\ '---+ List of templates',\ '---+ V$ASM_ALIAS Information',\ '---+ V$ASM_DISKGROUP Information',\ '---+ V$ASM_FILE Information',\ '---+ V$ASM_OPERATION Information') var ($HDR[1],$col1) = getSqlColumns('RDA','','V$ASM_CLIENT') call clearSqlColumns('RDA') var ($HDR[2],$col2) = getSqlColumns('RDA','','V$ASM_TEMPLATE') call clearSqlColumns('RDA') if $ADVANCED {var ($HDR[3],$col3) = getSqlColumns('RDA','','V$ASM_ALIAS') call clearSqlColumns('RDA') var ($HDR[4],$col4) = getSqlColumns('RDA','','V$ASM_DISKGROUP') call clearSqlColumns('RDA') var ($HDR[5],$col5) = getSqlColumns('RDA','','V$ASM_FILE') call clearSqlColumns('RDA') var ($HDR[6],$col6) = getSqlColumns('RDA','','V$ASM_OPERATION') call clearSqlColumns('RDA') } if and($col6,$col5,$col4,$col3,$col2,$col1) {set $sql {SELECT :3 " FROM v$asm_alias; "PROMPT ___Macro_separator(1)___ "SELECT :1 " FROM v$asm_client; "PROMPT ___Macro_separator(4)___ "SELECT :4 " FROM v$asm_diskgroup; "PROMPT ___Macro_separator(5)___ "SELECT :5 " FROM v$asm_file; "PROMPT ___Macro_separator(6)___ "SELECT :6 " FROM v$asm_operation; "PROMPT ___Macro_separator(2)___ "SELECT :2 " FROM v$asm_template; } call separator(3) call writeSql(bindSql($sql,$col1,$col2,$col3,$col4,$col5,$col6),2) call separator(0,'Storage Information') } elsif and($col2,$col1) {set $sql {SELECT :1 " FROM v$asm_client; "PROMPT ___Macro_separator(2)___ "SELECT :2 " FROM v$asm_template; } call separator(1) call writeSql(bindSql($sql,$col1,$col2),2) call separator(0,'Storage Information') } =head2 space_info - File/Space Related Information Gathers the File/Space-related information. =cut debug ' Inside ASM module, gathering file/space related information' report space_info var $TTL = '---+!! File/Space Related Information' if $ADVANCED {var @TTL = ('',\ '---+ Number of Allocation Units per Disk Group',\ '---+ Number of Allocation Units per Diskgroup,Disk',\ '---+ Number of Allocated (V) and Free (F) Allocation Units',\ '---+ Number of AUs per ASM file ordered by AU : Metadata Only',\ '---+ Number of AUs per ASM file ordered by AU : Non Metadata',\ '---+ File Utilization') var @HDR = ('',\ '| *AU Count*| *DG#*|',\ '| *AU Count*|*Group#,Diskno*|',\ '| *Group#*| *Disk#*|*VF*| *Count*|',\ '| *AU Count*| *File#*| *DG#*|',\ '| *Group Kffxp*| *Number Kffxp*|*Name*| *Count*|',\ '| *Group No*| *File No*| *Bytes*| *Space*| *In MiB*|*Name*|') set $sql {SELECT '| ' || " COUNT(number_kfdat) || '| ' || " group_kfdat || '|' " FROM x$kfdat " GROUP BY group_kfdat; "PROMPT ___Macro_separator(2)___ "SELECT '| ' || " COUNT(*) || '|' || " group_kfdat||','||number_kfdat || ' |' " FROM x$kfdat " GROUP BY group_kfdat,number_kfdat; "PROMPT ___Macro_separator(3)___ "SELECT '| ' || " group_kfdat || '| ' || " number_kfdat || '|' || " v_kfdat || ' | ' || " COUNT(*) || '|' " FROM x$kfdat " GROUP BY group_kfdat, number_kfdat, v_kfdat; "PROMPT ___Macro_separator(4)___ "SELECT '| ' || " COUNT(xnum_kffxp) || '| ' || " number_kffxp || '| ' || " group_kffxp || '|' " FROM x$kffxp WHERE number_kffxp < 256 " GROUP BY number_kffxp, group_kffxp " ORDER BY COUNT(xnum_kffxp); "PROMPT ___Macro_separator(5)___ "SELECT '| ' || " group_kffxp || '| ' || " number_kffxp || '|' || " name || ' | ' || " COUNT(*) || '|' " FROM x$kffxp, v$asm_alias " WHERE group_kffxp = group_number " AND number_kffxp = file_number " AND system_created = 'Y' " GROUP BY group_kffxp, number_kffxp, name " ORDER BY group_kffxp, number_kffxp; "PROMPT ___Macro_separator(6)___ "SELECT '| ' || " f.group_number || '| ' || " f.file_number || '| ' || " bytes || '| ' || " space || '| ' || " space/1048576 || '|' || " a.name || ' |' " FROM v$asm_file f, v$asm_alias a " WHERE f.group_number = a.group_number " AND f.file_number = a.file_number " AND system_created = 'N' " ORDER BY f.group_number, f.file_number; } } else {var @TTL = ('',\ '---+ File Utilization',\ '---+ File utilization but using the Alias names.',\ '---+ Files stored in Diskgroup') var @HDR = ('',\ '| *Group No*| *File No*| *Bytes*| *Space*| *In MiB*|*Name*|',\ '| *Group No*| *File No*| *Bytes*| *Space*| *In MiB*|*Name*|',\ '| *Group No*| *File No*|*Full Alias Path*|') set $sql {SELECT '| ' || " f.group_number || '| ' || " f.file_number || '| ' || " bytes || '| ' || " space || '| ' || " space/1048576 || '|' || " a.name || ' |' " FROM v$asm_file f,v$asm_alias a " WHERE f.group_number = a.group_number " AND f.file_number = a.file_number " AND system_created = 'Y' " ORDER BY f.group_number,f.file_number; "PROMPT ___Macro_separator(2)___ "SELECT '| ' || " f.group_number || '| ' || " f.file_number || '| ' || " bytes || '| ' || " space || '| ' || " space/1048576 || '|' || " a.name || ' |' " FROM v$asm_file f,v$asm_alias a " WHERE f.group_number = a.group_number " AND f.file_number = a.file_number " AND system_created = 'N' " ORDER BY f.group_number,f.file_number; "PROMPT ___Macro_separator(3)___ "SELECT '| ' || " gnum || '|' || " filnum || ' |' || " concat('+'||gname,sys_connect_by_path(aname, '/')) || '| ' " FROM (SELECT g.name gname, a.parent_index pindex, " a.name aname, a.reference_index rindex, " a.group_number gnum,a.file_number filnum " FROM v$asm_alias a,v$asm_diskgroup g " WHERE a.group_number = g.group_number) " START WITH (mod(pindex, power(2, 24))) = 0 " CONNECT BY PRIOR rindex = pindex; } } call separator(1) call writeSql($sql,2) call separator(0,'File/Space Related Information') } =head2 rpm_info - ASM Library Information On Linux, it gets related package manager information. =cut if match($OSN,'linux') {debug ' Inside ASM module, getting ASM library information' report rpm_info prefix {write '---+!! ASM Library Information' write '---## Using: rpm -qa | grep oracleasm' write '' } loop $lin (grepCommand('rpm -qa','oracleasm')) write $lin if isCreated(true) {write '' toc '2:[[',getFile(),'][rda_report][ASM Library Information]]' } =head2 asmlib_config - ASM Library Configuration On Linux, it collects the F file. =cut debug ' Inside ASM module, collecting /etc/sysconfig/oracleasm file' report asmlib_config var $fil = '/etc/sysconfig/oracleasm' prefix {write '---+!! ASM Library Configuration' write '---## From ',$fil } call writeFile($fil) if isCreated(true) toc '2:[[',getFile(),'][rda_report][ASM Library Configuration]]' =head2 asmlib_disks - ASM Library Disk Information On Linux, it gets ASM library disk information. =cut debug ' Inside ASM module, getting ASM library disk information' report asmlib_disks var $cmd = '/bin/ls -l /dev/oracleasm/disks' prefix {write '---+!! ASM Library Disk Information' write $TOC write '---+ List of Oracle ASM Devices' write '---## Using: ',$cmd } call writeCommand($cmd) if hasOutput(true) write $TOP var $cmd = '/etc/init.d/oracleasm listdisks' if loadCommand($cmd) {prefix {write '---+ List of Oracle ASM Disks' write '---## Using: ',$cmd } call writeLastFile() if hasOutput(true) write $TOP loop $dsk (grepLastFile('.')) {var $cmd = concat('/etc/init.d/oracleasm querydisk ',$dsk) prefix {write '---+ Disk Information for ',$dsk write '---## Using: ',$cmd } call writeCommand($cmd) if hasOutput(true) write $TOP } } if isCreated(true) toc '2:[[',getFile(),'][rda_report][ASM Library Disk Information]]' =head2 partitions - Partitions On Linux, it gets the partition information used to identify the physical devices with the ASM disk. =cut debug ' Inside ASM module, getting partitions information' report partitions var $fil = '/proc/partitions' prefix {write '---+!! Partition Information' write '---## From ',$fil } call writeFile($fil) if isCreated(true) toc '2:[[',getFile(),'][rda_report][Partitions]]' } # Get the dump destinations var $BDUMP_DIR = get_bdump() var $CDUMP_DIR = get_cdump() var $UDUMP_DIR = get_udump() var $DIAG_DIR = find_diag() var $ALERT_TAIL = getSetting('ASM_ALERT_TAIL',30000) var $TRACE_DIR = cond($DIAG_DIR,catDir($DIAG_DIR,'trace'),$BDUMP_DIR) # Define a macro to estimate the size after compression macro get_size {var ($fil) = @arg import $LOG_RATIO,$LOG_TRESHOLD keep $LOG_RATIO,$LOG_TRESHOLD var $siz = getSize($fil) if expr('>',$siz,$LOG_TRESHOLD) var $siz = expr('/',$siz,$LOG_RATIO) return $siz } =head2 alert_log - Alert Log Gathers the alert Log Information. =cut var @err = () if $DIAG_DIR {debug ' Inside LOG module, found diagdir ',$DIAG_DIR,', get log info' var $fil = catFile($DIAG_DIR,'alert','log.xml') if createBuffer('ALR','R',$fil) {# Parse the alert log for errors and last startup macro push_err {var (\@err,$lin,$max) = @arg if expr('<',scalar(@err),$max) var @err = (@err,$lin) else var (undef,@err) = (@err,$lin) return -1 } var $lst = undef call parseVar($lin) call parsePattern('TOP',\ '^',$lst,$min) var $lst = undef } if $lst {var $cnt = expr('-',$max,$lst) incr $cnt call setPos('ALR',$pos) } else {call setPos('ALR') while getLine('ALR',$min) {var $lin = chomp(last) break match($lin,'^',$ref{$typ},$BDUMP_MAX) var @tbl = (@tbl,$fil) } } call sort_files(3,0,@tbl) # Restore the previous context call setSqlSid($sid) call setSqlLogin($old) call setSqlFailure($try) if $DISTINCT_HOME call setEnv('ORACLE_HOME',$env) =head1 SEE ALSO See also L, L, L. =begin credits =over 10 =item RDA 4.2: Michael Ferrante, Noriyuki Kamei, Roger Snowden. =item RDA 4.4: Bane Radulovic, Guttula Srinivas. =item RDA 4.5: Bob Caldwell, Jaime Figueroa, Guttula Srinivas, Jens Voigt. =item RDA 4.7: Weifeng Xie. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002-2008, Oracle. All rights reserved. =head1 TRADEMARK NOTICE Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. =cut