GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  OCSINVENTORY::AGENT::MODULES::DATABASES::ORACLE::INSTANCES (3)

.ds Aq ’

NAME

Oracle::Instances - Lib for Oracle instances and versions retrieval

CONTENTS

DESCRIPTION

This module provides a function to retrieve information about Oracle instances on the current server.

To do so, the function reads the /etc/oratab file to find instances and then:
1. Checks the existence of the ORACLE_HOME directory.
2. Add (ORACLE_SID, ORACLE_HOME, AUTOSTART) to the databases hash.
3. Go and find server version and bundle for each ORACLE_HOME.

This information is found by executing the tnsping command and by reading the following XML file:



 $ORACLE_HOME/inventory/Components21/oracle.server/*/context.xml



The following bundles are known: SE1 (Standard Edition One), SE (Standard Edition), EE (Enterprise Edition), XE (Express Edition).

4. Returns the database hash as follows:



 {
     SID => {
         BUNDLE => Standard,
         AUTOSTART => 0,
         ORA_HOME => /home/oracle/oracle/product/11.2.0,
         VERSION => 11.2.0.4.0
     }
 };



Optionally, you can call getInstances() to return only the hash of versions and bundles, instead of the complete instances hash:



 {
     /home/oracle/oracle/product/11.2.0 => {
         BUNDLE => Standard,
         VERSION => 11.2.0.4.0
     }
 };



In that case, you just have to pass parameter 1 (integer one) when calling the function.

    Exports

The module exports the getInstances() function.

getInstances()

Synopsis



    getInstances($version_only)



where $versions_only is a integer (tested as a bool)



    my $database = getInstances()
    my $versions = getInstances(1)



Return values

The function returns a hash reference containing the instances or versions.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 OCSINVENTORY::AGENT::MODULES::DATABASES::ORACLE::INSTANCES (3) 2014-05-19

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.