Skip to content

API Reference

Developer Documentation

This section contains comprehensive API reference documentation for OraDBA developers and advanced users. For general user documentation, see the main OraDBA Documentation.

Complete function reference for OraDBA libraries and scripts.

Overview

OraDBA provides a comprehensive set of shell functions organized into logical categories. All functions follow standardized header documentation including purpose, arguments, return codes, and output specifications.

Categories

Core Utilities

Core utility functions used throughout OraDBA including logging, PATH management, and Oracle environment utilities.

Key Functions:

Registry API

Unified interface for Oracle installation discovery and management, combining oratab and oradba_homes.conf.

Key Functions:

Plugin Interface

Plugin interface for product-specific functionality supporting database, client, datasafe, java, oud, and other Oracle products.

Required Plugin Functions:

Environment Management

Environment management libraries for building, parsing, validating, and tracking Oracle environments.

Includes:

  • oradba_env_parser.sh - Configuration parsing and merging
  • oradba_env_builder.sh - Environment variable building
  • oradba_env_validator.sh - Environment validation
  • oradba_env_config.sh - Configuration management
  • oradba_env_status.sh - Status display
  • oradba_env_changes.sh - Change detection

Database Operations

Database-specific operations including query execution, status checks, and database management.

Key Functions:

Alias Management

Alias generation and management for database environments.

Key Functions:

Extension System

Extension system for loading and managing OraDBA extensions.

Key Functions:

Scripts and Commands

Command-line scripts and tools for OraDBA operations including environment management, service control, and system utilities.

Includes:

  • oradba_env.sh - Environment switching
  • oradba_homes.sh - Oracle Home management
  • oradba_dbctl.sh - Database control
  • oradba_services.sh - Service management
  • oradba_install.sh - Installation script
  • And more...

Quick Reference

Common Patterns

Check Database Status

source "${ORADBA_BASE}/lib/oradba_db_functions.sh"

status=$(check_database_status "FREE")
if [[ "$status" == "RUNNING" ]]; then
    echo "Database is up"
fi

List All Installations

source "${ORADBA_BASE}/lib/oradba_registry.sh"

oradba_registry_get_all | while IFS=: read -r name home type version auto_start desc; do
    echo "Found $type: $name at $home"
done

Execute Database Query

source "${ORADBA_BASE}/lib/oradba_db_functions.sh"

query="SELECT name FROM v\$database;"
db_name=$(execute_db_query "$query" "raw")
echo "Database: $db_name"

Load Plugin and Check Status

source "${ORADBA_BASE}/lib/plugins/database_plugin.sh"

if plugin_validate_home "$ORACLE_HOME"; then
    status=$(plugin_check_status "$ORACLE_HOME" "$ORACLE_SID")
    echo "Status: $status"
fi

See Also

For developer documentation including architecture, development guides, and function header standards, see the project repository documentation.


API Reference Version: 1.0
Last Generated: 2026-01-21
OraDBA Version: v0.19.1+