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
Ocsinventory::Agent::Modules::Databases::Oracle::Instances(3) User Contributed Perl Documentation Ocsinventory::Agent::Modules::Databases::Oracle::Instances(3)

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

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.

The module exports the "getInstances()" function.

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.

2022-01-26 perl v5.32.1

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

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